Most students are told that the t-distribution approaches the normal distribution as the sample size increase, and that the difference is negligible even for moderately large sample sizes (> 30). However, for small samples the difference is important. You might recall that the t-distribution is used when the population variance is unknown. Simply put, estimating the variance from the sample leads to greater uncertainty and a more spread out distribution, as can be seen by the t-distributions heavier tails. This interactive visualization lets you explore how the t-distribution approaches the normal distribution as the degrees of freedom increase. It also shows the absolute and relative error when the normal approximation is used.

Slide to change degrees of freedom

Q-Q Plot

Absolute Error

Relative Error

Explanation

The Q-Q plot shows the t-distribution in relation to the normal distribution. The error plots shows the absolute and relative error when we use the normal distribution as an approximation for the t-distribution. It shows that the maximum absolute error is quite small, whereas the relative error grows larger and larger in the tails. The visualization also shows the probability of obtaining a value smaller than -1.64, which you might recognize as the critical Z value for a one tailed test. You can change this value by clicking on the distributions. If you increase the degrees of freedom you will see that probabilities quickly become similar. With the classical 30 degrees of freedom the visualization shows that p-value from the normal approximation (0.05) is really close to the p-value from the t-distribution (0.055).

Support my work

The content on this blog is shared for free under a CC-BY license. If you like my work and want to support it you can:

Buy me a coffeeBuy me a coffee (or use PayPal)

You can also sponsor my open source work using GitHub Sponsors

Suggestions

Have any suggestion? Send them to me, my contact info can be found here.