jessicaraygun
jessicaraygun

Reputation: 315

Chi-Squared p-value calculation without using a chart [algorithm]

I'm trying to implement a Chi-Square test in combination with Marascuilo's procedure in JavaScript.

The hardest part about this is calculating the p-value for the Chi-Squared test. There are many calculators out there but I don't want to just plug in numbers, I want to know the math behind them.

This calculation in C looks like exactly what I'm looking for (besides needing to translate it to javascript), but the magic numbers make it hard to follow what is being computed.

On a higher level, what is the algorithm for calculating Chi-Squared p-value without using a chart?

Upvotes: 3

Views: 2813

Answers (1)

bionicCat
bionicCat

Reputation: 36

The code from

https://www.swogstat.org/stat/public/chisq_calculator.htm

could give you a hint

Upvotes: 1

Related Questions