CHITEST
TheCHITEST
function returns the test for independence. It tests the hypothesis that the categorical data in the observed range came from a distribution with the specified expected probabilities. This function is commonly used in statistical analysis to determine if two categorical variables are independent or not.
 How to use
CHITEST
formula?  Examples of using
CHITEST
formula CHITEST
formula not working? Similar formulas to
CHITEST
Usage
Use the CHITEST
formula with the syntax shown below, it has 2 required parameters:
 observed_range (required):
The range of observed frequencies to test for independence.  expected_range (required):
The range of expected frequencies to test for independence.
Examples
Here are a few example use cases that explain how to use theCHITEST
formula in Google Sheets.
Testing independence of two categorical variables
The CHITEST
function can be used to determine if two categorical variables are independent or not. For example, you can use this function to test if there is a relationship between gender and voting behavior in an election.
Checking goodness of fit
The CHITEST
function can also be used to test goodness of fit. For example, you can use this function to test if a set of observed values fits a given distribution.
Comparing observed and expected values
The CHITEST
function can be used to compare observed and expected values. For example, you can use this function to test if the observed values in an experiment match the expected values.
Common Mistakes
CHITEST
not working? Here are some common mistakes people make when using the CHITEST
Google Sheets Formula:
Incorrect range size
One common mistake is providing observed_range and expected_range with different sizes. Make sure both ranges have the same number of cells.
Incorrect range reference
Another common mistake is providing incorrect range references, resulting in incorrect calculations. Doublecheck that the ranges provided are correct.
Empty cells in range
If there are empty cells in the observed_range or expected_range, the CHITEST formula will return an error. Make sure there are no empty cells in the ranges.
Incorrect order of ranges
Make sure you are providing the ranges in the correct order. The observed_range should come before the expected_range.
Invalid input
If the input provided is not numerical, the CHITEST formula will return an error. Make sure the input is valid and in the correct format.
Related Formulas
The following functions are similar to CHITEST
or are often used with it in a formula:

CHISQ.DIST
The
CHISQ.DIST
function calculates the probability density function or the cumulative distribution function of a chisquared distribution. This function is commonly used in hypothesis testing to determine the significance of the difference between expected and observed values. The output of this function can be used to make decisions about the null hypothesis. 
CHISQ.DIST.RT
The
CHISQ.DIST.RT
function returns the righttailed probability of the chisquared distribution. This function is commonly used in hypothesis testing and to calculate confidence intervals for the variance of a normal distribution. The chisquared distribution is often used in goodnessoffit tests and tests of independence in contingency tables. 
CHISQ.INV
The CHISQ.INV function returns the inverse of the righttailed probability of the chisquared distribution. It is commonly used in hypothesis testing where the null hypothesis is that the observed data follows a chisquared distribution. The function returns the value of the chisquared random variable at which the cumulative distribution function equals the given probability. This function is useful for finding critical values after performing a chisquared test.

CHISQ.INV.RT
The
CHISQ.INV.RT
function returns the inverse of the righttailed probability of the chisquared distribution. It is commonly used in hypothesis testing and goodnessoffit analysis to determine whether an observed set of data is significantly different from a theoretical distribution. The function takes two arguments: the probability and the degrees of freedom.
Learn More
You can learn more about the CHITEST
Google Sheets function on Google Support.