Tutorials References Exercises Videos Menu
Create Website Get Certified Upgrade

Statistics - Student's T Distribution


The student's t-distribution is similar to a normal distribution and used in statistical inference to adjust for uncertainty.


Student's T Distribution

The t-distribution is used for estimation and hypothesis testing of a population mean (average).

The t-distribution is adjusted for the extra uncertainty of estimating the mean.

If the sample is small, the t-distribution is wider. If the sample is big, the t-distribution is narrower.

The bigger the sample size is, the closer the t-distribution gets to the standard normal distribution.

Below is a graph of a few different t-distributions.

Normal distribution and t-distribtutions with different degrees of freedom.

Notice how some of the curves have bigger tails.

This is due to the uncertainty from a smaller sample size.

The green curve has the smallest sample size.

For the t-distribution this is expressed as 'degrees of freedom' (df), which is calculated by subtracting 1 from the sample size (n).

For example a sample size of 30 will make 29 degrees of freedom for the t-distribution.

The t-distribution is used to find critical t-values and p-values (probabilities) for estimation and hypothesis testing.

Note: Finding the critical t-values and p-values of the t-distribution is similar z-values and p-values of the standard normal distribution. But make sure to use the correct degrees of freedom.



Finding the P-Value of a T-Value

You can find the p-values of a t-value by using a t-table or with programming.

Example

With Python use the Scipy Stats library t.cdf() function find the probability of getting less than a t-value of 2.1 with 29 degrees of freedom:

import scipy.stats as stats
print(stats.t.cdf(2.1, 29))
Try it Yourself »

Example

With R use the built-in pt() function find the probability of getting less than a t-value of 2.1 with 29 degrees of freedom:

pt(2.1, 29)
Try it Yourself »

Finding the T-value of a P-Value

You can find the t-values of a p-value by using a t-table or with programming.

Example

With Python use the Scipy Stats library t.ppf() function find the t-value separating the top 25% from the bottom 75% with 29 degrees of freedom:

import scipy.stats as stats
print(stats.t.ppf(0.75, 29))
Try it Yourself »

Example

With R use the built-in qt() function find the t-value separating the top 25% from the bottom 75% with 29 degrees of freedom (df):

qt(0.75, 29)
Try it Yourself »