{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

b.lab-Ch7_8_9

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

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

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, Mean

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

View Full Document
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, Mean
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, Mean

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

View Full Document
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 0 10 20 30 40 50 End points of CIs CI count M. George Akritas Lab5: CIs, PIs, and Hypothesis Testing for: Proportions, Mean
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 0 . 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, Mean

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

View Full Document
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.test(x,n,p=0.5,alternative=”two.sided”,conf.level=0.95, correct=TRUE)” It gives the p -value for testing H 0 : p = 0 . 5 against the two-sided alternative, a 95% CI for
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### 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
Ask a homework question - tutors are online