Chi-Square Goodness of Fit Test:
From: | To: |
The Chi-Square Goodness of Fit Test determines whether observed categorical data matches an expected distribution. It compares observed counts to expected counts under a null hypothesis, calculating a test statistic (χ²) and corresponding p-value.
The calculator uses the Chi-Square formula:
Where:
The p-value is calculated from the chi-square distribution with degrees of freedom (df) equal to the number of categories minus 1.
Chi-Square Statistic: Larger values indicate greater deviation between observed and expected counts.
P-value: Probability of observing a test statistic as extreme as the one calculated, assuming the null hypothesis is true. Small p-values (typically <0.05) suggest rejecting the null hypothesis.
Tips: Enter observed and expected counts as comma-separated values. Both lists must have the same number of values. Expected counts should not be zero.
Q1: What are the assumptions of this test?
A: The test assumes random sampling, independence of observations, and that expected counts are at least 5 in each category.
Q2: What's the difference between goodness of fit and test of independence?
A: Goodness of fit compares one categorical variable to a distribution, while test of independence examines the relationship between two categorical variables.
Q3: What if my expected counts are less than 5?
A: Consider combining categories or using exact tests like Fisher's exact test.
Q4: How are degrees of freedom determined?
A: For goodness of fit, df = number of categories - 1 - number of estimated parameters.
Q5: Can I use this for continuous data?
A: No, you would need to bin continuous data into categories first.