Function cmb_random_chisquared

Function Documentation

static inline double cmb_random_chisquared(const double k)

Chi-squared distribution on [0, oo), modeling the sum of k squared standard normal distributions N(0, 1).

Used to model sample variances for normally distributed samples.

The parameter k is known as the ‘degrees of freedom’ when it is an integer value. Here generalized by permitting real-valued k, not just integers.

See also https://en.wikipedia.org/wiki/Chi-squared_distribution