Excel - CHITEST Function



CHITEST Function

The Excel CHITEST function evaluates the chi-squared distribution between the actual range of field values in one table and the expected range of field values in another table. This function retrieves the tested value compared against the significant level of 0.05.

The CHITEST function has been replaced with the CHISQ.TEST function in Excel 2010.

Compatibility

The CHITEST function is inclusive in the following versions of Excel −

  • Excel for Microsoft 365
  • Excel for Microsoft 365 for Mac
  • Excel for the web
  • Excel 2021
  • Excel 2021 for Mac
  • Excel 2019
  • Excel 2019 for Mac
  • Excel 2016

Syntax

The syntax of CHITEST function is as follows −

CHITEST (actual_range,expected_range)

Arguments

You can use the following arguments with the CHITEST function −

Argument Description Mandatory / Optional
Actual_range It specifies field values containing actual observations. Mandatory
Expected_range It consists of the fraction of the multiplication of row sum and column sum to the total. Mandatory

Points to Remember

  • The analysts may identify the variation between the expected and actual range through this powerful function. The sample error is found if there is a significant difference between the two datasets.
  • If the CHITEST function generates zero value that means no significant difference between the expected range and the actual range of the datasets.
  • If any field value is zero in the expected range dataset, then the CHITEST generates #DIV/0! error.
  • If any data points specify a negative number in the expected range dataset, then the CHITEST generates #NUM! error.
  • Make sure that the number of field values should be the same between two defined datasets, otherwise, a #N/A error occurs.

Examples of CHITEST Function

Practice the following examples to learn the use of the CHITEST function in Excel.

Example 1

If the CHITEST function generates zero value that means no significant difference between the expected range and the actual range of the datasets.

Step 1 − Consider the sample dataset where the actual frequencies and expected frequencies of liking ICECREAM among adults and old people are specified in two tables.

Excel Chitest Function 1

Step 2 − You may enter the formula =SUM(B3:C3) in the D3 cell and press the Enter tab to obtain the result.

Excel Chitest Function 2

Excel Chitest Function 3

Step 3 − Place the cursor in the D3 cell to drag the + sign and drop it to the D8 cell to fill the remaining cell evaluating the row-wise summation of B and C columns.

Excel Chitest Function 4

Step 4 − You may enter the formula =Sum(B3:B7) in the B8 cell and press Enter to obtain the sum. The sum of rows and the sum of columns must be the same.

Excel Chitest Function 5

Excel Chitest Function 6

Step 5 − Similarly, enter the formula =SUM(C3:C7) in the C8 cell and press Enter to obtain the sum of the C column values.

Excel Chitest Function 7

Excel Chitest Function 8

Step 6 − You can use either the formula "=SUM(B8:C8)" or "=SUM(D3:D7)" in the D8 cell and press Enter. Here, both these formula produces the same value.

Excel Chitest Function 9

Excel Chitest Function 10

Step 7 − You can use the formula "Row Sum*Column Sum/Total" to compute the observed frequencies for every cell.

Enter the formula "=D3*B8/D8" in the B12 cell as given below −

Excel Chitest Function 11

And press the Enter.

Excel Chitest Function 12

Step 8 − Write the formula "=D4*B8/D8" in the B13 cell to get its resulting value.

Excel Chitest Function 13

Excel Chitest Function 14

Step 9 − Enter the formula "=D5*B8/D8" in the B14 cell and press Enter tab.

Excel Chitest Function 15

Excel Chitest Function 16

Step 10 − Similarly, use the same formula in the B15 and B16 cells to get the observed frequencies corresponding to these cells.

Excel Chitest Function 17

Step 11 − You may enter the formula "=D3*C8/D8" in the C12 cell and press the Enter tab.

Excel Chitest Function 18

Excel Chitest Function 19

Step 12 − You may write the formula "=D4*C8/D8" in the C13 cell and press the Enter tab.

Excel Chitest Function 20

Excel Chitest Function 21

Step 13 − Use a similar formula to get the computed values in the remaining cell ranges C14:C16.

Excel Chitest Function 22

As you can observe in the screenshot, the observed frequencies between the Adults and Old people have been calculated for different states.

Step 14 − Write the text "Significance Level" and its related value in the B18 and C18 cells. After that, you can enter the formula =CHITEST(B3:C7, B12:C16) in the C19 cell and press Enter.

Excel Chitest Function 23

Excel Chitest Function 24

As you may notice in the screenshot, the computed value is 0 < 0.05. You can predict that the null hypothesis is rejected and accept the alternative hypothesis in these defined datasets.

Example 2

If any field value is zero in the expected range dataset, then the CHITEST generates #DIV/0! error.

Solution

You may enter the formula =CHITEST(B3:C5,D3:E5) in the D6 cell.

Excel Chitest Function 25

Excel Chitest Function 26

As you can notice in the screenshot, the #DIV/0! error occurred while computing CHITEST function.

Example 3

If any data points specify a negative number in the expected range dataset, then the CHITEST generates #NUM! error.

Solution

Consider the sample dataset where Expected range comprises integers values as well as negative values. Enter the formula " =CHITEST(B3:C5,D3:E5)" in the C6 cell and press Enter to get the result.

Excel Chitest Function 27

Excel Chitest Function 28

Therefore, the CHITEST produces the #NUM! for these given range.

Example 4

The number of field values should be the same between two defined datasets, otherwise, a #N/A error occurs.

Solution

Consider the two datasets comprises of different dimensions and enter the formula "=CHITEST(B3:C5,B10:C11)" in the E14 cell.

Excel Chitest Function 29

And then press Enter to obtain the result.

Excel Chitest Function 30
Advertisements