The Chi-squared Distribution
The Chi-squared distribution has the probability density function (PDF):
$$f(x | k) = \frac{1}{2^{k/2} \Gamma(k/2)} x^{(k/2) - 1} \exp(-x/2), \quad x \geq 0,$$
where:
- \(k\)
is the degrees of freedom (\(k > 0\)), which determines the shape of the distribution.
The Chi-squared distribution is widely used in hypothesis testing and constructing confidence intervals, particularly in the context of variance estimation.
this function is sampling from proposal that has been constructed using srchisq_optimize, using the STORS algorithm.
By default, srchisq_custom() samples from Chi-squared Distribution df = 2.
The proposal distribution is pre-optimized at package load time using srchisq_optimize() with
steps = 4091, creating a scalable proposal centred around the mode.