Chi Squared Test


BigAlOz
11-14-2013, 08:38 PM
I am trying to work out how to use the gammadist to calculate the Chi-Squared probability.


Basically I have
1. A Least squares adjustment
2. I have the degrees of freedom (measurements - unknowns)
3. The adjustmnet calculates the variance factor (VF)
4. Need to do Chi squared test on the Variance factor
- Test that the VF is statistically within the expected probability
- Test the VF againt unity at the 95% probability

I tried this

Gammadist gm(m-u,0.5)
// m-u = degrees of freedom
// 0.5 used as the text suggested this

x = gm.p(VF)

// i am assuming this should be a number between 0 and 1
// *100 = %

y = gm.cdf(VF)
// don't know what this might mean

Anyway I don't get reasonable values using the above.

Could somebody please explain how this function should be called.

Thanks in Advance

Alan