Main Content

Student's t Distribution

Overview

The Student’stdistribution is a one-parameter family of curves. This distribution is typically used to test a hypothesis regarding the population mean when the population standard deviation is unknown.

Statistics and Machine Learning Toolbox™ offers multiple ways to work with the Student’stdistribution.

  • Use distribution-specific functions (tcdf,tinv,tpdf,trnd,tstat) with specified distribution parameters. The distribution-specific functions can accept parameters of multiple Student’stdistributions.

  • Use generic distribution functions (cdf,icdf,pdf,random) with a specified distribution name ('T') and parameters.

Parameters

The Student’stdistribution uses the following parameter.

Parameter Description 金宝app
nu (ν) Degrees of freedom ν= 1, 2, 3,...

Probability Density Function

The pdf of the Student'stdistribution is

y = f ( x | ν ) = Γ ( ν + 1 2 ) Γ ( ν 2 ) 1 ν π 1 ( 1 + x 2 ν ) ν + 1 2 ,

whereνis the degrees of freedom and Γ( · ) is the Gamma function. The resultyis the probability of observing a particular value ofxfrom the Student’stdistribution withνdegrees of freedom.

For an example, seeCompute and Plot Student's t Distribution pdf

Cumulative Distribution Function

The cdf of the Student’stdistribution is

p = F ( x | ν ) = x Γ ( ν + 1 2 ) Γ ( ν 2 ) 1 ν π 1 ( 1 + t 2 ν ) ν + 1 2 d t ,

whereνis the degrees of freedom and Γ( · ) is the Gamma function. The resultpis the probability that a single observation from thetdistribution withνdegrees of freedom falls in the interval[–∞,x]

For an example, seeCompute and Plot Student's t Distribution cdf

Inverse Cumulative Distribution Function

Thetinverse function is defined in terms of the Student'stcdf as

x = F 1 ( p | ν ) = { x : F ( x | ν ) = p } ,

where

p = F ( x | ν ) = x Γ ( ν + 1 2 ) Γ ( ν 2 ) 1 ν π 1 ( 1 + t 2 ν ) ν + 1 2 d t ,

νis the degrees of freedom, and Γ( · ) is the Gamma function. The resultxis the solution of the integral equation where you supply the probabilityp

For an example, seeCompute Student's t icdf

Descriptive Statistics

The mean of the Student’stdistribution isμ= 0for degrees of freedomνgreater than 1. Ifνequals 1, then the mean is undefined.

The variance of the Student’stdistribution is ν ν 2 for degrees of freedomνgreater than 2. Ifνis less than or equal to 2, then the variance is undefined.

Examples

Compute and Plot Student'stDistribution pdf

Compute the pdf of a Student'stdistribution with degrees of freedom equal to5,10, and50

x = [-5:.1:5]; y1 = tpdf(x,5); y2 = tpdf(x,10); y3 = tpdf(x,50);

Plot the pdf for all three choicesnuon the same axis.

figure; plot(x,y1,'Color','black','LineStyle',“- - -”) holdonplot(x,y2,'Color',“红色”,'LineStyle','-.') plot(x,y3,'Color','blue','LineStyle','--') xlabel('Observation') ylabel('Probability Density') legend({'nu = 5','nu = 10','nu = 50'}) holdoff

Figure contains an axes object. The axes object contains 3 objects of type line. These objects represent nu = 5, nu = 10, nu = 50.

Compute and Plot Student'stDistribution cdf

Compute the cdf of a Student'stdistribution with degrees of freedom equal to5,10, and50

x = [-5:.1:5]; y1 = tcdf(x,5); y2 = tcdf(x,10); y3 = tcdf(x,50);

Plot the cdf for all three choices ofnuon the same axis.

figure; plot(x,y1,'Color','black','LineStyle',“- - -”) holdonplot(x,y2,'Color',“红色”,'LineStyle','-.') plot(x,y3,'Color','blue','LineStyle','--') xlabel('Observation') ylabel(“累积公关obability') legend({'nu = 5','nu = 10','nu = 50'}) holdoff

Figure contains an axes object. The axes object contains 3 objects of type line. These objects represent nu = 5, nu = 10, nu = 50.

Compute Student'sticdf

Find the 95th percentile of the Student'stdistribution with50degrees of freedom.

p = .95; nu = 50; x = tinv(p,nu)
x = 1.6759

Compare Student'stand Normal Distribution pdfs

The Student’stdistribution is a family of curves depending on a single parameterν(the degrees of freedom). As the degrees of freedomνapproach infinity, thetdistribution approaches the standard normal distribution.

Compute the pdfs for the Student'stdistribution with the parameternu = 5and the Student'stdistribution with the parameternu = 15

x = [-5:0.1:5]; y1 = tpdf(x,5); y2 = tpdf(x,15);

Compute the pdf for a standard normal distribution.

z = normpdf(x,0,1);

Plot the Student'stpdfs and the standard normal pdf on the same figure.

plot(x,y1,'-.',x,y2,'--',x,z,“- - -”) legend('Student''s t Distribution with \nu=5',。..'Student''s t Distribution with \nu=15',。..'Standard Normal Distribution','Location','best') xlabel('Observation') ylabel('Probability Density') title('Student''s t and Standard Normal pdfs')

Figure contains an axes object. The axes object with title Student's t and Standard Normal pdfs contains 3 objects of type line. These objects represent Student's t Distribution with \nu=5, Student's t Distribution with \nu=15, Standard Normal Distribution.

The standard normal pdf has shorter tails than the Student'stpdfs.

Related Distributions

  • Beta Distribution— The beta distribution is a two-parameter continuous distribution that has parametersa(first shape parameter) andb(second shape parameter). IfYhas a Student'stdistribution withνdegrees of freedom, then X = 1 2 + 1 2 Y ν + Y 2 has beta distribution with the shape parametersa=ν/2andb=ν/2。This relationship is used to compute values of thetcdf and inverse functions, and to generatetdistributed random numbers.

  • Cauchy Distribution — The Cauchy distribution is a two-parameter continuous distribution with the parametersγ(scale) andδ(location). It is a special case of theStable Distributionwith the shape parametersα= 1andβ= 0。The standard Cauchy distribution (unit scale and location zero) is the Student’stdistribution with degrees of freedomνequal to 1. The standard Cauchy distribution has an undefined mean and variance.

    For an example, seeGenerate Cauchy Random Numbers Using Student's t

  • Chi-Square Distribution— The chi-square distribution is a one-parameter continuous distribution that has the parameterν(degrees of freedom). IfZhas a standard normal distribution andχ2has a chi-square distribution with degrees of freedomν, then t = Z χ 2 / ν has a Student'stdistribution with degrees of freedomν

  • Noncentral t Distribution— The noncentraltdistribution is a two-parameter continuous distribution that generalizes the Student'stdistribution and has the parametersν(degrees of freedom) andδ(noncentrality). Settingδ= 0yields the Student'stdistribution.

  • Normal Distribution— The normal distribution is a two-parameter continuous distribution with the parametersμ(mean) andσ(standard deviation).

    As the degrees of freedomνapproach infinity, the Student'stdistribution approaches the standard normal distribution (zero mean and unit standard deviation).

    For an example, seeCompare Student's t and Normal Distribution pdfs

    Ifxis a random sample of sizenfrom a normal distribution with meanμ, then the statistic t = x ¯ μ s / n , where x ¯ is the sample mean andsis the sample standard deviation, has a Student'stdistribution withn—1degrees of freedom.

    For an example, seeCompute Student's t Distribution cdf

  • t Location-Scale Distribution— Thetlocation-scale distribution is a three-parameter continuous distribution with the parametersμ(mean),σ(scale), andν(shape). Ifxhas atlocation-scale distribution with the parametersµ,σ, andν, then x μ σ has a Student'stdistribution withνdegrees of freedom.

References

[1] Abramowitz, Milton, and Irene A. Stegun, eds.Handbook of Mathematical Functions: With Formulas, Graphs, and Mathematical Tables。9.多佛打印。[Nachdr。der Ausg. von 1972]. Dover Books on Mathematics. New York, NY: Dover Publ, 2013.

[2] Devroye, Luc.Non-Uniform Random Variate Generation。New York, NY: Springer New York, 1986.https://doi.org/10.1007/978-1-4613-8643-8

[3] Evans, Merran, Nicholas Hastings, and Brian Peacock.Statistical Distributions。2nd ed. New York: J. Wiley, 1993.

[4] Kreyszig, Erwin.Introductory Mathematical Statistics: Principles and Methods。纽约:威利,1970年。

See Also

||||||

Related Topics