Confidence interval for the difference between two means TI-84

confidence interval (C.I.) for a difference between means is a range of values that is likely to contain the true difference between two population means with a certain level of confidence.

This tutorial explains the following:

  • The motivation for creating this confidence interval.
  • The formula to create this confidence interval.
  • An example of how to calculate this confidence interval.
  • How to interpret this confidence interval.

C.I. for the Difference Between Means: Motivation

Often researchers are interested in estimating the difference between two population means. To estimate this difference, they’ll go out and gather a random sample from each population and calculate the mean for each sample. Then, they can compare the difference between the two means.

However, they can’t know for sure if the difference in the sample means matches the true difference in the population means which is why they may create a confidence interval for the difference between the two means. This provides a range of values that is likely to contain the true difference between the population means.

For example, suppose we want to estimate the difference in mean weight between two different species of turtles. Since there are thousands of turtles in each population, it would be too time-consuming and costly to go around and weigh each individual turtle.

Instead, we might take a simple random sample of 15 turtles from each population and use the mean weight in each sample to estimate the true difference in mean weight between the two populations:

Confidence interval for the difference between two means TI-84

The problem is that our samples are random, so the difference in mean weights between the two samples is not guaranteed to exactly match the difference in mean weights between the two populations. So, to capture this uncertainty we can create a confidence interval that contains a range of values that are likely to contain the true difference in mean weight between the two populations.

C.I. for the Difference Between Means: Formula

We use the following formula to calculate a confidence interval for a difference between two means:

Confidence interval = (x1–x2) +/- t*√((sp2/n1) + (sp2/n2))

where:

  • x1, x2: sample 1 mean, sample 2 mean
  • t: the t-critical value based on the confidence level and (n1+n2-2) degrees of freedom
  • sp2: pooled variance
  • n1, n2: sample 1 size, sample 2 size

where:

C.I. for the Difference Between Means: Example

Suppose we want to estimate the difference in mean weight between two different species of turtles, so we go out and gather a random sample of 15 turtles from each population. Here is the summary data for each sample:

Sample 1:

  • x1 = 310
  • s1 = 18.5
  • n1 = 15

Sample 2:

  • x2 = 300
  • s2 = 16.4
  • n2 = 15

Here is how to find various confidence intervals for the true difference in population mean weights:

90% Confidence Interval:

(310-300) +/- 1.70*√((305.61/15) + (305.61/15)) =  [-0.8589, 20.8589]

95% Confidence Interval:

(310-300) +/- 2.05*√((305.61/15) + (305.61/15)) =  [-3.0757, 23.0757]

99% Confidence Interval:

(310-300) +/- 2.76*√((305.61/15) + (305.61/15)) =   [-7.6389, 27.6389]

Note: You can also find these confidence intervals by using the Statology Confidence Interval for the Difference Between Means Calculator.

You’ll notice that the higher the confidence level, the wider the confidence interval. This should make sense because wider intervals are more likely to contain the true population mean, thus we’re more “confident” that the interval contains the true population mean.

C.I. for the Difference Between Means: Interpretation

The way we would interpret a confidence interval is as follows:

There is a 95% chance that the confidence interval of [-3.0757, 23.0757] contains the true difference in mean weight between the two turtle populations.

Since this interval contains the value “0” it means that it’s possible that there is no difference in the mean weight between the turtles in these two populations. In other words, we cannot say with 95% confidence that there is a difference in mean weight between the turtles in these two populations.

In order to estimate the value of an unknown population mean, we can use a confidence interval based on the standard normal distribution (z-interval) or the t-distribution (t-interval). The choice is usually determined by the following rule:

  • Use a z-interval if: the population standard deviation is known and either the population is normally distributed or the sample size is larger than 30.
  • Use a t-interval if: the population standard deviation is unknown and either the population is normally distributed or the sample size is larger than 30.

In both cases, you can either use the formula to compute the interval by hand or use a graphing calculator (or other software). In this article, we will see how to use the TI83/84 calculator to calculate z and t intervals. Note: You can scroll down to see a video of these steps!

z-Intervals

A psychologist wants to estimate the amount of time college students spend browsing the internet each day. In a sample of 32 college students, the average time spent browsing the internet each day was about 67 minutes. If it is believed that the population standard deviation is 14 minutes, then calculate a 95% confidence interval to estimate the average time spent by college students browsing the internet each day.

In this example, we are told that the population standard deviation is thought to be 14 minutes and we have a large enough sample size. Therefore, a z-interval can be used to calculate the confidence interval.

Step 1: Go to the z-interval on the calculator.

Press [STAT]->Calc->7. Z-interval [ENTER]


Confidence interval for the difference between two means TI-84

Step 2: Highlight STATS

Since we have statistics for the sample already calculated, we will highlight STATS at the top. If you had a list of data instead, you could enter it into L1 and then use DATA. This is really only useful for small data sets.


Confidence interval for the difference between two means TI-84

Step 3: Enter Data

Notice that the calculator asks for sigma (the population standard deviation) – this should help you remember that you shouldn’t be using this unless you have sigma already.


Confidence interval for the difference between two means TI-84

Step 4: Calculate and interpret

Please make sure to read the explanation of how to interpret intervals in general. It is very easy to misunderstand what they truly mean! Highlight CALCULATE and then press ENTER to get your interval.


Confidence interval for the difference between two means TI-84
Here we are given our 95% confidence interval as (62.149, 71.851). This means that we are 95% confident that the true mean time that college students spend browsing the internet each day is between 62.15 minutes and 71.85 minutes. Note – there are many other ways to write this interval.

t-intervals

When the population standard deviation is unknown, we will use a t-interval to estimate the mean. Using a t-interval on the calculator has almost the same steps as using a z-interval, as you will see below.

For a statistics project, a student samples 37 high school teachers in her community and records how many years they have worked in education. In her sample, the average number of years was 14.2 with a standard deviation of 6.8. Use this information to estimate the mean number of years worked in education for all high school teachers in the community by calculating a 99% confidence interval.

Notice that in this example, the standard deviation is coming from the sample. Therefore, this is not sigma (the population standard deviation) but instead s (the sample standard deviation). This means we should use a t-interval for this estimate.

Step 1: Go to the t-interval on the calculator.

Press [STAT]->Calc->8. t-interval then [ENTER].


Confidence interval for the difference between two means TI-84

Step 2: Highlight STATS

Since we have statistics for the sample already calculated, we will highlight STATS at the top. If you had a list of data instead, you could enter it into L1 and then use DATA. This is really only useful for small data sets.


Confidence interval for the difference between two means TI-84

Step 3: Enter Data

Notice this time that the calculator asks for s – the sample standard deviation.


Confidence interval for the difference between two means TI-84

Step 4: Calculate and interpret

All you have to do is highlight CALCULATE and press ENTER.

Confidence interval for the difference between two means TI-84
So our 99% confidence interval is (11.16, 17.24). We can interpret this by saying “We are 99% confident that the mean number of years spent working in education by high school teachers in this community is between 11.16 years and 17.24 years.”

Video walkthrough

The following video will walk you through the steps for a t-interval or z-interval on the TI83/84 calculator.