How To Use CHIINV Function in Google Sheets

The CHIINV function in Google Sheets is useful when you need to calculate the inverse of the right-tailed chi-squared distribution of a given probability.

The chi-squared test is often used for testing hypotheses. This test can check the goodness of fit of a distribution of data and whether a particular data series is independent.

The rules for using the CHIINV function in Google Sheets are as follows:

  • The function requires two arguments: the probability associated with the chi-squared distribution and the degrees of freedom involved.
  • The function then outputs the inverse of the chi-squared distribution.

Let’s begin with a quick use case to understand further.

In this scenario, let’s assume that we are part of a study that aims to find out if a particular online ad is more effective for a particular gender. For example, our study may conclude that this particular ad is more effective for males since it’s more likely for men to click it than women.

In this example, our two variables are gender and whether the ad was clicked. We can use the chi-squared test to determine whether the dataset we have shows a dependency between two variables.  The chi-squared test allows us to see whether a sample follows a normal distribution or whether certain variables are related.

There is a certain cut-off where the results of the chi-squared test are statistically significant. If the probability of your chi-square distribution is less than the significance level, there is enough evidence to conclude that the observed data does not follow an expected distribution. Given a significance level of 0.05 and a degree of freedom of 1, we can already compute the cutoff for the chi-squared test.

With the CHIINV function, we can quickly calculate the cut-off for the chi-squared test. In this particular case, =CHIINV(0.05, 1) returns a value of 3.84. This means that we can consider a chi-test result larger than 3.84 as statistically significant.

Let’s try writing the CHIINV function ourselves in Google Sheets and later test out the function with an actual dataset.

 

 

The Anatomy of the CHIINV Function

The syntax of the CHIINV function is as follows:

=CHIINV(probability, degrees_freedom)

Let’s figure out what each part of this formula means.

  • = the equal sign is always used to start a function in a Google Sheets formula.
  • CHIINV() is our CHIINV function. It computes the inverse of the right-tailed chi-squared distribution of a probability.
  • probability refers to the probability associated with the right-tailed chi-squared distribution.
  • degrees_freedom refers to the number of degrees of freedom of the distribution.
  • degrees_freedom must be at least 1.
  • the degrees_freedom argument is treated as an integer. If a non-integer is given, CHIINV will truncate it to an integer automatically.

 

 

A Real Example of Using CHIINV Function

Let’s look at an actual example of the CHIINV function being used in a Google Sheets spreadsheet.

In the sheet below, we have the CHIINV formula used in cell B3. The chi-squared test result found in cell B10 is lower than the inverse computed, meaning that the results are not statistically significant.
Real example of CHIINV function in Google Sheets

 

In order to return the result in cell B3, we just have to use the following formula:

=CHIINV(B1, B2)

You can make your own copy of the worksheet above by clicking on the link below. 

If you’re ready to try out the CHIINV function in Google Sheets, let’s begin writing it ourselves!

 

 

How to Use CHIINV Function in Google Sheets

  1. First, to start using the CHIINV function, we must first select the cell to place our function’s output. In this example, we’ll output our results in column C, starting with cell C2.
    Selecting the cell to place our CHIINV Function in Google Sheets

  2. Next, with our first cell selected, we just simply type the equal sign ‘=‘ to begin the function, followed by ‘CHIINV(‘. 
  3. Afterward, a tooltip box may appear with instructions on how to use the CHIINV function. In case you want to hide it, you can click on the arrow in the top-right-hand corner of the box to remove it from view.
    Typing the CHIINV function into the our formula bar
  4. Next, we’ll have to enter our two arguments ( the probability and degrees of freedom). Afterward, we can simply hit Enter to evaluate the function.
    The CHIINV Function in Google Sheets returns the inverse of the chi-squared test probability
  5. Finally, to fill out the rest of the column, we can drag down the formula we wrote down in cell C2.
    Dragging down the formula to fill the row

 

 

Frequently Asked Questions (FAQ)

  1. Why does my formula return a #VALUE! error?
    All arguments for the CHIINV function must be numeric. Non-numeric values will lead to a #VALUE! error in your result. 
  2. Why does my formula return a #NUM! error?
    The CHIINV function will return a #NUM! error if the probability is not between 0 and 1. The function may also return a similar error if the degrees_freedom argument is less than 1.

That’s all you need to know about the CHIINV function in Google Sheets. This step-by-step guide shows how easy it is to find the inverse of the chi-squared distribution given a particular probability and the degrees of freedom. In conclusion, the inverse can help you find a cut-off for any chi-squared test you’ll conduct using your data.

The CHIINV function is just one of many mathematical functions available in Google Sheets. Hopefully, with this guide, you can now use this function together with the various other Google Sheets formulas available to create great worksheets that solve your use cases.

Make sure to subscribe to the Sheetaki newsletter to be the first to know about the latest guides and tutorials from us.

Get emails from us about Google Sheets.

Our goal this year is to create lots of rich, bite-sized tutorials for Google Sheets users like you. If you liked this one, you'd love what we are working on! Readers receive ✨ early access ✨ to new content.

 

0 Shares:
Leave a Reply

Your email address will not be published. Required fields are marked *

You May Also Like