Code
x <- seq(-7,7,length=1000)
hx <- dt(x, df = 5)
plot(x, hx, type="l", xlab="X", ylab="f(X)", xlim=c(-7,7), main="Student t density", sub = "(n = 5)")
The random variate \(X\) defined for the range \(-\infty \leq X \leq +\infty\), is said to have a Student t-Distribution (i.e. \(X \sim \text{t} \left( n \right)\)) with shape parameter \(n \in \mathbb{N}^+\).
\[ f(X) = \frac{\Gamma \left[ \frac{n+1}{2} \right]}{\Gamma \left[\frac{1}{2}\right] \Gamma \left[ \frac{n}{2} \right] } n ^{-\frac{1}{2}} \left[ 1 + \frac{X^2}{n} \right]^{-\frac{n+1}{2}} \]
The figure below shows an example of the Student t Probability Density function with \(n = 5\).
\[ \begin{align*} \mu_j &= 0 & \text{ j odd}\\ \mu_j &= n^{\frac{j}{2}} \frac{\text{B}\left[ \frac{j+1}{2}, \frac{n-j}{2} \right]}{\text{B}\left[ \frac{1}{2}, \frac{n}{2} \right]} & \text{ j even and } j < n \\ \mu_4 &= n^2 \frac{3}{(n-2)(n-4)} & n > 4 \end{align*} \]
\[ \text{E}(X) = 0 \]
for \(n > 1\).
\[ \text{V}(X) = \frac{n}{n-2} \]
for \(n > 2\) (undefined otherwise).
\[ \text{Med}(X) = 0 \]
\[ \text{Mo}(X) = 0 \]
\[ g_1 = 0 \]
for \(n > 3\) (undefined otherwise).
\[ g_2 = \frac{3n - 6}{n-4} \]
for \(n > 4\). Note that since \(\lim\limits_{n \rightarrow +\infty} g_2(n) = 3\), it follows that the Kurtosis of the t-Distribution is larger than the Kurtosis of the Normal Distribution.
There is a relationship between the t-Distribution with parameter \(n\) (degrees of freedom), denoted by t\((n)\), the unit normal variate N(0,1), and the Chi-squared Distribution with parameter \(n\), denoted by \(\chi^2(n)\):
\[ X = \frac{\text{N}(0,1)}{\sqrt{\frac{\chi^2(n)}{n}}} \sim \text{t}(n) \]
For \(n \geq 30\) the t-Distribution, denoted by t\((n)\), approximates the Standard Normal Distribution.
The Student t-Distribution with \(n\) degrees of freedom, represented by t\((n)\), is related to the Chi-squared Distribution:
\[ X^2 = \frac{\chi^2(1)}{\frac{\chi^2(n)}{n}} \text{ where } X \sim \text{t}(n) \]
The Student t-Distribution with \(n\) degrees of freedom, denoted by t\((n)\), is related to the Standard Normal and the Chi-squared Distribution:
\[ X^2 = \frac{\left[ \text{N}(0,1) \right]^2}{\frac{\chi^2(n)}{n}} \text{ where } X \sim \text{t}(n) \]
The Student t-Distribution with \(n\) degrees of freedom, represented by t\((n)\), is related to the Standard Normal and the Chi-squared Distribution:
\[ X = \frac{\left[ \text{N}(0,1) \right]}{\sqrt{\frac{\chi^2(n)}{n}}} \sim \text{t}(n) \]
The Student t-Distribution with \(n\) degrees of freedom, represented by t\((n)\), is related to the F-Distribution:
\[ X^2 = \text{F}(1,n) \text{ where } X \sim \text{t}(n) \]
As a consequence, the statistical F-test with 1 and \(n\) degrees of freedom, is equivalent to the t-test with \(n\) degrees of freedom.
The t-Distribution with one degree of freedom, denoted by t\((n=1)\), is equal to the two parameter Cauchy Distribution, denoted Cau2(0,1).
Consider \(n\) normal variates N\(_i \left(\mu, \sigma^2 \right)\) for \(i = 1, 2, …, n\) and define \(\bar{x}\) and \(s^2\) as
\[ \begin{cases} \bar{x} = \frac{1}{n} \sum_{i=1}^{n} \text{N}_i \left( \mu, \sigma^2 \right) \\ s^2 = \frac{1}{n} \sum_{i=1}^{n} \left[ \text{N}_i \left( \mu, \sigma^2 \right) - \bar{x} \right]^2 \end{cases} \]
and let
\[ \tau = \frac{\bar{x} - \mu}{\sqrt{\frac{s^2}{n-1}}} \]
then it can be shown that \(\tau \sim t(n-1)\). This is the basic form of the so-called one sample t-test.
Consider \(n_1\) normal variates N\(_{1i}\left( \mu_1, \sigma^2 \right)\) for \(i = 1, 2, …, n_1\) and \(n_2\) normal variates N\(_{2j}\left( \mu_2, \sigma^2 \right)\) for \(j = 1, 2, …, n_2\). In addition, let the variates \(\bar{x}_k\) and \(s_k^2\) for \(k = 1, 2\) be defined as
\[ \begin{cases} \bar{x}_k = \frac{1}{n_k} \sum_{l=1}^{n_k} \text{N}_{kl} \left( \mu_k, \sigma^2 \right) \\ s_k^2 = \frac{1}{n_k} \sum_{l=1}^{n_k} \left[ \text{N}_{kl} \left( \mu_k, \sigma^2 \right) - \bar{x}_k \right]^2 \end{cases} \]
and let
\[ \tau = \frac{\left( \bar{x}_1 - \bar{x}_2 \right) - \left( \mu_1 - \mu_2 \right) }{\sqrt{\frac{n_1 s_1^2 + n_2 s_2^2}{n_1 + n_2 - 2}} \sqrt{\frac{1}{n_1} + \frac{1}{n_2} } } \]
then it can be shown that \(\tau \sim t(n_1 + n_2 - 2)\). This is the basic form of the so-called independent two sample t-test.
The noncentral \(t\) distribution generalises the Student \(t\) by adding a noncentrality parameter \(\delta \neq 0\). It arises when testing a Normal mean under the alternative hypothesis and is the primary tool for power analysis and sample-size planning for \(t\)-tests (see Chapter 47).
Suppose we need the critical value for a two-sided 95% confidence interval with 12 degrees of freedom. We compute:
If we also want the tail probability for an observed test statistic \(t = 2.1\) (with 12 degrees of freedom), we can compute:
The Student t-Distribution is used for inference on means when the population variance is unknown and must be estimated from the sample. It is central to one-sample, paired-sample, and independent two-sample t-tests, and to confidence intervals for means in small to moderate samples.