## Access

You are not currently logged in.

Access JSTOR through your library or other institution:

## If You Use a Screen Reader

This content is available through Read Online (Free) program, which relies on page scans. Since scans are not currently available to screen readers, please contact JSTOR User Support for access. We'll provide a PDF copy for your screen reader.

# Generating Random Variables With a $t$-Distribution

George Marsaglia
Mathematics of Computation
Vol. 34, No. 149 (Jan., 1980), pp. 235-236
DOI: 10.2307/2006231
Stable URL: http://www.jstor.org/stable/2006231
Page Count: 2
Let $\mathrm{RNOR}$ and $\mathrm{REXP} represent normal and exponential random variables produced by computer subroutines. Then this simple algorithm may be used to generate a random variable$T$with$t_n$density$c(1 + t^2/n)^{-1/2n-1/2}$, for any$n > 2$: Generate$A = \mathrm{RNOR}, B = A^2/(n - 2)$and$C = \mathrm{REXP}/(1/2n - 1)$until$e^{-B-C} \leqslant 1 - B$, then exit with$T = A\lbrack(1 - 2/n)(1 - B)\rbrack^{-1/2}\$.