6.5 One and Two sample Inference for Proportions np>5; n(1-p)>5 n independent trials; X=# of successes p=probability of a success Estimate:
Mean and variance of When n is large, approximate probabilities for can be found using the normal distribution with the same mean and standard deviation.
An approximate confidence interval for p is
Sample Size The sample size required to have a certain probability that our error (plus or minus part of the CI) is no more than size ∆ is
If you know p is somewhere … If then maximum p(1-p)=0.3(1-0.3)=0.21 If then maximum p(1-p)=0.4(1-0.4)=0.24
Estimate p(1-p) by substitute p with the value closest to 0.5 (0, 0.1), p=0.1 (0.3, 0.4), p=0.4 (0.6, 1.0), p=0.6
Example A state highway dept wants to estimate what proportion of all trucks operating between two cities carry too heavy a load 95% probability to assert that the error is no more than 0.04 Sample size needed if 1.p between 0.10 to no idea what p is
Solution 1.∆=0.04, p=0.25 Round up to get n=451 2.∆=0.04, p(1-p)=1/4 n=601
Tests of Hypotheses Null H 0 : p=p 0 Possible Alternatives: H A : p<p 0 H A : p>p 0 H A : p p 0
Test Statistics Under H 0, p=p 0, and Statistic: is approximately standard normal under H 0. Reject H 0 if z is too far from 0 in either direction.
Rejection Regions Alternative Hypotheses H A : p>p 0 H A : p<p 0 H A : p p 0 Rejection Regions z>z z<-z z>z /2 or z<-z /2
Equivalent Form:
Example H 0 : p=0.75 vs H A : p 0.75 =0.05 n=300 x=206 Reject H 0 if z 1.96
Observed z value Conclusion: reject H 0 since z<-1.96 P(z 2.5)=0.0124< reject H 0.
Example Toss a coin 100 times and you get 45 heads Estimate p=probability of getting a head Is the coin balanced one? =0.05 Solution: H 0 : p=0.50 vs H A : p 0.50
Enough Evidence to Reject H 0 ? Critical value z =1.96 Reject H 0 if z>1.96 or z<-1.96 Conclusion: accept H 0
Another example The following table is for a certain screening test 91010Results Negative 80140Result Positive Cancer AbsentCancer Present FNA status Truth = surgical biopsy Total Total
Test to see if the sensitivity of the screening test is less than 97%. Hypothesis Test statistic
Check p-value when z= , p-value = Conclusion: we can reject the null hypothesis at level What is the conclusion?
One word of caution about sample size: If we decrease the sample size by a factor of 10, 911Results Negative 814Result Positive Cancer AbsentCancer Present FNA status Truth = surgical biopsy Total Total
And if we try to use the z-test, P-value is greater than 0.05 for sure (p=0.2026). So we cannot reach the same conclusion. And this is wrong!
So for test concerning proportions We want np>5; n(1-p)>5