Problem 2-4, Determining required sample size

From Statistics
Jump to navigation Jump to search

Problem Statement

A normally distributed random variable has an unknown mean μ and a known variance σ2=9. Find the sample size required to contruct a 95 percent confidence interval on the mean that has a total length of 1.0.

Solution

Figure 1: Confidence interval of the sample mean.

The problem is asking us how much data we need in order to say with 95% certainty that the mean μ is within a range of length one. We know from previous problems how to calculate the boundaries of a confidence interval for the sample mean, and we are told the total length of the confidence interval should be one. So we begin by subtracting the equation for the left edge of the confidence interval from the equation for the right edge, and setting this equal to one:

(μ+zα/2σN)(μzα/2σN)=1

Simplifying and solving for N, we get:

N=(2zα/2σ)2

We can plug in for σ with the value given in the problem statement, and we can solve for zalpha/2 with NORMSINV(1-0.05) in Excel, or qnorm(1-0.05/2) in R (we assumed an α of 0.05).

N=(21.963)2=138.29

We can't take a .29th of a datapoint, so we round up to N=139.