- Story. If
,
, …,
are Gaussian distributed,
is
-distributed. See also the story of the Gamma distribution, below.
- Example. The sample variance of
independent and identically distributed Gaussian random variables, after scaling, is Chi-square distributed. This is the most common use case of the Chi-square distribution.
- Parameters. There is only one parameter, the degrees of freedom
.
- Support. The Chi-square distribution is supported on the positive real numbers.
- Probability density function.

- Usage
Package |
Syntax |
NumPy |
np.random.chisquare(nu) |
SciPy |
scipy.stats.chi2(nu) |
Stan |
chi_square(nu) |
- Related distributions. The Chi-square distribution is a special case of the Gamma distribution with
and
.
params = [dict(name='ν', start=1, end=20, value=10, step=0.01)]
app = distribution_plot_app(x_min=0,
x_max=40,
scipy_dist=st.chi2,
params=params,
x_axis_label='y',
title='Chi-square')
bokeh.io.show(app, notebook_url=notebook_url)