Chi-Square Goodness of Fit Calculator
Determine if your observed data fits the expected distribution
| Category Label | Observed (O) | Expected (E) |
|---|---|---|
Calculation Results
How Do You Calculate Chi-Square?
The Chi-Square Goodness of Fit test is a statistical method used to determine how well observed data fits a specific distribution. It is widely used in genetics, marketing, and social sciences to compare categorical data.
The Chi-Square Formula
χ² = Σ [ (O – E)² / E ]
- O: The Observed value (the actual count recorded).
- E: The Expected value (the theoretical count predicted).
- Σ: Summation symbol (add up the results for all categories).
Step-by-Step Calculation Example
Imagine you roll a six-sided die 60 times. You expect each number to appear 10 times (Expected = 10). However, you observe the number '1' appeared 15 times.
- Calculate (O – E): 15 – 10 = 5
- Square the result: 5² = 25
- Divide by Expected: 25 / 10 = 2.5
- Sum: Repeat for all other numbers (2-6) and add the results together.
Understanding Degrees of Freedom (df)
Degrees of freedom represent the number of categories that are free to vary. For a goodness of fit test, the formula is df = n – 1, where 'n' is the number of categories. If you have 4 categories, your df is 3.