The CHITEST function is used to perform the chi-squared test of independence in Excel. This statistical function is commonly utilized in data analysis and research to assess the association between two categorical variables, helping determine if there is a significant relationship between them.


=CHITEST(actual_range, expected_range)

actual_range The actual observed frequencies of categories in the data.
expected_range The expected frequencies of categories based on a specific distribution or hypothesis.


When delving into the realm of statistical analysis and investigating the interaction between categorical variables, the CHITEST function emerges as an indispensable tool in Excel. Its primary role revolves around the evaluation of independence between two categorical variables, providing valuable insights into the existence of a significant relationship between them, if any. This function is particularly valuable in conducting hypothesis tests and drawing conclusions about the underlying data generating process. Through the chi-squared test of independence, CHITEST empowers researchers, analysts, and data scientists to make informed decisions and interpretations based on rigorous statistical analysis and evidence. The chi-squared test of independence, facilitated by CHITEST, is a cornerstone in the arsenal of statistical methods, enabling thorough examinations of relationships within categorical data and contributing to the advancement of knowledge and understanding in diverse fields ranging from social sciences to business analytics.


Suppose you have data on the frequency of car color preferences (red, blue, green) among two different age groups (under 30, 30 and over). The observed frequencies are as follows: [[15, 20, 25], [30, 25, 20]]. You want to test whether car color preference and age group are independent of each other. The CHITEST formula would be as follows (assuming the expected frequencies are based on the assumption of independence between car color preference and age group): =CHITEST({15, 20, 25; 30, 25, 20}, {20, 20, 20; 25, 25, 25})

Suppose you are conducting a survey to analyze the relationship between gender (male, female) and voting preferences (candidate A, candidate B). The observed frequencies of voting preferences by gender are as follows: [[40, 60], [30, 70]]. To examine the independence of gender and voting preferences, you use the CHITEST function with the observed and expected frequencies.


What does the CHITEST function output represent?

The result of the CHITEST function represents the p-value associated with the chi-squared test of independence. This p-value is crucial in determining the statistical significance of the relationship between the categorical variables being analyzed. A low p-value suggests a rejection of the null hypothesis of independence, indicating a significant relationship between the variables.

How does the CHITEST function assess the relationship between categorical variables?

The CHITEST function uses the chi-squared test of independence to quantify the association between the observed and expected frequencies of categories in the data. It compares the observed frequencies with the expected frequencies and calculates a test statistic, which is then used to determine the p-value representing the strength of the relationship.

Can the CHITEST function be used for more than two categorical variables?

The CHITEST function is specifically designed to analyze the independence between two categorical variables. For the analysis of relationships involving more than two categorical variables, other statistical methods and tests, such as the chi-squared test of homogeneity or goodness of fit, may be employed.

Related functions