Confidence Intervals: Mean Difference from Two Independent Samples

Instructor: Linda Richard

Linda is a National Board Certified math teacher with master's degrees in teaching and applied mathematics.

Learn how to find a probable range for the difference in means between two independent samples of data. Build a confidence interval using sample means, sample sizes, sample standard deviations, and t-tables.

Making Estimates

Joan runs an ice-cream empire. She suspects her factory located in Eastville is producing more ice cream per day than the one in Westland, but how can she be sure?

Inferential statistics can help! This branch of math uses data from a sample to make estimates about values from an entire population. A confidence interval is a range of values that represents likely brackets around the true population parameter. Let's help Joan find her confidence interval from her two stores.

Independent Samples

Joan gathered a few weeks' worth of daily ice cream production data from each factory. She'll use this data to build a probable range for the difference in production between the two facilities.

Before beginning, she verifies that her samples are independent, that is, that they don't affect each other. Joan's samples are indeed independent, because what happens in Eastville doesn't relate to what happens in Westland.

An example of samples that aren't independent is, say, math test results for a group of people before and after a training. The same people are taking each test, so the 'before' and 'after' samples are dependent on each other. Dependent samples require a different method from the one we'll be focusing on in this lesson.

The Point Estimate

Joan has 18 data points from Eastville and 21 from Westland. She starts her calculations by finding the mean (commonly called the average) of each data sample, calculating 357 gallons per day for Eastville and 345 for Westland.

She subtracts 345 from 357 to get 12 gallons. This initial estimate of the difference between the two factories is called a point estimate.

This is a good start, but she can't say definitively that Eastville produces 12 gallons more ice cream per day than Westland. This number came from just one set of sample data. If she took another set of samples, she'd get another result. Joan needs to do more calculations to find a likely range for the true production difference.

Margin of Error

Joan will calculate a value called the margin of error that accounts for any miscalculations, then add and subtract that from the point estimate to find the confidence interval.

For example, say that a scientist calculated a confidence interval of (36, 40) when measuring the difference in pulse rate between one group of people who'd exercised and one group who hadn't. The width of the confidence interval is 4 beats per minute. The margin of error is half the width of the interval, or 2 bpm. The point estimate is exactly in the middle of the interval, at 38 bpm.

confidence interval

The size of the margin of error depends on the spread of the data, the size of each sample, and how confident Joan wants to be about her interval.

Standard Deviation and Standard Error

If the data's very spread out, then it's more difficult to pin down an interval. To capture that, Joan calculates the standard deviation of each sample, a common measure of spread.

She finds standard deviations of 6.3 for Eastville and 8.6 for Westland, meaning Westland's data was less consistent than Eastville's. In math notation, the letter s denotes standard deviation, with subscripts differentiating between the two sites. Setting Eastville as site 1 and Westland as site 2, Joan writes s1 = 6.3 and s2 = 8.6.

Now, she combines the two standard deviations (and also sample size, denoted by n) into a single measure called the standard error. Here's the formula for standard error, with Joan's numbers plugged in (remember, n1 = 18 and n2 = 21).

standard error

Joan's standard error is about 2.39.

Critical Value

The final step in calculating the margin of error is to apply a multiplier called the critical value to the standard error. The critical value takes into account how confident we want to be that we have a good range of values, measured through a percentage called the confidence level.

Typical confidence levels are 90%, 95%, and 99%. The higher the confidence level, the more sure we are that our interval is good. Unfortunately, as the confidence level grows higher, the interval gets wider. We have to balance the confidence level with the width of the interval. Joan chooses a 95% confidence level, a very common choice.

The critical value also takes into account the sample sizes. The larger the sample, the more accurate the outcome. 100 days' worth of data gives a more accurate result than 3 days of data.

To unlock this lesson you must be a Member.
Create your account

Register to view this lesson

Are you a student or a teacher?

Unlock Your Education

See for yourself why 30 million people use

Become a member and start learning now.
Become a Member  Back
What teachers are saying about
Try it risk-free for 30 days

Earning College Credit

Did you know… We have over 200 college courses that prepare you to earn credit by exam that is accepted by over 1,500 colleges and universities. You can test out of the first two years of college and save thousands off your degree. Anyone can earn credit-by-exam regardless of age or education level.

To learn more, visit our Earning Credit Page

Transferring credit to the school of your choice

Not sure what college you want to attend yet? has thousands of articles about every imaginable degree, area of study and career path that can help you find the school that's right for you.

Create an account to start this course today
Try it risk-free for 30 days!
Create an account