StatlectThe Digital Textbook
Index > Probability distributions

Student's t distribution

A random variable X has a standard Student's t distribution with n degrees of freedom if it can be written as a ratio:[eq1]between a standard normal random variable Y and the square root of a Gamma random variable Z with parameters n and $h=1$, independent of Y.

Equivalently, we can write:[eq2]where $chi _{n}^{2}$ is a Chi-square random variable with n degrees of freedom (dividing by n a Chi-square random variable with n degrees of freedom, one obtains a Gamma random variable with parameters n and $h=1$ - see the lecture entitled Gamma distribution).

A random variable X has a non-standard Student's t distribution with mean mu, scale sigma^2 and n degrees of freedom if it can be written as a linear transformation of a standard Student's t random variable:[eq3]where Y and Z are defined as before.

The importance of Student's t distribution stems from the fact that ratios and linearly transformed ratios of this kind are encountered very often in statistics (see e.g. the lecture entitled Hypothesis tests about the mean).

We first introduce the standard Student's t distribution. We then deal with the non-standard Student's t distribution.

The standard Student's t distribution

The standard Student's t distribution is a special case of Student's t distribution. By first explaining this special case, the exposition of the more general case is greatly facilitated.

Definition

The standard Student's t distribution is characterized as follows:

Definition Let X be an absolutely continuous random variable. Let its support be the whole set of real numbers:[eq4]Let [eq5]. We say that X has a standard Student's t distribution with n degrees of freedom if its probability density function is:[eq6]where $c$ is a constant:[eq7]and $Bleft( {}
ight) $ is the Beta function.

A random variable having a standard Student's t distribution is also called a standard Student's t random variable.

Usually the number of degrees of freedom is integer ($nin U{2115} $), but it can also be real ([eq5]).

Relation to the normal and to the Gamma distribution

A standard Student's t random variable can be written as a normal random variable whose variance is equal to the reciprocal of a Gamma random variable, as shown by the following proposition:

Proposition (Integral representation) The probability density function of X can be written as:[eq9]where:

  1. [eq10] is the probability density function of a normal distribution with mean 0 and variance [eq11]:[eq12]

  2. [eq13] is the probability density function of a Gamma random variable with parameters n and $h=1$:[eq14]where[eq15]

Proof

We need to prove that:[eq16]where:[eq17]and[eq18]Let us start from the integrand function: [eq19]where [eq20]and [eq21] is the probability density function of a random variable having a Gamma distribution with parameters $n+1$ and [eq22]. Therefore:[eq23]

Of course, if X is a zero-mean normal random variable with variance $1/z$, conditional on $Z=z$, then we can think of X as a ratio: [eq24]where Y has a standard normal distribution, Z has a Gamma distribution and Y and Z are independent.

Expected value

The expected value of a standard Student's t random variable X is well-defined only for $n>1$ and it is equal to:[eq25]

Proof

It follows from the fact that the density function is symmetric around 0:[eq26]The above integrals are finite (and so the expected value is well-defined) only if $n>1$, because:[eq27]and the above limit is finite only if $n>1$.

Variance

The variance of a standard Student's t random variable X is well-defined only for $n>2$ and it is equal to:[eq28]

Proof

It can be derived thanks to the usual variance formula ([eq29]) and to the integral representation of the Beta function:[eq30]From the above derivation, it should be clear that the variance is well-defined only when $n>2$. Otherwise, if $nleq 2$, the above improper integrals do not converge (and the Beta function is not well-defined).

Higher moments

The k-th moment of a standard Student's t random variable X is well-defined only for $k<n$ and it is equal to:[eq31]

Proof

Using the definition of moment:[eq32]Therefore, to compute the k-th moment and to verify whether it exists and is finite, we need to study the following integral:[eq33]From the above derivation, it should be clear that the k-th moment is well-defined only when $n>k$. Otherwise, if $nleq k$, the above improper integrals do not converge (the integrals involve the Beta function, which is well-defined and converges only when its arguments are strictly positive - in this case only if $frac{n-k}{2}>0$). Therefore, the k-th moment of X is:[eq34]

Moment generating function

A standard Student's t random variable X does not possess a moment generating function.

Proof

When a random variable X possesses a moment generating function, then the k-th moment of X exists and is finite for any $kin U{2115} $. But we have proved above that the k-th moment of X exists only for $k<n$. Therefore, X can not have a moment generating function.

Characteristic function

There is no simple expression for the characteristic function of the standard Student's t distribution. It can be expressed in terms of a Modified Bessel function of the second kind (a solution of a certain differential equation, called modified Bessel's differential equation). The interested reader can consult Sutradhar (1986).

Distribution function

There is no simple formula for the distribution function [eq35] of a standard Student's t random variable X, because the integral[eq36]cannot be expressed in terms of elementary functions. Therefore, it is usually necessary to resort to computer algorithms to compute the values of [eq37]. For example, the MATLAB command:[eq38]returns the value of the distribution function at the point x when the degrees of freedom parameter is equal to n.

Student's t distribution in general

While in the previous section we restricted our attention to the Student's t distribution with zero mean and unit scale, we now deal with the general case.

Definition

Student's t distribution is characterized as follows:

Definition Let X be an absolutely continuous random variable. Let its support be the whole set of real numbers:[eq39]Let $mu in U{211d} $, [eq40] and [eq5]. We say that X has a Student's t distribution with mean mu, scale sigma^2 and n degrees of freedom if its probability density function is:[eq42]where $c$ is a constant:[eq7]and $Bleft( {}
ight) $ is the Beta function. We indicate that X has a t distribution with mean mu, scale sigma^2 and n degrees of freedom by:[eq44]

A random variable having a Student's t distribution is also called a Student's t random variable.

To better understand the Student's t distribution, you can have a look at its density plots.

Relation between standard and general

A random variable X which has a t distribution with mean mu, scale sigma^2 and n degrees of freedom is just a linear function of a standard Student's t random variable:

Proposition If [eq45], then:[eq46]where Z is a random variable having a standard t distribution.

Proof

This can be easily proved using the formula for the density of a function of an absolutely continuous variable ([eq47] is a strictly increasing function of Z, since $sigma $ is strictly positive):[eq48]Obviously, then, a standard t distribution is just a normal distribution with mean $mu =0$ and scale $sigma ^{2}=1$.

Expected value

The expected value of a Student's t random variable X is well-defined only for $n>1$ and it is equal to:[eq49]

Proof

It is an immediate consequence of the fact that $X=mu +sigma Z$ (where Z has a standard t distribution) and the linearity of the expected value:[eq50]As we have seen above, [eq51] is well-defined only for $n>1$ and, as a consequence, also [eq52] is well-defined only for $n>1$.

Variance

The variance of a Student's t random variable X is well-defined only for $n>2$ and it is equal to:[eq53]

Proof

It can be derived using the formula for the variance of affine transformations on $X=mu +sigma Z$ (where Z has a standard t distribution):[eq54]As we have seen above, [eq55] is well-defined only for $n>2$ and, as a consequence, also [eq56] is well-defined only for $n>2$.

Moment generating function

A Student's t random variable X does not possess a moment generating function.

Proof

It is a consequence of the fact that $X=mu +sigma Z$ (where Z has a standard t distribution) and of the fact that a standard Student's t random variable does not possess a moment generating function (see above).

Characteristic function

There is no simple expression for the characteristic function of the Student's t distribution (see the comments above, for the standard case).

Distribution function

As for the standard t distribution (see above), there is no simple formula for the distribution function [eq57] of a Student's t random variable X and it is usually necessary to resort to computer algorithms to compute the values of [eq58]. Most computer programs provide only routines for the computation of the standard t distribution function (denote it by [eq59]). In these cases we need to make a conversion, as follows:[eq60]For example, the MATLAB command:[eq61]returns the value at the point x of the distribution function of a Student's t random variable with mean mu, scale sigma and n degrees of freedom.

More details

Convergence to the normal distribution

A Student's t distribution with mean mu, scale sigma^2 and n degrees of freedom converges in distribution to a normal distribution with mean mu and variance sigma^2 when the number of degrees of freedom n becomes large (converges to infinity).

Proof

As explained before, if X_n has a t distribution, it can be written as:[eq62]where Y is a standard normal random variable, and $chi _{n}^{2}$ is a Chi-square random variable with n degrees of freedom, independent of Y. Moreover, as explained in the lecture entitled Chi-square distribution, $chi _{n}^{2}$ can be written as a sum of squares of n independent standard normal random variables [eq63]:[eq64]When n tends to infinity, the ratio[eq65]converges in probability to [eq66], by the Law of Large Numbers. As a consequence, by Slutski's theorem, X_n converges in distribution to [eq67]which is a normal random variable with mean mu and variance sigma^2.

Non-central t distribution

As discussed above, if Y has a standard normal distribution, Z has a Gamma distribution with parameters n and $h=1$ and Y and Z are independent, then the random variable X defined as: [eq68]has a standard Student's t distribution with n degrees of freedom.

Given the same assumptions on Y and Z, define a random variable $W$ as follows:[eq69]where $cin U{211d} $ is a constant. $W$ is said to have a non-central standard Student's t distribution with n degrees of freedom and non-centrality parameter $c$. We do not discuss the details of this distribution here, but be aware that this distribution is sometimes used in statistical theory (also in elementary problems) and that routines to compute its moments and its distribution function can be found in most statistical software packages.

Plots of the Student's t distribution

Plots of the Student's t density function are presented and discussed in the lecture entitled Student's t distribution plots.

Solved exercises

Below you can find some exercises with explained solutions:

  1. Exercise set 1

References

Sutradhar, B. C. (1986) On the characteristic function of multivariate Student t-distribution, Canadian Journal of Statistics, 14, 329-337.

The book

Most learning materials found on this website are now available in a traditional textbook format.