Biostatistics Study NotesFrom concepts and derivations to interpretation

CHAPTER 02 · TOPIC 05

t Distribution

Learn standardization when the population standard deviation is unknown and how degrees of freedom control the tails.

On this page
  1. How is the t-distribution created?
  2. Difference between t distribution and standard normal distribution
  3. How do degrees of freedom affect the t-distribution?
  4. When should you use the t-distribution?
  5. Probability density function of t distribution

The t-distribution, also known as the Student's t-distribution, describes the variation in the standardized value of the sample mean when the population standard deviation is unknown. This name comes from William Sealy Gosset, who published under the pseudonym ``Student.''

How is the t-distribution created?#

The t-distribution can consist of a standard normal variable Z and a chi-square variable U that is independent of Z and has ν degrees of freedom. The denominator U/ν represents the uncertainty in estimating the variance from the sample data.

Consists of standard normal variables and chi-square variablesT=ZU/νtνT=\frac{Z}{\sqrt{U/\nu}}\sim t_{\nu}
t-statistic for one-sample meanT=XˉμS/ntn1T=\frac{\bar X-\mu}{S/\sqrt n}\sim t_{n-1}
symbolmeaning
TRandom variable or t-statistic that follows a t-distribution
Zstandard normal variable
Uchi-square variable independent of Z
νdegrees of freedom of t distribution
sample mean
μpopulation mean or hypothetical mean
SSample standard deviation to estimate unknown σ
nsample size. For one sample, ν=n−1

Difference between t distribution and standard normal distribution#

Both the t distribution and the standard normal distribution are symmetrical around 0 and have a bell shape. The difference is that the t-distribution has thicker tails, and values ​​farther from the center are more likely to appear. This reflects the additional uncertainty when the population standard deviation is unknown and is estimated using the sample standard deviation.

comparisonstandard normal distributiont distribution
center00
shapeLeft-right symmetrical/bell-shapedLeft-right symmetrical/bell-shaped
hemrelatively thinThe lower the degree of freedom, the thicker it is.
parameter that determines the shapeFixed to N(0,1)degree of freedom ν
Main usage scenariosWhen the population standard deviation is known or normal approximation is usedWhen the population standard deviation is unknown and estimated using the sample standard deviation

How do degrees of freedom affect the t-distribution?#

When the degrees of freedom are low, there is less independent information available to estimate the standard deviation, and the uncertainty is greater, so the t-distribution also has thicker tails. As the sample size and degrees of freedom increase, the estimation of the population standard deviation by the sample standard deviation generally becomes more stable, and the t distribution approaches the standard normal distribution.

t density curves with 1, 2, 3, 5, 10, and 100 degrees of freedom compared with the standard normal distribution
At low degrees of freedom, the t distribution has a lower center and heavier tails. As the degrees of freedom increase, it approaches the standard normal distribution N(0,1).Source: Created for this site from the t density function

When should you use the t-distribution?#

  • Estimate the population mean from one sample mean
  • Compare the means of two independent groups
  • Compare mean differences for paired or repeated measures data
  • Test regression coefficients and correlation coefficients
  • Create a confidence interval for the population mean or regression coefficient

Probability density function of t distribution#

The t-distribution with ν degrees of freedom has the following probability density function: Since the formula is centered at 0 and includes only t², positive and negative t values ​​with the same absolute value have the same density. This corresponds to the left-right symmetry of the t-distribution.

f(t)=Γ ⁣((ν+1)/2)νπΓ ⁣(ν/2)(1+t2ν)(ν+1)/2,<t<f(t)=\frac{\Gamma\!\left((\nu+1)/2\right)}{\sqrt{\nu\pi}\,\Gamma\!\left(\nu/2\right)}\left(1+\frac{t^2}{\nu}\right)^{-(\nu+1)/2},\qquad -\infty<t<\infty
symbolmeaning
f(t)Probability density of t distribution at position t
tt random variable that takes any real number
νdegrees of freedom of t distribution
ΓGamma function that extends the concept of factorial
πPi
Supplement: Derivation of t density function

Step 1: Starting from the definition of the t variable

Assume that Z follows a standard normal distribution and U follows a chi-square distribution with ν degrees of freedom, and both are independent. Define T=Z/√(U/ν) and leave an auxiliary variable V=U to find the density of T.

Variable conversionT=ZU/ν,V=UT=\frac{Z}{\sqrt{U/\nu}},\qquad V=U
Inverse transformationZ=TV/ν,U=VZ=T\sqrt{V/\nu},\qquad U=V
Jacobian(z,u)(t,v)=vν\left|\frac{\partial(z,u)}{\partial(t,v)}\right|=\sqrt{\frac{v}{\nu}}

Due to independence, the simultaneous density of Z and U can be expressed as the product of the two densities. Multiplying by Jacobian after variable transformation gives the joint density of T and V.

fT,V(t,v)=fZ ⁣(tv/ν)fU(v)vνf_{T,V}(t,v)=f_Z\!\left(t\sqrt{v/\nu}\right)f_U(v)\sqrt{\frac{v}{\nu}}

Step 2: Integrate Out the Auxiliary Variable V

Substituting the standard normal and chi-square densities and integrating for all possible v>0 leaves only T marginal densities.

fT(t)=12πν2ν/2Γ(ν/2)0v(ν+1)/21exp ⁣[v2(1+t2ν)]dvf_T(t)=\frac{1}{\sqrt{2\pi\nu}\,2^{\nu/2}\Gamma(\nu/2)}\int_0^{\infty}v^{(\nu+1)/2-1}\exp\!\left[-\frac{v}{2}\left(1+\frac{t^2}{\nu}\right)\right]dv

The integral part is in the form of a Gamma integral. It can be simplified directly using the following relation:

0va1ebvdv=Γ(a)ba,a>0, b>0\int_0^{\infty}v^{a-1}e^{-bv}\,dv=\frac{\Gamma(a)}{b^a},\qquad a>0,\ b>0

Step 3: Obtain the t Density

fT(t)=Γ ⁣((ν+1)/2)νπΓ ⁣(ν/2)(1+t2ν)(ν+1)/2,<t<f_T(t)=\frac{\Gamma\!\left((\nu+1)/2\right)}{\sqrt{\nu\pi}\,\Gamma\!\left(\nu/2\right)}\left(1+\frac{t^2}{\nu}\right)^{-(\nu+1)/2},\qquad -\infty<t<\infty

Therefore, the t-density is derived from the standard normal density, the chi-square density, and the definition of T. The Gamma function appears because the part that integrates and eliminates the chi-square variable has the form of a Gamma function.

symbolMeaning in derivation
VAuxiliary variable left for variable conversion, equal to U
fT,VSimultaneous density of T and V
∂(z,u)/∂(t,v)Jacobian determinant of multivariable transformation
a、bTemporary parameter when applying Gamma integral
Supplement: What is the Gamma function?

The Gamma function extends the concept of factorials to non-positive integers. For a positive integer n, Γ(n)=(n−1)!, so it plays a role similar to a factorial in density functions that include non-integer parameters, such as half the degrees of freedom.

Gamma function definitionΓ(a)=0xa1exdx,a>0\Gamma(a)=\int_0^{\infty}x^{a-1}e^{-x}\,dx,\qquad a>0
recurrence formulaΓ(a+1)=aΓ(a)\Gamma(a+1)=a\,\Gamma(a)
Relationship with factorialΓ(n)=(n1)!,n=1,2,3,\Gamma(n)=(n-1)!,\qquad n=1,2,3,\ldots
Frequently used half-integer valuesΓ ⁣(12)=π\Gamma\!\left(\frac12\right)=\sqrt{\pi}

In the density function of the t-distribution, the Gamma function mainly appears in the constant coefficient in the front and adjusts the curve according to the degrees of freedom, making the total area under the density curve 1. You don't need to manually calculate the Gamma function to understand the t-distribution, but knowing its role will help you avoid mistaking Γ for a meaningless decoration.