Presentation is loading. Please wait.

Presentation is loading. Please wait.

INTRODUCTION TO ECONOMIC STATISTICS Topic 8 Confidence Intervals These slides are copyright © 2010 by Tavis Barr. This work is licensed under a Creative.

Similar presentations


Presentation on theme: "INTRODUCTION TO ECONOMIC STATISTICS Topic 8 Confidence Intervals These slides are copyright © 2010 by Tavis Barr. This work is licensed under a Creative."— Presentation transcript:

1 INTRODUCTION TO ECONOMIC STATISTICS Topic 8 Confidence Intervals These slides are copyright © 2010 by Tavis Barr. This work is licensed under a Creative Commons Attribution- ShareAlike 3.0 Unported License. See http://creativecommons.org/licenses/by-sa/3.0/ for further information.http://creativecommons.org/licenses/by-sa/3.0/

2 Confidence Intervals ● The Central Limit Theorem tells us how the sample mean is distributed if we know the population mean and standard deviation ● We saw that if we don't know the population standard deviation, we can substitute the sample standard deviation ● What if we don't know the population mean?

3 Confidence Intervals ● What if we don't know the population mean? Original Formula: X is Normally distributed with mean µ and standard error s/√n Originally, X is unknown: We can re-formulate this to say that X-µ is Normally distributed with mean 0 and standard error s/√n With Normal, we can add and subtract: If we assume that X is known and µ is the random variable, µ must be Normal with mean X and standard error s/√n Make the unknown, multiply by - 1:

4 Confidence Intervals ● What if we don't know the population mean? ● We know that it's normally distributed with mean X and standard deviation ● So we can't guess it exactly, but we know that it lies in a certain range with a certain probability.

5 P(-1.65<z<1.65)=0.9 Confidence Intervals z f(z) -2 - + +2 ● Suppose we want to pick a symmetric interval around and figure out how often a Normally distributed variable will lie within that interval.

6 P(-1.645<z<1.645) =0.9 Confidence Intervals z f(z)f(z) -2 - + +2 ● A normally distributed variable with mean and std. deviation will be between -1.645 and +1.645 90 percent of the time. ● This is called the 90 percent confidence interval.

7 P(-1.96<z<1.96) = 0.95 Confidence Intervals z f(z)f(z) -2 - + +2 ● A normally distributed variable with mean and standard deviation will be between - 1.96 and +1.96 95 percent of the time. ● This is called the 95 percent confidence interval.

8 P(-2.576 < z < 2.576)=0.99 Confidence Intervals z f(z)f(z) -2 - + +2 ● A normally distributed variable with mean and std deviation will be between -2.576 and +2.576 99 percent of the time. ● This is called the 99 percent confidence interval.

9 Example of Confidence Interval ● A survey of 2,938 clients of homeless service programs found that the average client earned $367 per month, with a std. deviation of $354. Source: http://www.huduser.org/publications/homeless/homelessness/ch_2e.html ● Standard error: 354/2938 0.5 = 354/54.2 = 6.53 Lower Bound of C.I.Upper Bound of C.I. 90%367 – 1.645(6.53) = 356.26367 + 1.645(6.53) = 377.74 95%367 – 1.960(6.53) = 354.20367 + 1.960(6.53) = 379.80 99%367 – 2.576(6.53) = 350.18367 + 2.576(6.53) = 383.82 350360370 380 390 90% - 356.25 to 377.74 95%: 354.20 to 379.80 99%: 350.18 to 383.82

10 Example of Confidence Interval ● Sample of 300 households. Mean meat consumption is 0.4 lbs/day, std. deviation is 0.2. ● Standard error is 0.2/300 0.5 = 0.2/17.32=0.023 Lower Bound of C.I.Upper Bound of C.I. 90%0.4 - 1.645(0.023) = 0.3620.4 + 1.645(0.023) = 0.438 95%0.4 - 1.960(0.023) = 0.3550.4 + 1.960(0.023) = 0.445 99%0.4 - 2.576(0.023) = 0.3410.4 + 2.576(0.023) = 0.459 0.30.350.4 0.45 0.5 90%: 0.362 to 0.438 95%: 0.355 to 0.445 99%: 0.341 to 0.459

11 How do we handle small samples? ● The Central Limit Theorem requires the sample size to be over 30 ● If the original variable is normally distributed, the sample mean will follow the t distribution ● Even if it isn't, pretending it is may give us some guidance

12 How do we handle small samples? ● For large samples, we multiply the standard error by the same number for all sample sizes: 90%1.645 95%1.96 99%2.576 ● For the t distribution, we use a different number depending on how many observations there are ● If our sample has n observations, then we use the t distribution with n-1 degrees of freedom

13 How do we handle small samples? ● Example: – A sample of students has the following test scores: 84, 76, 98, 34, 65, 76, 90, 92, 64, 87. – What is a 90% confidence interval for the population mean? ● We start by calculating the sample mean, sample standard deviation, and standard error the same way

14 How do we handle small samples? ● Sample mean is 76.6 ● Sample s.d. Is 18.7 ● So standard error is 18.7/√10=5.91 ● There are 10 observations so we use 10-1 = 9 degrees of freedom

15 How do we handle small samples? ● X = 76.6, SE = 5.91 ● 9 degrees of Freedom ● 90% Confidence interval: X- 1.833 x SE to X+1.833 x SE =76.6 – 1.833(5.91) to 76.6 + 1.833(5.91) = 65.78 to 87.42

16 Another Small Sample Example ● The longevity of 7 patients with a rare cancer after metastasis: 29 weeks 67 weeks 65 weeks 42 weeks 33 weeks 97 weeks 56 weeks ● What is a 95% confidence interval for the average longevity in the population?

17 Another Small Sample Example ● The longevity of 7 patients with a rare cancer after metastasis: X i – X(X i – X ) 2 29 weeks-26.57706.04 67 weeks11.42130.61 65 weeks9.4288.90Std Dev: 23.58 42 weeks-13.57184.18Std Err: 23..58/√7 = 8.91 33 weeks-22.57509.47 97 weeks41.421716.33 56 weeks0.420.18 Sum:389Sum:3335.71 Mean:55.57Variance:555.95 ● What is a 95% confidence interval for the average longevity in the population?

18 Another Small Sample Example Longevity of 7 patients with a rare cancer after metastasis Sample Mean:55.57 Std Error: 8.91 dof: 6 95% confidence interval: 55.57 ± 2.45(8.91) = 33.74 to 77.40

19 Confidence Interval for Population Proportion ● A proportion is simply the fraction of responses in a dataset that equal a certain number – For a dummy (0/1, yes/no) variable, the fraction of “yes” or “1” – For a category variable, e.g., the brand of car that a respondent drives, what percent drive a Buick? – For a more general discrete variable, e.g., what percentage of people have exactly two children?

20 Confidence Interval for Population proportion ● All proportion variables can be thought of or re-cast as dummy variables – 1 for “Drives a Buick” 0 for “Doesn't drive a a Buick” – 1 for “Has exactly two children” 0 for “Doesn't have exactly two children

21 Confidence Interval for Population Proportion ● Consider the question: “In a sample of a dummy variable size n, what is the probability that we observe the value “1” k times? ● This is a Binomial probability ● So a sample proportion is basically a Binomial variable divided by n

22 Confidence Interval for Population Proportion ● A sample proportion is basically a Binomial variable divided by n ● Remember that as n gets big, a Binomial variable approximates a Normal with mean np and standard deviation √np(1-p) ● So if we divide the variable by n, we get a Normal variable with mean p and standard deviation

23 Confidence Interval for Population Proportion ● If we divide the variable by n, we get a Normal variable with mean p and standard deviation √np(1-p) /n = √p(1-p)/n ● So the expected value of the sample proportion is the population proportion, and its standard error is √p(1-p)/n ● We can use this expected value and standard error to generate confidence intervals ● Requirement: np ≥ 5 and np(1-p) ≥ 5

24 Confidence Interval for Population Proportion ● Example: Suppose we decide that only 1% of our televisions should break within a year. ● We do a survey of 500 consumers and find that 8 have broken within the first year. ● What is the 90% confidence interval for the proportion that break within a year?

25 Confidence Interval for Population Proportion ● Example: A Zogby poll of 2,246 adults found that 83% think text messaging while driving should be illegal. Source: http://www.zogby.com/news/ReadNews.dbm?ID=1323 ● What is a 90 percent confidence interval for the fraction of adults that thinks text messaging while driving should be illegal?

26 Confidence Interval for Population Proportion ● Example: Suppose we decide that only 1% of our televisions should break within a year. ● We do a survey of 500 consumers and find that 8 have broken within the first year. ● What is the 90% confidence interval for the proportion that break within a year? – Proportion is p = 8/500 = 0.016 – Standard error is

27 Confidence Interval for Population Proportion ● What is the 90% confidence interval for the proportion that break within a year? – Proportion is p = 8/500 = 0.016 – Std Err: √p(1-p)/n=√0.016x0.984/500 = 0.056 – 90% confidence interval? Same method: Lower Bound: 0.016 – 1.645(0.0056) =.00676 Upper Bound: 0.016 + 1.645(0.0056) =.0252 0.0000.0050.0100.015 0.0200.0250.030 1.645 x 0.0056

28 Confidence Interval for Population Proportion ● A sample of 1000 likely voters finds that 560 support a campaign finance reform referendum ● What is a 99 percent confidence interval for the percentage of voters supporting the referendum?

29 Confidence Interval for Population Proportion ● A sample of 1000 likely voters finds that 560 support a campaign finance reform referendum ● What is a 99 percent confidence interval for the percentage of voters supporting the referendum? – Sample proportion: 560/1000 = 0.56 Standard error:

30 Confidence Interval for Population Proportion ● What is a 99 percent confidence interval for the percentage of voters supporting the referendum? – Sample proportion: 560/1000 = 0.56 Standard error: √0.56x0.44/1000 = 0.056 – 99% Conf. Interval: 0.56 ± 2.576(.0157) = 0.5195 to 0.6005 0.500.520.540.56 0.580.600.62 2.58 x 0.157


Download ppt "INTRODUCTION TO ECONOMIC STATISTICS Topic 8 Confidence Intervals These slides are copyright © 2010 by Tavis Barr. This work is licensed under a Creative."

Similar presentations


Ads by Google