Half-Student-t distribution
Story
The Half-Student-t distribution is a Student-t distribution truncated to only have nonzero probability density for values greater than or equal to the location of the peak.
Parameters
The Half-Student-t distribution is peaked at its location parameter
Support
The Half-Student-t distribution is supported on the set of all real numbers that are greater than or equal to
Probability density function
Note that the distribution is only supported for
Cumulative distribution function
where
Moments
Mean:
Variance:
Usage
Package |
Syntax |
---|---|
NumPy |
|
SciPy sampling |
|
Distributions.jl |
|
Stan sampling |
|
Stan rng |
|
Notes
In Stan, a Half-Student-t is defined by putting a lower bound of
on the variable and then using a Student-t distribution with location parameter .Only the standard Student-t distribution (
and ) is available in NumPy. You can still draw out of the Student-t distribution by performing a transformation on the samples out of the standard Student-t distribution, as shown in the usage, above. The same is true for Distributions.jl. Shown is an example where random numbers are drawn from the distribution and transformed using broadcasting.The Half-Student-t distribution is not available in SciPy. To compute the PDF for
, use2 * scipy.stats.t.pdf(y, nu, mu, sigma)
. To compute the CDF for , use2 * scipy.stats.t.cdf(y, nu, mu, sigma) - 1
.The Half-Student-t distribution with
is a useful prior for nonnegative parameters. The parameter of the Half-Student-t can be tuned to allow for a heavy tail ( close to 1) or a light tail (large ).