Function cmb_random_std_t_dist

Function Documentation

static inline double cmb_random_std_t_dist(const double v)

Student’s t-distribution for confidence intervals and t-tests.

Mean 0.0 for v > 1, variance v / (v - 2) for v > 2, otherwise undefined.

Can be used as a generic fat-tailed alternative to the standard normal distribution, where the degree of fat-tailedness depends on v. It is equal to a Cauchy distribution for v = 1, converging to a normal distribution as v -> oo.

See also https://en.wikipedia.org/wiki/Student%27s_t-distribution