The CHISQ.TEST function in Google Sheets is a powerful statistical tool used to determine the probability that observed differences in a dataset are due to chance. This function is particularly useful in hypothesis testing, allowing users to analyze the relationship between categorical variables by evaluating the goodness of fit between observed and expected frequencies.
Syntax
CHISQ.TEST(observed_range, expected_range)
- observed_range: This is the range of cells that contains the frequencies observed in the dataset.
- expected_range: This is the range of cells that contains the frequencies expected based on the hypotheses being tested.
Example #1
=CHISQ.TEST(A1:A10, B1:B10)
In this example, the function will compare the observed frequencies in cells A1 through A10 against the expected frequencies in cells B1 through B10, providing a probability value. For instance, if the observed frequencies indicate a distribution and the expected frequencies are uniform, the function may return a value like 0.045, suggesting that there is a statistically significant difference between the observed and expected data.
Example #2
=CHISQ.TEST(C1:C5, D1:D5)
This call checks the relationship between two categorical variables, where C1:C5 represents observed counts and D1:D5 represents expected counts. If the function returns a value such as 0.012, it indicates strong evidence against the null hypothesis of independence.
Example #3
=CHISQ.TEST(E1:E3, F1:F3)
Here, the observed range consists of three data points in E1 through E3 and expected values in F1 through F3. If the result is, say, 0.087, it signifies moderate evidence, meaning the observed frequencies are reasonably in line with expectations but not conclusively different in a statistical sense.
Error handling
- N/A: This error occurs when the observed and expected ranges are not of the same size. Ensure both ranges match in dimensions.
- VALUE!: This indicates that one or both ranges contain non-numeric data. Ensure that the data sets only include numeric values for proper calculations.
- DIV/0!: This happens if the expected range contains null or zero values. Ensure that expected frequencies are valid and not zero to avoid this error.