Hi,

This code:

n=40
x=17
phat=x/n
SE=sqrt(phat*(1-phat)/n)
zstar=qnorm(0.995)
E=zstar*SE
phat+c(-E,E)

Gives this result:

[1] 0.2236668 0.6263332

The TI Graphing calculator gives the same result.

Whereas this test:

prop.test(x,n,conf.level=0.99,correct=FALSE)

Give this result:

0.2489036 0.6224374 

I'm wondering why there is a difference.

D.



--
View this message in context: 
http://r.789695.n4.nabble.com/prop-test-vs-hand-calculated-confidence-interval-tp4663245.html
Sent from the R help mailing list archive at Nabble.com.

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to