# SechDistribution

SechDistribution[μ,σ]

represents the hyperbolic secant distribution with location parameter μ and scale parameter σ.

represents the hyperbolic secant distribution with location parameter 0 and scale parameter 1.

# Details

- The probability density for value in a hyperbolic secant distribution is proportional to .
- SechDistribution allows μ to be any real number and σ to be any positive real number.
- SechDistribution allows μ and σ to be any quantities of the same unit dimensions. »
- SechDistribution can be used with such functions as Mean, CDF, and RandomVariate.

# Background & Context

- SechDistribution[μ,σ] represents a continuous statistical distribution defined and supported on the set of real numbers and parametrized by the real number μ (called a "location parameter") and by the positive real number σ (called the "scale parameter") that together determine the overall behavior of its probability density function (PDF). In general, the PDF of a hyperbolic secant distribution is bell-shaped and unimodal with a single "peak" (i.e. a global maximum), though its overall shape (its height, its spread, and the horizontal location of its maximum) is determined by the values of μ and σ. In addition, the tails of the PDF are "thin" in the sense that the PDF decreases exponentially rather than algebraically for large values of . (This behavior can be made quantitatively precise by analyzing the SurvivalFunction of the distribution.) The zero-parameter form SechDistribution[] is equivalent to SechDistribution[0,1] and is sometimes referred to as the standard hyperbolic secant distribution.
- Comprehensive study of the hyperbolic secant distribution seems to begin in the 1950s, when it was isolated as a special case of the logistic distribution (LogisticDistribution) as part of J. Talacko's study of so-called Perks' distributions. The distribution has a number of statistical uses, including in modeling, regression, and inference, and since its inception the hyperbolic secant distribution has been used to model a number of phenomena including income distribution, optics polarization in telecommunications, and star counts in certain galactic structure models.
- RandomVariate can be used to give one or more machine- or arbitrary-precision (the latter via the WorkingPrecision option) pseudorandom variates from a hyperbolic secant distribution. Distributed[x,SechDistribution[μ,σ]], written more concisely as xSechDistribution[μ,σ], can be used to assert that a random variable x is distributed according to a hyperbolic secant distribution. Such an assertion can then be used in functions such as Probability, NProbability, Expectation, and NExpectation.
- The probability density and cumulative distribution functions for hyperbolic secant distributions may be given using PDF[SechDistribution[μ,σ],x] and CDF[SechDistribution[μ,σ],x]. The mean, median, variance, raw moments, and central moments may be computed using Mean, Median, Variance, Moment, and CentralMoment, respectively.
- DistributionFitTest can be used to test if a given dataset is consistent with a hyperbolic secant distribution, EstimatedDistribution to estimate a hyperbolic secant parametric distribution from given data, and FindDistributionParameters to fit data to a hyperbolic secant distribution. ProbabilityPlot can be used to generate a plot of the CDF of given data against the CDF of a symbolic hyperbolic secant distribution, and QuantilePlot to generate a plot of the quantiles of given data against the quantiles of a symbolic hyperbolic secant distribution.
- TransformedDistribution can be used to represent a transformed hyperbolic secant distribution, CensoredDistribution to represent the distribution of values censored between upper and lower values, and TruncatedDistribution to represent the distribution of values truncated between upper and lower values. CopulaDistribution can be used to build higher-dimensional distributions that contain a hyperbolic secant distribution, and ProductDistribution can be used to compute a joint distribution with independent component distributions involving hyperbolic secant distributions.
- SechDistribution is related to a number of other distributions. Qualitatively, SechDistribution is similar to NormalDistribution and LogisticDistribution in that all three are bell-shaped and that each of SechDistribution[μ,σ], NormalDistribution[μ,σ], and LogisticDistribution[ σ/π] has Mean μ and Variance σ
^{2}. SechDistribution can be obtained as a transformation (TransformedDistribution) of CauchyDistribution and is a special case of MeixnerDistribution in the sense that the PDF of SechDistribution[μ,σ] is precisely the same as that of MeixnerDistribution[2σ,0,μ,1/2]. SechDistribution is also related to GompertzMakehamDistribution, FrechetDistribution, ParetoDistribution, WeibullDistribution, MaxStableDistribution, and MinStableDistribution.

# Examples

open allclose all## Basic Examples (4)

## Scope (7)

Generate a sample of pseudorandom numbers from a hyperbolic secant distribution:

Compare its histogram to the PDF:

Distribution parameters estimation:

Estimate the distribution parameters from sample data:

Compare a density histogram of the sample with the PDF of the estimated distribution:

Skewness and kurtosis are constant:

Different moments with closed forms as functions of parameters:

Closed form for symbolic order:

Closed form for symbolic order:

Consistent use of Quantity in parameters yields QuantityDistribution:

## Applications (2)

SechDistribution is an envelope of a soliton wave. Find the full width at half maximum:

The arc tangent hyperbolic of the interclass correlation coefficient between twins' characteristics that follow a binormal distribution with equal means and equal variances follows hyperbolic secant distribution:

The interclass correlation coefficient is independent of mean and variance , so define the arc tangent hyperbolic of the coefficient for and :

Draw a sample and test the hypothesis that it could have been drawn from SechDistribution:

Confirm goodness of fit with QuantilePlot:

## Properties & Relations (6)

Sech distribution is closed under translation and scaling by a positive factor:

Relationships to other distributions:

SechDistribution is a special case of MeixnerDistribution:

SechDistribution can be obtained by functional transformation from CauchyDistribution:

Compare with expressions for sech distribution:

The PDF of SechDistribution is bell-shaped, similar to NormalDistribution and LogisticDistribution:

The tails of SechDistribution are lighter than those of NormalDistribution or LogisticDistribution:

Mean and variance of all three distributions are equal:

Hyperbolic secant distribution mimics LogisticDistribution:

Fit the hyperbolic secant distribution to data:

Compare the histogram to the PDF of the estimated distribution:

Fit the logistic distribution to data:

DistributionFitTest rejects the hypothesis that data was drawn from the hyperbolic secant distribution:

#### Text

Wolfram Research (2010), SechDistribution, Wolfram Language function, https://reference.wolfram.com/language/ref/SechDistribution.html (updated 2016).

#### CMS

Wolfram Language. 2010. "SechDistribution." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2016. https://reference.wolfram.com/language/ref/SechDistribution.html.

#### APA

Wolfram Language. (2010). SechDistribution. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/SechDistribution.html