Skip to content

StudentTDistribution ​

The Student-t distribution with ν\nu degrees of freedom.

StudentTDistribution(nu)an inert distribution object — carries ν\nu, unevaluated. Only the single-parameter (not the location-scale 3-argument Wolfram) form is implemented — a documented scope limit.
Typed signatures
TypePackageApplies
(real<0..>) -> distributionstatisticsalways

Domain: Statistics

Details
  • PDF(x)=Γ((ν+1)/2)νπ Γ(ν/2)(1+x2ν)−(ν+1)/2PDF(x) = \dfrac{\Gamma((\nu+1)/2)}{\sqrt{\nu\pi}\,\Gamma(\nu/2)}\left(1+\dfrac{x^2}{\nu}\right)^{-(\nu+1)/2}, exact.
  • CDF(x)=12Iz(ν/2,1/2)CDF(x) = \tfrac12 I_z(\nu/2, 1/2) for x<0x<0, 1−12Iz(ν/2,1/2)1 - \tfrac12 I_z(\nu/2, 1/2) for x≥0x\geq0, where z=ν/(ν+x2)z=\nu/(\nu+x^2) and II is BetaRegularized — exact (Abramowitz & Stegun 26.7.1).
  • Mean=0Mean = 0 unconditionally — exact only for ν>1\nu>1; a documented divergence for ν≤1\nu \leq 1, where the mean is actually undefined.
  • Variance=ν/(ν−2)Variance = \nu/(\nu-2) unconditionally — exact only for ν>2\nu>2; same divergence policy for ν≤2\nu \leq 2.
  • RandomVariate samples Z/V/νZ/\sqrt{V/\nu} for a standard normal ZZ and an independent ChiSquareDistribution(ν\nu) draw VV.

Examples

Basic #
live ↗
InPDF⁡(StudentTDistribution(5),0)\operatorname{PDF}(\mathrm{StudentTDistribution}(5), 0)Out5Γ(3)5Γ(52)π\frac{\sqrt{5}Γ(3)}{5Γ(\frac{5}{2})\sqrt{π}}
live ↗
InCDF⁡(StudentTDistribution(5),0)\operatorname{CDF}(\mathrm{StudentTDistribution}(5), 0)Out12\frac{1}{2}
live ↗
Inmean(StudentTDistribution(5))\mathrm{mean}(\mathrm{StudentTDistribution}(5))Out00

Cross-checked against wolframscript's N[Variance[StudentTDistribution[5]]] = 1.66666...

live ↗
InVariance(StudentTDistribution(5))\mathrm{Variance}(\mathrm{StudentTDistribution}(5))Out53\frac{5}{3}
About
Examples4

See also: CauchyDistribution, ChiSquareDistribution, PDF