Inferential Statistics • Lesson 9

Confidence Interval for Mean

Learn how to estimate an unknown population mean using a sample mean, standard error, and an appropriate critical value.

Population MeanStandard ErrorConfidence Interval

What Are We Estimating?

In many analytics problems, the quantity we want to know is the average value for an entire population.

For example, a company may want to estimate the average spending of all its customers. Measuring every customer may not be practical, so we collect a sample.

🌍

Population

Unknown mean μ

🔎

Sample

Sample mean x̄

🎯

Confidence Interval

Range for μ

What You Will Learn

1

Why we construct a confidence interval for a mean

2

The role of the sample mean

3

Standard error of the mean

4

Critical values

5

The z-based confidence interval

6

The t-based confidence interval

7

How sample size affects the interval

8

How to interpret the result correctly

Step 1

Start With the Sample Mean

Suppose an online store selects 100 customers and calculates their average monthly spending.

Sample size

n = 100

Sample mean

x̄ = ₹2,500

The sample mean of ₹2,500 is our point estimate of the unknown population mean μ.

Step 2

Calculate the Standard Error

The standard error measures the typical sampling variability of the sample mean.

SE = σ / √n

When the population standard deviation σ is known.

SE = s / √n

In practice, when σ is unknown, the sample standard deviation s is commonly used.

Step 3

Z-Based Confidence Interval

When the population standard deviation is known and the relevant assumptions are satisfied, a z-based interval can be written as:

x̄ ± z* × (σ / √n)

x̄

Sample mean

z*

Critical value

σ / √n

Standard error

Step 4

A Worked Example

Suppose an analyst wants a 95% confidence interval for average customer spending.

Sample mean

₹2,500

σ

₹600

n

100

95% z*

1.96

1. Calculate Standard Error

SE = 600 / √100 = 600 / 10 = ₹60

2. Calculate Margin of Error

ME = 1.96 × 60 = ₹117.60

3. Construct the Interval

₹2,500 ± ₹117.60

₹2,382.40 to ₹2,617.60

Step 5

What If σ Is Unknown?

In many real-world situations, the population standard deviation σ is unknown. Instead, we estimate it using the sample standard deviation s.

x̄ ± t* × (s / √n)

The t-distribution is used to obtain the critical value, with degrees of freedom typically equal to n − 1 for the one-sample mean procedure.

Practical rule:

When σ is unknown, the one-sample t procedure is commonly used, subject to its assumptions.

Step 6

Why Does Sample Size Matter?

For a mean, the standard error contains √n in the denominator. Therefore, increasing the sample size generally decreases the standard error.

n = 25

SE = ₹120

Example when σ = ₹600.

n = 100

SE = ₹60

Four times the sample size halves the SE.

n = 400

SE = ₹30

More data generally gives greater precision.

Step 7

Z vs t: The Basic Difference

Feature
z Procedure
t Procedure
Population SD
Known
Unknown
Scale estimate
σ
s
Critical distribution
Normal
t-distribution

The choice between procedures depends on what is known and on the assumptions of the problem. In typical one-sample mean inference, the t procedure is especially important when σ is unknown.

Interpreting the Result

Example:

95% CI = ₹2,382.40 to ₹2,617.60

The confidence interval procedure is designed so that, over many repeated random samples under the same conditions, about 95% of intervals constructed this way would contain the true population mean.

Avoid This Interpretation

Do not describe a 95% confidence interval as meaning that there is a 95% probability that the fixed population mean is inside this particular interval in the frequentist framework.

Real-World Analytics

Delivery Time Analysis

A food delivery company wants to estimate the average delivery time for all orders in a city.

Sample size

100

Mean

32 min

Standard deviation

8 min

Confidence

95%

Using a t-based procedure:

SE = 8 / √100 = 0.8 minutes

The appropriate t critical value depends on the confidence level and degrees of freedom. The final interval would be centered at the sample mean of 32 minutes.

Interactive Practice

Test Your Understanding

CHECK YOUR UNDERSTANDING

What population quantity is being estimated in a confidence interval for a mean?

CHECK YOUR UNDERSTANDING

Which value is the point estimate of the population mean?

CHECK YOUR UNDERSTANDING

If σ = 600 and n = 100, what is the standard error of the sample mean?

CHECK YOUR UNDERSTANDING

When the population standard deviation is unknown, which procedure is commonly used for a one-sample mean?

CHECK YOUR UNDERSTANDING

What generally happens to standard error when sample size increases?

CHECK YOUR UNDERSTANDING

A sample mean is ₹2,500 and the margin of error is ₹100. What is the interval?

Fill in the Blanks

Fill in the Blank

The sample ______ is commonly used as the point estimate of the population mean.

Fill in the Blank

For a known population standard deviation, the standard error of the mean is σ divided by the square root of ______.

Fill in the Blank

When σ is unknown, the one-sample ______ procedure is commonly used.

Fill in the Blank

A confidence interval is centered around the sample ______.

Analytics Challenge

Website Response Time

A sample of 100 website requests has a mean response time of 250 milliseconds. Assume the population standard deviation is known to be 40 milliseconds.

Calculate the standard error.

SE = 40 / √100

SE = 4 milliseconds

Using z* = 1.96 for a 95% interval, calculate the margin of error.

ME = 1.96 × 4 = 7.84 milliseconds

95% CI = 242.16 ms to 257.84 ms

Final Challenge

Two studies estimate the same population mean using the same confidence level.

Study A

n = 100

Margin of error = ₹120

Study B

n = 400

Margin of error = ₹60

What does this demonstrate?

With the other relevant factors held constant, the larger sample can produce a smaller standard error and therefore a narrower confidence interval.

Lesson Summary

✓

A confidence interval for a mean estimates the unknown population mean μ.

✓

The sample mean x̄ is the point estimate.

✓

Standard error measures sampling variability of the sample mean.

✓

When σ is known, a z-based procedure can be used under the appropriate assumptions.

✓

When σ is unknown, the one-sample t procedure is commonly used.

✓

Larger samples generally reduce standard error and improve precision.

✓

The confidence interval is centered on the sample mean.

✓

Correct interpretation of a confidence interval refers to the long-run performance of the interval-producing procedure.