lecture 15 dustin lueker. the width of a confidence interval ◦ increases as the confidence level...
TRANSCRIPT
![Page 1: Lecture 15 Dustin Lueker. The width of a confidence interval ◦ Increases as the confidence level increases ◦ Increases as the error probability decreases](https://reader036.vdocuments.site/reader036/viewer/2022082711/56649ee05503460f94bf0154/html5/thumbnails/1.jpg)
STA 291Summer 2010
Lecture 15Dustin Lueker
![Page 2: Lecture 15 Dustin Lueker. The width of a confidence interval ◦ Increases as the confidence level increases ◦ Increases as the error probability decreases](https://reader036.vdocuments.site/reader036/viewer/2022082711/56649ee05503460f94bf0154/html5/thumbnails/2.jpg)
The width of a confidence interval◦ Increases as the confidence level increases◦ Increases as the error probability decreases◦ Increases as the standard error increases◦ Increases as the sample size n decreases
Facts about Confidence Intervals
2STA 291 Summer 2010 Lecture
15
![Page 3: Lecture 15 Dustin Lueker. The width of a confidence interval ◦ Increases as the confidence level increases ◦ Increases as the error probability decreases](https://reader036.vdocuments.site/reader036/viewer/2022082711/56649ee05503460f94bf0154/html5/thumbnails/3.jpg)
n≥30
n<30
Confidence Intervals for μ
STA 291 Summer 2010 Lecture 15 3
n
sZx 2/
n
stx 2/
![Page 4: Lecture 15 Dustin Lueker. The width of a confidence interval ◦ Increases as the confidence level increases ◦ Increases as the error probability decreases](https://reader036.vdocuments.site/reader036/viewer/2022082711/56649ee05503460f94bf0154/html5/thumbnails/4.jpg)
Start with the confidence interval formula assuming that the population standard deviation is known
Mathematically we need to solve the above equation for n
Choice of Sample Size
4
MExn
sZx 2/
2
2/2
ME
Zsn
STA 291 Summer 2010 Lecture 15
![Page 5: Lecture 15 Dustin Lueker. The width of a confidence interval ◦ Increases as the confidence level increases ◦ Increases as the error probability decreases](https://reader036.vdocuments.site/reader036/viewer/2022082711/56649ee05503460f94bf0154/html5/thumbnails/5.jpg)
Confidence Interval for a Proportion The sample proportion is an unbiased and
efficient estimator of the population proportion◦ The proportion is a special case of the mean
5
n
ppZp
)ˆ1(ˆˆ 2/
STA 291 Summer 2010 Lecture 15
![Page 6: Lecture 15 Dustin Lueker. The width of a confidence interval ◦ Increases as the confidence level increases ◦ Increases as the error probability decreases](https://reader036.vdocuments.site/reader036/viewer/2022082711/56649ee05503460f94bf0154/html5/thumbnails/6.jpg)
6
Confidence Interval for p To calculate the confidence interval, we
use the Central Limit Theorem (np and nq ≥ 5)◦ What if this isn’t satisfied?
Instead of the typical estimator, we will use
Then the formula for confidence interval becomes
STA 291 Summer 2010 Lecture 15
p̂
4
2~
n
xp
4
)~1(~~2
n
ppZp
![Page 7: Lecture 15 Dustin Lueker. The width of a confidence interval ◦ Increases as the confidence level increases ◦ Increases as the error probability decreases](https://reader036.vdocuments.site/reader036/viewer/2022082711/56649ee05503460f94bf0154/html5/thumbnails/7.jpg)
Sample Size As with a confidence interval for the sample
mean a desired sample size for a given margin of error (ME) and confidence level can be computed for a confidence interval about the sample proportion
◦ This formula requires guessing before taking the sample, or taking the safe but conservative approach of letting = .5 Why is this the worst case scenario? Or the
conservative approach?
7
2
2/)ˆ1(ˆ
ME
Zppn
p̂
p̂
STA 291 Summer 2010 Lecture 15
![Page 8: Lecture 15 Dustin Lueker. The width of a confidence interval ◦ Increases as the confidence level increases ◦ Increases as the error probability decreases](https://reader036.vdocuments.site/reader036/viewer/2022082711/56649ee05503460f94bf0154/html5/thumbnails/8.jpg)
Comparison of Two Groups Two independent samples
◦ Different subjects in the different samples◦ Two subpopulations
Ex: Male/Female◦ The two samples constitute independent samples from two
subpopulations Two dependent samples
◦ Natural matching between an observation in one sample and an observation in the other sample Ex: Two measurements of the same subject
Left/right hand Performance before/after training
◦ Important: Data sets with dependent samples require different statistical methods than data sets with independent samples
8STA 291 Summer 2010 Lecture
15
![Page 9: Lecture 15 Dustin Lueker. The width of a confidence interval ◦ Increases as the confidence level increases ◦ Increases as the error probability decreases](https://reader036.vdocuments.site/reader036/viewer/2022082711/56649ee05503460f94bf0154/html5/thumbnails/9.jpg)
When would this be useful? Is the proportion who favor national health
insurance different for Democrats and Republicans?◦ Democrats and Republicans would be your two samples◦ Yes and No would be your responses, how you’d find
your proportions Is the proportion of people who experience pain
different for the two treatment groups?◦ Those taking the drug and placebo would be your two
samples Could also have them take different drugs
◦ No pain or pain would be your responses, how you’d find your proportions
9STA 291 Summer 2010 Lecture
15
![Page 10: Lecture 15 Dustin Lueker. The width of a confidence interval ◦ Increases as the confidence level increases ◦ Increases as the error probability decreases](https://reader036.vdocuments.site/reader036/viewer/2022082711/56649ee05503460f94bf0154/html5/thumbnails/10.jpg)
Confidence Interval for the Difference of Two Means Take independent samples from both groups Sample sizes are denoted by n1 and n2
◦ To use the large sample approach both samples should be greater than 30
Subscript notation is same for sample means
10
2
22
1
21
2/21 )(n
s
n
sZxx
STA 291 Summer 2010 Lecture 15
![Page 11: Lecture 15 Dustin Lueker. The width of a confidence interval ◦ Increases as the confidence level increases ◦ Increases as the error probability decreases](https://reader036.vdocuments.site/reader036/viewer/2022082711/56649ee05503460f94bf0154/html5/thumbnails/11.jpg)
Example In the 1992 General Social Survey, 350
subjects reported the time spent every day watching television. The sample yielded a mean of 4.1 and a standard deviation of 3.3.
In the 2004 survey, 1965 subjects yielded a sample mean of 2.8 hours with a standard deviation of 2.◦ Construct a 95% confidence interval for the
difference between the means in 1992 and 2004. Is it plausible that the mean was the same in both
years?
11STA 291 Summer 2010 Lecture
15
![Page 12: Lecture 15 Dustin Lueker. The width of a confidence interval ◦ Increases as the confidence level increases ◦ Increases as the error probability decreases](https://reader036.vdocuments.site/reader036/viewer/2022082711/56649ee05503460f94bf0154/html5/thumbnails/12.jpg)
Comparing Two Proportions For large samples
◦ For this we will consider a large sample to be those with at least five observations for each choice (success, failure) All we will deal with in this class
Large sample confidence interval for p1-p2
12
2
22
1
112/21
)ˆ1(ˆ)ˆ1(ˆˆˆ
n
pp
n
ppZpp
STA 291 Summer 2010 Lecture 15
![Page 13: Lecture 15 Dustin Lueker. The width of a confidence interval ◦ Increases as the confidence level increases ◦ Increases as the error probability decreases](https://reader036.vdocuments.site/reader036/viewer/2022082711/56649ee05503460f94bf0154/html5/thumbnails/13.jpg)
Example Two year Italian study on the effect of condoms
on the spread of HIV◦ Heterosexual couples where one partner was infected
with HIV virus 171 couples who always used condoms, 3 partners
became infected with HIV 55 couples who did not always use a condom, 8 partners
became infected with HIV◦ Estimate the infection rates for the two groups◦ Construct a 95% confidence interval to compare them
What can you conclude about the effect of condom use on being infected with HIV from the confidence interval? Was your Sex Ed teacher lying to you?
13STA 291 Summer 2010 Lecture
15