27
1 Probability and Statistics Confidence Intervals

1 Probability and Statistics Confidence Intervals

Embed Size (px)

DESCRIPTION

3 doctors’ weights Standard deviation reflects the natural variability of weights in the population mean= 150 lbs; standard deviation = 15 lbs Relative frequency of 1000 observations of weight -1 SD+1 SD -2 SD +2 SD -3 SD +3 SD

Citation preview

Page 1: 1 Probability and Statistics Confidence Intervals

1

Probability and StatisticsConfidence Intervals

Page 2: 1 Probability and Statistics Confidence Intervals

2

Example 1: Weights of doctors

Experimental question: Are practicing doctors setting a good example for their patients in their weights?Experiment: Take a sample of practicing doctors and measure their weightsSample statistic: mean weight for the sampleIF weight is normally distributed in doctors with a mean of 150 lbs and standard deviation of 15, how much would you expect the sample average to vary if you could repeat the experiment over and over?

Page 3: 1 Probability and Statistics Confidence Intervals

3

doctors’ weights

Standard deviation reflects

the natural variability of weights in the

population

mean= 150 lbs; standard deviation =

15 lbs

Relative frequency of 1000 observations of weight

-1 SD +1 SD

-2 SD +2 SD

-3 SD +3 SD

Page 4: 1 Probability and Statistics Confidence Intervals

4

1000 doctors’ weights

average weight from samples of 2

-1 SD +1 SD-2 SD +2 SD

-3 SD +3 SD

4

Page 5: 1 Probability and Statistics Confidence Intervals

5 average weight from samples of 10

-1 SD +1 SD-2 SD +2 SD

-3 SD +3 SD

5

Page 6: 1 Probability and Statistics Confidence Intervals

6 average weight from samples of 100

-1 SD +1 SD-2 SD +2 SD

-3 SD +3 SD

6

Page 7: 1 Probability and Statistics Confidence Intervals

7

Provides Range of Values Based on Observations from 1 Sample

Gives Information about Closeness to Unknown Population Parameter

Stated in terms of Probability Never 100% Sure

Confidence Interval Estimation

Page 8: 1 Probability and Statistics Confidence Intervals

8

A Probability That the Population Parameter Falls Somewhere Within the

Interval.

Elements of Confidence Interval Estimation

Confidence Interval Sample Statistic

Confidence Limit (Lower)

Confidence Limit (Upper)

Population Parameter

Population Parameter

Page 9: 1 Probability and Statistics Confidence Intervals

9

Parameter = Statistic ± Its

Error

Confidence Limits for Population Mean

Error

Error

Error

= Error =

Page 10: 1 Probability and Statistics Confidence Intervals

10

Point estimate (measure of how confident we want to be) (standard error)

Confidence IntervalsThe value of the statistic in my

sample (eg., mean, odds ratio, etc.)

From a Z table or a T table, depending on the sampling distribution of the statistic.

Standard error of the statistic.

Page 11: 1 Probability and Statistics Confidence Intervals

11

Common “Z” levels of confidence

Commonly used confidence levels are 90%, 95%, and 99%

Confidence Level Z value

1.281.6451.962.332.583.083.27

80%90%95%98%99%

99.8%99.9%

Page 12: 1 Probability and Statistics Confidence Intervals

12

Approximate Confidence IntervalsApproximate Confidence Intervals The normal approximation can be used to compute approximate

confidence intervals if the sample size is large (n>30).

1.64 S.E

1.96 S.E

2.57 S.E

90% Confidence Interval

99 % Confidence Interval

95 % Confidence Interval

Margin of error

μ-1.96SE μ μ+1.96SE

Area under the normal curve = 95%

Page 13: 1 Probability and Statistics Confidence Intervals

13

Expressions for C.I.’sExpressions for C.I.’s

The 90% C.I. for the population mean:

The 95% C.I. for the population mean:

The 99% C.I. for the population mean:

s is the standard deviation of the n observations.

is the sample average of n observations in a simple random sample of size n, where n is large (>30)

Page 14: 1 Probability and Statistics Confidence Intervals

14

General remarks on C.I.’sGeneral remarks on C.I.’sThe purpose of a C.I. is to estimate an unknown parameter

with an indication of how accurate the estimate is and of how confident we are that the result is correct.

The methods used here rely on the assumption that the sample is randomly selected.

Any confidence interval has two parts: estimate ± margin of error

The confidence level states the probability that the method will give a correct answer, i.e. the confidence interval contains the “true” value of the parameter.

The margin of error of a confidence interval decreases as• The confidence level decreases• The sample size n increases

Page 15: 1 Probability and Statistics Confidence Intervals

15

1. Notice the trade off between the margin of error and the confidence level. The greater the confidence you want to place in your prediction, the larger the margin of error is (and hence less informative you have to make your interval).

2. A C.I. gives the range of values for the unknown population average that are plausible, in the light of the observed sample average. The confidence level says how plausible.

3. A C.I. is defined for the population parameter, NOT the sample statistic.

3. To make a margin of error smaller, you can take a larger sample!

Remarks:

Page 16: 1 Probability and Statistics Confidence Intervals

16

The true meaning of a confidence interval

In the following computer simulation:Imagine that the true population mean is 10. A computer took 50 samples of the same size from the same population and calculated the 95% confidence interval for each sample. Here are the results…

Page 17: 1 Probability and Statistics Confidence Intervals

17

95% Confidence Intervals

Page 18: 1 Probability and Statistics Confidence Intervals

18

3 misses = 6% error rate

For a 95% confidence interval, you can be 95% confident that you captured the true population value.

95% Confidence Intervals

Page 19: 1 Probability and Statistics Confidence Intervals

19

Confidence Intervals for our weight example…

(Sample statistic) ± (measure of how confident we want to be) ×

(standard error)95% CI: 160 ± 1.96 × 1.5 =

157–163 lbs99% CI: 160 ± 2.58 × 1.5 =

156–164 lbsNote how the confidence intervals do

not cross the null value of 150!

Page 20: 1 Probability and Statistics Confidence Intervals

20

Duality with hypothesis tests.

Null value95% confidence interval

Null hypothesis: Average weight is 150 lbs.Alternative hypothesis: Average weight is not

150 lbs.P-value < .05

150 151 152 153 154 155 156 157 158 159 160 161 162 163

Page 21: 1 Probability and Statistics Confidence Intervals

21

Null value99% confidence

interval

Null hypothesis: Average weight is 150 lbs.Alternative hypothesis: Average weight is not

150 lbs.P-value < .01

150 151 152 153 154 155 156 157 158 159 160 161 162 163

Duality with hypothesis tests.

Page 22: 1 Probability and Statistics Confidence Intervals

22

Practice problem1. Waiting times (in hours) at a popular restaurant are believed to be approximately normally distributed with a SD of 1.5 hr. during busy periods.

a. A sample of 20 customers revealed a mean waiting time of 1.52 hours. Construct the 95% confidence interval for the estimate of the population mean. b. Suppose that the mean of 1.52 hours had resulted from a sample of 32 customers. Find the 95% confidence interval. c. What effect does larger sample size have on the confidence interval?

Page 23: 1 Probability and Statistics Confidence Intervals

23

Common “Z” levels of confidence

Commonly used confidence levels are 90%, 95%, and 99%

Confidence Level Z value

1.281.6451.962.332.583.083.27

80%90%95%98%99%

99.8%99.9%

Page 24: 1 Probability and Statistics Confidence Intervals

24

Answer (a)a. A sample of 20 customers revealed a mean waiting time of 1.52 hours. Construct the 95% confidence interval for the estimate of the population mean.

1.521.96 1.520

=1.521.96 0.33( )=1.520.65

95% Confidence Interval is (0.87, 2.17)

Page 25: 1 Probability and Statistics Confidence Intervals

25

Answer (b, c)b. Suppose that the mean of 1.52 hours had resulted from a sample of 32 customers. Find the 95% confidence interval.

c. What effect does larger sample size have on the confidence interval?

Makes the confidence interval narrower (more precision).

1.521.96 1.532

=1.521.96 0.27( )=1.520.53

95% Confidence Interval is (0.99, 2.05)

Page 26: 1 Probability and Statistics Confidence Intervals

Example

Page 27: 1 Probability and Statistics Confidence Intervals

assignmentfinal book assignment of the term !!!!!

p. 307-310 6.4-6.9