How to reproduce MS Excel's CHIDIST function in MATLAB?
Returns the one-tailed probability of the chi-squared distribution. The χ2 distribution is associated with a χ2 test. Use the χ2 test to compare observed and expected values. For example, a genetic experiment might hypothesize that the next generation of plants will exhibit a certain set of colors. By comparing the observed results with the expected ones, you can decide whether your original hypothesis is valid.
Syntax
CHIDIST(x,degrees_freedom)
X is the value at which you want to evaluate the distribution.
Degrees_freedom is the number of degrees of freedom.
So, if I have column of numbers as x and use the formula like =CHIDIST(A1:A60,3), it returns 1 number.
I have tried to follow two advices from this thread, but I always get a vector of numbers, not one number.
CHIDIST(A1, 3). $\endgroup$