An Animation of the t Distribution as a Mixture of Normals
December 7, 2013  (This article was first published on
Publishable Stuff, and kindly contributed to R-bloggers)  You’ve
probably heard about the t distribution. One good use for this
distribution is as an alternative to the normal distribution
that is more robust against outliers. But where does the t
distribution come from? One intuitive characterization of the t
is as a mixture of normal distributions. More specifically, as a
mixture of an infinite number of normal distributions with a
common mean $\mu$ but with precisions (the inverse of the
variance) that are randomly distributed according to a gamma
distribution. If you have a hard time picturing an infinite
number of normal distributions you could also think of a t
distribution as a normal distribution with a standard deviation
that “jumps around”.  Using this characterization of the t
distribution we could generate random samples $y$ from a t
distribution with a mean $\mu$, a scale $s$ and a d