A random variable has a standard Student's t distribution with degrees of freedom if it can be written as a ratiobetween a standard normal random variable and the square root of a Gamma random variable with parameters and , independent of .
Equivalently, we can writewhere is a Chi-square random variable with degrees of freedom (dividing by a Chi-square random variable with degrees of freedom, one obtains a Gamma random variable with parameters and - see the lecture entitled Gamma distribution).
A random variable has a non-standard Student's t distribution with mean , scale and degrees of freedom if it can be written as a linear transformation of a standard Student's t random variable:where and 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.
Table of contents
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.
The standard Student's t distribution is characterized as follows.
Definition Let be an absolutely continuous random variable. Let its support be the whole set of real numbers:Let . We say that has a standard Student's t distribution with degrees of freedom if its probability density function iswhere is a constant:and 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 (), but it can also be real ().
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 can be written aswhere:
is the probability density function of a normal distribution with mean and variance :
is the probability density function of a Gamma random variable with parameters and :where
We need to prove thatwhereandLet us start from the integrand function: where and is the probability density function of a random variable having a Gamma distribution with parameters and . Therefore:
Of course, if is a zero-mean normal random variable with variance , conditional on , then we can think of as a ratiowhere has a standard normal distribution, has a Gamma distribution and and are independent.
The expected value of a standard Student's t random variable is well-defined only for and it is equal to
It follows from the fact that the density function is symmetric around :The above integrals are finite (and so the expected value is well-defined) only if becauseand the above limit is finite only if .
The variance of a standard Student's t random variable is well-defined only for and it is equal to
It can be derived thanks to the usual variance formula () and to the integral representation of the Beta function:From the above derivation, it should be clear that the variance is well-defined only when . Otherwise, if , the above improper integrals do not converge (and the Beta function is not well-defined).
The -th moment of a standard Student's t random variable is well-defined only for and it is equal to
By using the definition of moment, we getTherefore, to compute the -th moment and to verify whether it exists and is finite, we need to study the following integral:From the above derivation, it should be clear that the -th moment is well-defined only when . Otherwise, if , 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 ). Therefore, the -th moment of is
A standard Student's t random variable does not possess a moment generating function.
When a random variable possesses a moment generating function, then the -th moment of exists and is finite for any . But we have proved above that the -th moment of exists only for . Therefore, can not have a moment generating 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).
There is no simple formula for the
distribution function
of a standard Student's t random variable
because the
integralcannot
be expressed in terms of elementary functions. Therefore, it is usually
necessary to resort to computer algorithms to compute the values of
.
For example, the MATLAB
command:returns
the value of the distribution function at the point x
when the degrees of freedom parameter is equal to n
.
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.
Student's t distribution is characterized as follows.
Definition Let be an absolutely continuous random variable. Let its support be the whole set of real numbers:Let , and . We say that has a Student's t distribution with mean , scale and degrees of freedom if its probability density function iswhere is a constant:and is the Beta function. We indicate that has a t distribution with mean , scale and degrees of freedom by
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.
A random variable which has a t distribution with mean , scale and degrees of freedom is just a linear function of a standard Student's t random variable:
Proposition If , thenwhere is a random variable having a standard t distribution.
This can be easily proved using the formula for the density of a function of an absolutely continuous variable ( is a strictly increasing function of , since is strictly positive):Obviously, then, a standard t distribution is just a normal distribution with mean and scale .
The expected value of a Student's t random variable is well-defined only for and it is equal to
It is an immediate consequence of the fact that (where has a standard t distribution) and the linearity of the expected value:As we have seen above, is well-defined only for and, as a consequence, also is well-defined only for .
The variance of a Student's t random variable is well-defined only for and it is equal to
It can be derived using the formula for the variance of affine transformations on (where has a standard t distribution):As we have seen above, is well-defined only for and, as a consequence, also is well-defined only for .
A Student's t random variable does not possess a moment generating function.
It is a consequence of the fact that (where 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).
There is no simple expression for the characteristic function of the Student's t distribution (see the comments above, for the standard case).
As for the standard t distribution (see above), there is no simple formula for
the distribution function
of a Student's t random variable
and it is usually necessary to resort to computer algorithms to compute the
values of
.
Most computer programs provide only routines for the computation of the
standard t distribution function (denote it by
).
In these cases we need to make a conversion, as
follows:For
example, the MATLAB
command: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.
The following sections contain more details about the t distribution.
A Student's t distribution with mean , scale and degrees of freedom converges in distribution to a normal distribution with mean and variance when the number of degrees of freedom becomes large (converges to infinity).
As explained before, if has a t distribution, it can be written aswhere is a standard normal random variable, and is a Chi-square random variable with degrees of freedom, independent of . Moreover, as explained in the lecture entitled Chi-square distribution, can be written as a sum of squares of independent standard normal random variables :When tends to infinity, the ratioconverges in probability to , by the Law of Large Numbers. As a consequence, by Slutsky's theorem, converges in distribution to which is a normal random variable with mean and variance .
As discussed above, if has a standard normal distribution, has a Gamma distribution with parameters and and and are independent, then the random variable defined ashas a standard Student's t distribution with degrees of freedom.
Given the same assumptions on and , define a random variable as follows:where is a constant. is said to have a non-central standard Student's t distribution with degrees of freedom and non-centrality parameter . 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.
This section shows the plots of the densities of some random variables having a t distribution. The plots help us to understand how the shape of the t distribution changes by changing its parameters.
The following plot contains the graphs of two Student's t probability density functions:
the first graph (blue line) is the probability density function of a Student's t random variable with parameters , and ;
the second graph (red line) is the probability density function of a Student's t random variable with parameters , and .
By changing the mean from to , the shape of the density does not change, but the density is translated to the right (its location changes).
TIn the following plot:
the first graph (blue line) is the probability density function of a Student's t random variable with parameters , and ;
the second graph (red line) is the probability density function of a Student's t random variable with parameters , and .
By changing the scale parameter from to , the location of the graph does not change (it remains centered at ), but the shape of the graph changes (there is less density in the center and more density in the tails).
The following plot contains the graphs of two Student's t probability density functions:
the first graph (blue line) is the probability density function of a Student's t random variable with parameters , and ;
the second graph (red line) is the probability density function of a Student's t random variable with parameters , and .
By increasing the number of degrees of freedom from to , the location of the graph does not change (it remains centered at ) and its shape changes only marginally (the tails become thinner).
Below you can find some exercises with explained solutions.
Let be a normal random variable with mean and variance . Let be a Gamma random variable with parameters and , independent of . Find the distribution of the ratio
We can writewhere has a standard normal distribution and has a Gamma distribution with parameters and . Therefore, the ratiohas a standard Student's t distribution with degrees of freedom and has a Student's t distribution with mean , scale and degrees of freedom.
Let be a normal random variable with mean and variance . Let be a Gamma random variable with parameters and , independent of . Find the distribution of the random variable
We can writewhere has a standard normal distribution and has a Gamma distribution with parameters and . Therefore, the ratiohas a standard Stutent's t distribution with degrees of freedom.
Let be a Student's t random variable with mean , scale and degrees of freedom. Compute
First of all, we need to write the probability in terms of the distribution function of :Then, we express the distribution function of in terms of the distribution function of a standard Student's t random variable with degrees of freedom:so that:where the difference can be computed with a computer algorithm, for example using the MATLAB command
tcdf(0,6)-tcdf(-1/2,6)
Sutradhar, B. C. (1986) On the characteristic function of multivariate Student t-distribution, Canadian Journal of Statistics, 14, 329-337.
Most of the learning materials found on this website are now available in a traditional textbook format.