This is R program question for my statistic class. (So, I need to use RStudio).
ID: 3333190 • Letter: T
Question
This is R program question for my statistic class. (So, I need to use RStudio).
Binomial proportions in real life. On June 28, 2012 the U.S. Supreme Court upheld the much debated 2010 healthcare law, declaring it constitutional. A Gallup poll released the day after this decision indicated that 46% (465) of 1,012 Americans agreed with this decision. I. Use the survey results to compute a 95% confidence interval for the proportion of Americans in the population that agreed with the decision at the time. 2. What is the margin of error at the 95% confidence level? 3, What would the margin of error be at a 90% confidence level?Explanation / Answer
Answer:
1).
R code:
# CI for proportion
p=465/1012 ;p
var =p*(1-p)/1012 ; var
se =sqrt(var);se
E=qnorm(.975)*se ; E
p+c(-E,E)
R output:
p=465/1012 ;p
[1] 0.4594862
> var =p*(1-p)/1012 ; var
[1] 0.0002454137
> se =sqrt(var);se
[1] 0.01566568
> E=qnorm(.975)*se ; E
[1] 0.03070418
> p+c(-E,E)
[1] 0.4287820 0.4901903
95 CI = (0.4288, 0.4902)
2).
E=qnorm(.975)*se ; E
[1] 0.03070418
Margin of error at 95% level =0.0307
3)
E=qnorm(.95)*se ; E
[1] 0.02576776
Margin of error at 95% level =0.0258
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.