In this article:

How to Do a Chi Square Test in Google Sheets (2024 Update)

How to Do a Chi Square Test in Google Sheets

The CHISQ.TEST function can be used to perform the Chi-square test easily in Google Sheets:

The syntax for the function is CHISQ.TEST(actual_range, expected_range), where:

  • actual_range is the range of observed frequencies (your data without totals).
  • expected_range is the range of expected frequencies.

Here's how you can apply it:

Step 1: Organize Your Data

First, you need to organize your data into a contingency table format. Suppose you're looking at the relationship between Gender (Male/Female) and Preference for a new product (Like/Dislike). Your table might look something like this:

chi square test google sheets

Step 2: Calculate Expected Frequencies

Before using the CHISQ.TEST function, you need to calculate the expected frequencies for each category based on your total observations. The formula for expected frequency is: (Row Total * Column Total) / Grand Total.

For example, for the "Male (Like)" category:

Row Total for Male = 50

Column Total for Like = 45

Grand Total = 100

The expected frequency for Male who like the product would be (50 * 45) / 100 = 22.5.

You'll need to calculate this for each cell in your contingency table.

chi square test in google sheets

Step 3: Perform the Chi-Square Test

Assuming observed frequencies are in B2:C3 and expected frequencies are in E2:F3, your Chi-square formula will be:

=CHISQ.TEST(B2:C3, E2:F3)

how to do a chi square test in google sheets

Press Enter to execute the formula. This will give you the chi-square test statistic.

Step 4: Interpret the Results

The result of the chi-square test will give you a p-value.

  • If the p-value is less than your chosen significance level (usually 0.05), you can reject the null hypothesis, concluding that there is a significant association between the variables.
  • If the p-value is greater than your chosen significance level, you fail to reject the null hypothesis, indicating that there is not enough evidence to suggest a significant association between the variables.

We hope that this article has helped you and given you a better understanding of how to do a chi square test in Google Sheets. If you enjoyed this article, you might also like our articles on how to use Autocrat for Google Sheets and how to combine ARRAYFORMULA with FILTER in Google Sheets.

Automate repetitive tasks with Lido

Save hours on repetitive and tedious work. Lido is a new spreadsheet that connects your spreadsheets, forms, PDFs, and email inbox.

Trigger
Action
Select trigger
When a cell value in Google Sheets changes
Check Google Sheets for today's date
When a new row is added to Google Sheets
On new Google Form submission
Send me a daily reminder
On new Typeform submission
When a cell value in database changes
Check database for today's date
When a new row is added in database
When a new HubSpot customer is created
Select action
ADDCALENDAREVENT
Creates a one- or multiple-day calendar event with optional attendees
ADDHUBSPOT
Adds an object to Hubspot
ADDSLACKCHANNEL
Create a Slack channel, and optionally add a topic or members
CALLURL
Makes any HTTP request
CREATEGOOGLEDOC
Replaces [@column_name] values in a Google Doc with the corresponding table row's values
CREATEPDF
Replaces [@column_name] values in a Google Doc with the corresponding table row's values, then export it as a PDF
FETCH
Makes any HTTP request and returns the response
INSERTROWS
Inserts given array below defined values in given worksheet
SENDGMAIL
Sends an email using your Google account
SENDOUTLOOK
Sends an email using your Microsoft Outlook account
SENDSLACK
Sends a Slack message
SENDSMS
Sends an SMS message using your Twilio account
UPDATECELL
Updates cells with given values
UPDATEHUBSPOT
Updates a property of a Hubspot object
Trigger is required
Action is required
Get started