b.lab-Ch7_8_9 - Outline Explaining CIs CIs and Tests for...

Info iconThis preview shows pages 1–7. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Outline Explaining CIs CIs and Tests for Proportions CIs, Hypothesis Tests for the Mean, and PIs CIs, Hypothesis testing, and PIs in Regression Supplement to Reading Data in R Lab5: CIs, PIs, and Hypothesis Testing for: Proportions, Means and Linear Regression M. George Akritas M. George Akritas Lab5: CIs, PIs, and Hypothesis Testing for: Proportions, Means Outline Explaining CIs CIs and Tests for Proportions CIs, Hypothesis Tests for the Mean, and PIs CIs, Hypothesis testing, and PIs in Regression Supplement to Reading Data in R Explaining CIs CIs and Tests for Proportions Homework Lab Activity CIs, Hypothesis Tests for the Mean, and PIs Homework Lab Activity CIs, Hypothesis testing, and PIs in Regression Homework Lab Activity Supplement to Reading Data in R M. George Akritas Lab5: CIs, PIs, and Hypothesis Testing for: Proportions, Means Outline Explaining CIs CIs and Tests for Proportions CIs, Hypothesis Tests for the Mean, and PIs CIs, Hypothesis testing, and PIs in Regression Supplement to Reading Data in R I Each CI is a Bernoulli trial: It either contains the true parameter value or not. I After the CI interval is constructed, we talk about how confident we are, or what the chances are, for it to contain the true value. The following commands generate the figure in the next slide: > m = 50; n=20; p = .5; # toss 20 coins 50 times > phat = rbinom(m,n,p)/n # divide by n for proportions > SE = sqrt(phat*(1-phat)/n) # compute SE > alpha = 0.10; zstar = qnorm(1-alpha/2) # compute z / 2 > matplot(rbind(phat - zstar*SE, phat + zstar*SE), + rbind(1:m,1:m),type=l,lty=1) > abline(v=p) # draw vertical line at p=0.5 M. George Akritas Lab5: CIs, PIs, and Hypothesis Testing for: Proportions, Means Outline Explaining CIs CIs and Tests for Proportions CIs, Hypothesis Tests for the Mean, and PIs CIs, Hypothesis testing, and PIs in Regression Supplement to Reading Data in R 0.2 0.4 0.6 0.8 10 20 30 40 50 End points of CIs CI count M. George Akritas Lab5: CIs, PIs, and Hypothesis Testing for: Proportions, Means Outline Explaining CIs CIs and Tests for Proportions CIs, Hypothesis Tests for the Mean, and PIs CIs, Hypothesis testing, and PIs in Regression Supplement to Reading Data in R Homework Lab Activity R command for Z-intervals for a proportion I With T being the number of successes in n trials, set phat=T/n and use the commands phat qnorm(0.975)*sqrt(phat*(1-phat)/n) to obtain the 95% CI for p , i.e. the pair of values b p z . 025 q b p (1- b p ) n . I To obtain 90% or other CIs, adjust the 0.975 in the above command accordingly. M. George Akritas Lab5: CIs, PIs, and Hypothesis Testing for: Proportions, Means Outline Explaining CIs CIs and Tests for Proportions CIs, Hypothesis Tests for the Mean, and PIs CIs, Hypothesis testing, and PIs in Regression Supplement to Reading Data in R Homework Lab Activity Alternative CIs and Hypothesis Testing I With x being the binomial count, the command prop.test(x,n) is equivalent to the following:prop....
View Full Document

This note was uploaded on 01/11/2012 for the course STAT 401 taught by Professor Akritas during the Fall '00 term at Pennsylvania State University, University Park.

Page1 / 18

b.lab-Ch7_8_9 - Outline Explaining CIs CIs and Tests for...

This preview shows document pages 1 - 7. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online