Confidence Interval in Google Sheets

What is Confidence Interval in Google Sheets?

The confidence interval in Google Sheets is a range of values that may contain a true population mean. We can calculate a confidence interval for the mean of a dataset using the CONFIDENCE function. In statistical terms, the confidence interval is the probability of a population parameter falling between a set of values a certain number of times. It is commonly used in regression analysis and hypothesis testing.

In Google Sheets, a confidence interval is a range of values that likely contains the true population mean.

 A confidence interval is a range of values that may contain the population mean, typically within 95% to 99% level of confidence. It shows that we can find out a range of values where the majority of possibilities lie. Many statisticians use p-values in conjunction with confidence intervals to gauge statistical significance. We have a sample of the age of 15 people enrolled for a fitness program with an average of 26 and a standard deviation of 5. To find a 95% confidence interval, we first calculate the alpha value as 0.05 (as 1 – 0.95 = 0.05). Enter the following formula

=CONFIDENCE.T(0.05, 5, 15)

We get the margin of error for a 95% confidence interval as: 

Confidence Interval in Google Sheets Definition
Key Takeaways
  1. The confidence interval in Google Sheets is a range of values that may contain a true population mean.
  2. To calculate a confidence interval in Google Sheets, we use either the CONFIDENCE.T or CONFIDENCE.NORM function.
  3. The syntax of CONFIDENCE.T is CONFIDENCE.T(alpha, standard_deviation, size).
  4. The syntax of CONFIDENCE.NORM is CONFIDENCE.NORM(alpha, standard_deviation, pop_size).
  5. We use the CONFIDENCE.T function when the population standard deviation is unknown and you’re working with small sample sizes.

How to Use Confidence Interval Function in Google Sheets?

To find a confidence interval on Google Sheets, we follow these simple steps.

Step 1: Our first step is to organize the data. We should have the mean, standard deviation, and size of the sample. If there is no mean and Standard deviation Google Sheets given, it can be calculated using =AVERAGE(range) and =STDEV(range), respectively.

How to Use Confidence Interval Function 1

Step 2: Next, we must decide on the confidence level we wish to use for the interval, e.g., 93%, 95%, 99%, etc. The confidence level indicates the surety that the mean falls within the calculated interval. The alpha is also calculated based on the confidence level. For instance, a 96% confidence level has an alpha of 0.04 (1 – 0.96).

How to Use Confidence Interval Function 1-1

Step 3: In this step, we use the CONFIDENCE.T Function as shown below. The syntax of CONFIDENCE.T is:

=CONFIDENCE.T(alpha, std_dev, size)

Here,

  • alpha: It is the significance level (1 – confidence level).
  • std_dev: The standard deviation of your sample.
  • size: The sample size.

The CONFIDENCE.T function will return the margin of error.

How to Use Confidence Interval Function 1-2

Step 4: To find the confidence interval, one must subtract and add it to the sample mean as shown below.

  • Lower bound: Sample Mean – Margin of Error
  • Upper bound: Sample Mean + Margin of Error
How to Use Confidence Interval Function 1-3

You can do this directly in your spreadsheet by referencing the cell containing the sample mean and the cell with the CONFIDENCE.T function result as seen above.

Examples

Let’s look at how to calculate the confidence interval using the CONFIDENCE.T function with several different examples. We can use confidence intervals to check if the data from surveys are accurate.

Example #1 – Find 95% Confidence Interval in Google Sheets

In this interesting example, let us consider the sample mean of the number of victories of a basketball team as 34 per season. The standard deviation is around 5 victories. The sample size of the number of matches is 50. We take 95% confidence interval Google Sheets.

Step 1: Let us enter all the above details in a spreadsheet as shown below.

Confidence Interval in Google Sheets Example 1

Step 2: Let us calculate the confidence interval. The syntax is as follows:

=CONFIDENCE.T(B5, B2, B3).

Confidence Interval in Google Sheets Example 1-1

Step 3: Press Enter. The margin of error (B6) calculated is around 1.4209. Now, let us calculate the lower bound and upper bounds:

Lower bound: =B1 – B6

Upper bound: =B1 + B6

Confidence Interval in Google Sheets Example 1-2

Explanation

The margin of error calculated is approximately 1.42 wins. Therefore, the confidence interval for the true population mean number of wins of the basketball team, with 95% confidence, is between 32.57 and 35.42 wins. It means that we can have 95% confidence that the average wins of the basketball team per season fall within this range.

Example #2 – Confidence Intervals Using the t Distribution

Let us look at another interesting example where we use a t distribution. The t-distribution describes a set of observations where most of the observations fall near the mean, and the rest are the tails on either side. We use this for smaller sample sizes. In this example, we have the test scores of a sample of 20 students with an average score of 75 and a standard deviation of 15. Let us calculate a 97% confidence value.

Here, alpha is: 0.03 (since 1 – 0.97 = 0.03)

Step 1: Enter the details in a Google Sheet.

Confidence Interval in Google Sheets Example 2

Step 2: Enter the following formula: =CONFIDENCE.T(B5, B2, B3)

We get the margin of error for a 97% confidence interval for our data.

Confidence Interval in Google Sheets Example 2-1

Here, the output of the CONFIDENCE.T function is the margin of error, which you then add and subtract from the sample mean to calculate the confidence interval, as shone below.

When to use CONFIDENCE.T:

We use CONFIDENCE.T when we have a small sample size and are unsure about the population standard deviation

Confidence Interval in Google Sheets Example 2-2

Example #3 – Confidence Intervals Using the Normal Distribution

Let us see how to use the CONFIDENCE.NORM function in Google Sheets to find the confidence intervals for a normal distribution. The normal distribution is a probability distribution that is symmetric about the mean. Here, the data near the mean occur more frequently than data far from the mean. The normal distribution usually appears as a bell curve.

The syntax is: =CONFIDENCE.NORM(alpha, standard_deviation, sample_size)

Here, “alpha” is the significance level, “standard_deviation” is the standard deviation, and “sample_size” is the number of data points in your sample; this will give you the margin of error for your confidence interval based on a normal distribution.

We have a sample of 100 test scores of some students with an average score of 80 and a standard deviation of 12.

Step 1: Enter the details in a Google Sheet.

Confidence Interval in Google Sheets Example 3

Step 2: To calculate a 95% confidence interval:

Formula: =CONFIDENCE.NORM(B5,B2,B3)

Result: We get the margin of error for 95% confidence interval, which is then added and subtracted from the sample mean to find the full confidence interval range.

The output of CONFIDENCE.NORM is only half the confidence interval. To get the full range, add and subtract the result from the sample mean.

Confidence Interval in Google Sheets Example 3-1

The margin of error is approximately 2.38 wins. Therefore, the confidence interval for the true population of the mean score of the students with 95% confidence, is between 77.61 and 82.38. It means that we can have 95% confidence that the average score of the students fall within this range.

Important Things to Note

  1. When finding the CONFIDENCE.NORM, always fix the alpha value based on the required confidence level. For a 995% confidence interval, use 0.01.
  2. CONFIDENCE.NORM assumes you know the population standard deviation, which is not always possible. If there is only the sample data, we can use the “CONFIDENCE.T” function instead.

Frequently Asked Questions (FAQs)

What are the steps to calculate the confidence interval in Google Sheets?

Let us look at the steps to calculate the confidence interval as follows:

1. You can calculate the confidence interval using the CONFIDENCE function.

It has the following syntax:=CONFIDENCE(alpha, std_dev, size)
alpha: It is the significance level (1 – confidence level).
std_dev: The standard deviation of your sample.
size: The sample size.

This CONFIDENCE function returns the margin of error.
2. To calculate the confidence interval, add and subtract the margin of error from the sample mean.
3. The confidence interval is centered at a given sample mean.
4. It’s usually calculated at a confidence level of 95% or 99%.

How to calculate the confidence interval if the mean and standard deviation is not known?

To calculate the confidence interval in Google Sheets with just the sample data:

1) Calculate the mean of the dataset using the formula =AVERAGE(range)
2) Calculate the standard deviation using =STDEV.S(range)
3) Calculate the confidence value using the formula =CONFIDENCE(alpha, standard_dev, size).

Alpha = 1- confidence level
Calculate the confidence interval as Mean – Confidence to Mean + Confidence.

What are the uses of confidence intervals in Google Sheets?

1. It helps in estimating the population parameters’ range within which it is likely to fall.
2. It provides a range reflecting the uncertainty of a statistical estimate.
3. It is used to test hypotheses by checking if a parameter falls within a specified confidence interval.
4. It is used to assess the variability and potential error margin in predictions.
5. Confidence intervals are used to monitor processes in manufacturing to check if all product parameters remain within acceptable ranges.

Download Template

This article must help understand Confidence Interval in Google Sheets with its formulas and examples. You can download the template here to use it instantly.

Recommended Articles

Guide to What Is Confidence Interval in Google Sheets. We learn how to use confidence interval function in google sheets with examples & working template. You can learn more from the following articles.

Reader Interactions

Leave a Reply

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