| Statistics Toolbox | Search  Help Desk |
| chi2pdf | Examples |
Chi-square (
2) probability density function (pdf).
Syntax
Y = chi2pdf(X,V)
Description
chi2pdf(X,V) computes the
2 pdf with parameter V at the values in X. The arguments X and V must be the same size except that a scalar argument functions as a constant matrix of the same size of the other argument.
The degrees of freedom, V, must be a positive integer.
The chi-square pdf is:
2 density function with n degrees of freedom is the same as the gamma density function with parameters n/2 and 2.
If x is standard normal , then x2 is distributed
2 with one degree of freedom. If x1, x2, ..., xn are n independent standard normal observations, then the sum of the squares of the x's is distributed
2 with n degrees of freedom.
Examples
nu = 1:6; x = nu; y = chi2pdf(x,nu) y =The mean of the
2 distribution is the value of the parameter, nu. The above example shows that the probability density of the mean falls as nu increases.