confidence intervals for the population mean ( known)

25
Confidence Intervals Confidence Intervals for the for the Population Mean Population Mean ( ( Known) Known)

Post on 22-Dec-2015

238 views

Category:

Documents


3 download

TRANSCRIPT

Page 1: Confidence Intervals for the Population Mean  (  Known)

Confidence Intervals for theConfidence Intervals for thePopulation Mean Population Mean

(( Known) Known)

Page 2: Confidence Intervals for the Population Mean  (  Known)

Point Estimators

• There are many ways one could estimate – Take a sample of size n and

• Average all but the upper 5% and the lower 5%

• Take the median

• Take the mode

• Average all n observations -- x

Page 3: Confidence Intervals for the Population Mean  (  Known)

Unbiased Estimators/Consistency

• An unbiased estimateunbiased estimate is one where the long run average value equals the quantity you are trying to estimate

• A consistent estimatorconsistent estimator is one that gets closer and closer to the quantity you are trying to estimate as the sample size increases

is an unbiased and consistent estimator for

x

Page 4: Confidence Intervals for the Population Mean  (  Known)

CONFIDENCE INTERVALCONCEPTS

• We do not know the true mean, • To estimate , we take a random sample and

calculate • is a point estimate for

– But the chances that = are slim at best

• So a margin of error can be included with the

estimate to give a Confidence IntervalConfidence Interval estimate for μ

x

xx

Confidence IntervalConfidence IntervalError) of (Margin x

Page 5: Confidence Intervals for the Population Mean  (  Known)

A (1-)x100%Confidence Interval for μ

( known) is the probability that a confidence interval

does notdoes not contain μ

– Thus (1-) is the probability that a confidence interval doesdoes contain μ

• Confidence levels are usually expressed as percentages– Thus a 95% confidence interval would have = .05

Page 6: Confidence Intervals for the Population Mean  (  Known)

If samples of size n were repeatedly

taken, and 95% confidence intervals

according to the correct formula,

in the long run 95% of these intervals

would contain .

Precise Meaning of aConfidence Interval

A 95% confidence interval for A 95% confidence interval for means means

Page 7: Confidence Intervals for the Population Mean  (  Known)

zzpp Notation• zzpp is the z value that puts probability p in the

upper tailupper tail of the standard normal distribution

• Note that -z-zpp is the z value that puts probability p in the lower taillower tail

ZZ

EXCEL -z-zpp = NORMSINV(p)

Probability = pProbability = p

zzpp

EXCEL zzpp = NORMSINV(1-p)

- z- zp p

Probability = pProbability = p

Page 8: Confidence Intervals for the Population Mean  (  Known)

Interval Centered Around • Consider the random variable that has:

mean =mean = and standard deviation =standard deviation =

• Although we don’t know we don’t know , with probability (1-) we will draw a sample of size n, we will get an that lies between

X

n

σ

x

n

σzμ and

n

σzμ /2α/2α

Let’s illustrate this.Let’s illustrate this.

Page 9: Confidence Intervals for the Population Mean  (  Known)

n

σ σ

X

X

n

σzμ and

n

σzμ

Interval The

/2α/2α

/2/2/2/2

n

σzμ α/2

n

σzμ /2α

Interval Width

Page 10: Confidence Intervals for the Population Mean  (  Known)

Constructing (1-) x 100% Intervals

• Now suppose we want to estimate – Calculate – Construct interval

x

n

σzx α/2

As long as we get an in the yellow area (of the previous figure), this interval will contain

This occurs (1-) percent of the time.

x

Let’s illustrate this also.Let’s illustrate this also.

Page 11: Confidence Intervals for the Population Mean  (  Known)

X

n

σ σ

X

time theof )%α-(1 happens This

μ Contains Interval The

Area Yellow TheIn Is xWhen

xn

σzx /2α

n

σzx /2α

Interval Contains

Page 12: Confidence Intervals for the Population Mean  (  Known)

X

n

σ σ

X

time theof )%α-(1 happens This

μ Contains Interval The

Area Yellow TheIn Is xWhen

x

Interval Contains

n

σzx /2α

n

σzx /2α

Page 13: Confidence Intervals for the Population Mean  (  Known)

X

n

σ σ

X

time theof α% happens This

μContain Not Does Interval The

Area Purple TheIn Is xWhen

x

Interval Does Not Contain

n

σzx /2α

n

σzx /2α

Page 14: Confidence Intervals for the Population Mean  (  Known)

(1- )x100% Confidence Intervals

• The (1-)% Confidence Interval is then:

• z/2 = the z value that puts probability /2 in the upper tail

n

σzx

σzx

/2α

x/2α

Page 15: Confidence Intervals for the Population Mean  (  Known)

Important values for z/2

Confidence /2 z/2

90% .10 .05 1.645

95% .05 .025 1.960

99% .01 .005 2.576

Page 16: Confidence Intervals for the Population Mean  (  Known)

LCL (Lower Confidence Limit) =C1-CONFIDENCE(.05,12,22)

UCL (Upper Confidence Limit) =C1+CONFIDENCE(.05,12,22)

CONFIDENCE INTERVALS USING EXCEL

• Excel calculates by the command:

• Generating a 95% confidence interval for μ in Excel based on n = 22 observations assuming: – Data comes from a normal population with = 12– Sample mean is in cell C1

n

σz /2α

=CONFIDENCE(,,n)

Page 17: Confidence Intervals for the Population Mean  (  Known)

=AVERAGE(A2:A23)=AVERAGE(A2:A23)

=C1 – CONFIDENCE(.05,C2,C3)

=C1 + CONFIDENCE(.05,C2,C3)

Page 18: Confidence Intervals for the Population Mean  (  Known)

Example 1

Construct a 95% confidence interval for average battery life if the average of 100 batteries is 408 hours and the known standard deviation is 40 hours.

By EXCELBy EXCEL

LCL: =408 - CONFIDENCE(.05,40,100)

UCL: =408 + CONFIDENCE(.05,40,100)

100

4096.1408

Page 19: Confidence Intervals for the Population Mean  (  Known)

Example 2

• Construct a 90% confidence interval for average time of a flight from LAX to NYC if the average time of 64 flights is 330 minutes and the known standard deviation is 20 minutes.

64

20645.1330

By EXCELBy EXCEL

LCL: =330 - CONFIDENCE(.10,20,64)

UCL: =330 + CONFIDENCE(.10,20,64)

Page 20: Confidence Intervals for the Population Mean  (  Known)

Example 3

• Construct a 99% confidence interval for the time to play football games if the average time it took to play 16 games was 190 minutes with a known standard deviation of 10 minutes, assuming times follow a normal distribution

16

10576.2190

By EXCELBy EXCEL

LCL: =190 - CONFIDENCE(.01,10,16)

UCL: =190 + CONFIDENCE(.01,10,16)

Page 21: Confidence Intervals for the Population Mean  (  Known)

Example 4• Construct an 92% confidence interval for

Example 3 = .08 Thus /2 = .04 and we need z.04

– From table, the z value that puts .0400 in the upper tail (the z value that puts .9600 to its left) is z = 1.75 (approximately).

16

1075.1190

By EXCELBy EXCEL

LCL: =190 - CONFIDENCE(.08,10,16)

UCL: =190 + CONFIDENCE(.08,10,16)

Page 22: Confidence Intervals for the Population Mean  (  Known)

What If σ Is Unknown?

• We have assumed that σ is known.

• If σσ is unknown is unknown– If the sample size is smallsample size is small (normally (normally n < 30n < 30))

• Must assume that we are sampling from a normal distribution

– This will be discussed later.

• If we cannot assume that we are sampling from a normal distribution we cannot construct confidence intervals in this manner.

– If the sample size is largesample size is large (normally n n 30 30)• s can be used as a good approximation for σ for doing

hand calculations of confidence intervals– As shown later, we need not do this when using Excel

Page 23: Confidence Intervals for the Population Mean  (  Known)

Approximate (1-α)x100% Confidence Intervals for μ

When σσ is Unknown is Unknown, But n is Largen is Large

• An approximate confidence interval for μ is:

nzx

zx

/2

x/2

s

s

α

α

Page 24: Confidence Intervals for the Population Mean  (  Known)

Example 5

Construct an approximatte 95% confidence interval for average fill of liter bottles if a sample of 142 bottles is taken and the standard deviation of bottle fills is unknown.

142

55.96.15.33

oz. .55 s oz., 33.5 x sample, thisFor

Page 25: Confidence Intervals for the Population Mean  (  Known)

REVIEW• A (1-)x 100% confidence interval for when is known is:

• A (1-)x100% confidence interval means that if we repeatedly took samples of size n and constructed intervals using the above formula, in the long run (1-)% would contain

• zp is the z -value that puts probability p in the upper tail of the standard normal distribution

• Confidence Intervals Using Excel’s CONFIDENCE function

n

σzx /2α