one population tests
play

One-Population Tests One Population Mean Proportion t Test Z - PowerPoint PPT Presentation

One-Population Tests One Population Mean Proportion t Test Z Test Z Test (1 & 2 (1 & 2 (1 & 2 tail) tail) tail) One-sample test of proportion Z Test of Proportion Exact method using Binomial Distribution


  1. One-Population Tests One Population Mean Proportion t Test Z Test Z Test (1 & 2 (1 & 2 (1 & 2 tail) tail) tail)

  2.  One-sample test of proportion  Z Test of Proportion  Exact method using Binomial Distribution

  3. Examples Example 1. You’re an accounting manager. A year-end audit  showed 4% of transactions had errors. You implement new procedures. A random sample of 500 transactions had 25 errors. Has the proportion of incorrect transactions changed? Use the 0.05 significance level. H 0 : p = 0.04 vs. H 1 : p ≠ 0.04 Example 2. A researcher claims that less than 20% of adults in  the U.S. are allergic to an herbal medicine. In a SRS of 25 adults, 3 say they have such an allergy. Does this support the researcher’s claim? Test at the 5% level. H 0 : p = 0. 2 vs. H 1 : p < 0. 2

  4. Binomial Distribution X ~ Binomial ( n, p )   n = number of trials, p = probability of positive outcome  Mean( X ) = n p ,  Var( X ) = n p (1- p ) ^ X/n = p = proportion of positive outcomes in a  sample of size n ˆ E p ( )  = p (population proportion) ˆ  Var( ) = p(1- p)/n p  By CLT, can be approximated by Normal: − − p ≥ ( 1 ) p p ( 1 ) 5 np ˆ ~ ( , ) if p N p n

  5. One-Sample Z Test for Proportion  Hypothesis: H 0 : p = p 0 v.s. H 1 : p ≠ p 0  Assumptions  Two Categorical Outcomes  # of success follows Binomial distribution ≥ 5 np q  Normal approximation can be used If 0 0

  6. One-Sample Z Test for Proportion  Hypothesis: H 0 : p = p 0 v.s. H 1 : p ≠ p 0  Assumptions  Two Categorical Outcomes  # of success Population Follows Binomial Distribution ≥ 5 np q  Normal Approximation Can Be Used If 0 0  Z-test statistic for proportion p p − ˆ Z = 0 p ( 1 p ) ⋅ − Hypothesized 0 0 population proportion n

  7. One-Sample Test of Proportion Example 1  You’re an accounting manager. A year-end audit showed 4% of transactions had errors. You implement new procedures. A random sample of 500 transactions had 25 errors. Has the proportion of incorrect transactions changed? Use the 0.05 significance level.

  8. One-Sample Z Test of Proportion  H 0 : p = p 0 = 0.04 Test Statistic:  H a : p ≠ p 0 =0.04  α = .05  n = 500 Decision:  Critical Value(s): Conclusion:

  9. One-Sample Z Test of Proportion  H 0 : p = p 0 = 0.04 Test Statistic:  H a : p ≠ p 0 =0.04  α = .05  n = 500 np q = − 500*0.04*(1 0.04) 0 0 = ≥ 19.2 5 Z Test Decision:  Critical Value(s): Conclusion:

  10. One-Sample Z Test of Proportion  H 0 : p = p 0 = 0.04 Test Statistic:  H a : p ≠ p 0 =0.04 25 − . 04 p p − ˆ  α = .05 500 Z ≈ 0 = = 1 . 14 p ( 1 p ) ⋅ − ⋅ − . 04 ( 1 . 04 )  n = 500 0 0 n np q = − 500 500*0.04*(1 0.04) 0 0 = ≥ 19.2 5 Z Test Decision:  Critical Value(s): Conclusion:

  11. One-Sample Z Test of Proportion  H 0 : p = p 0 = 0.04 Test Statistic:  H a : p ≠ p 0 =0.04 25 − . 04 p p − ˆ  α = .05 500 Z ≈ 0 = = 1 . 14 p ( 1 p ) ⋅ − ⋅ − . 04 ( 1 . 04 )  n = 500 0 0 n np q = − 500 500*0.04*(1 0.04) 0 0 = ≥ 19.2 5 Z Test Decision:  Critical Value(s): Reject H 0 Reject H 0 Conclusion: .025 .025 -1.96 0 1.96 Z

  12. One-Sample Z Test of Proportion  H 0 : p = p 0 = 0.04 Test Statistic:  H a : p ≠ p 0 =0.04 25 − . 04 p p − ˆ  α = .05 500 Z ≈ 0 = = 1 . 14 p ( 1 p ) ⋅ − ⋅ − . 04 ( 1 . 04 )  n = 500 0 0 n np q = − 500 500*0.04*(1 0.04) 0 0 = ≥ 19.2 5 Z Test Decision:  Critical Value(s): Do not reject at α = .05 Reject H 0 Reject H 0 Conclusion: .025 .025 There is no evidence proportion has changed from 4% -1.96 0 1.96 Z

  13. One-sample test of Proportion Example 2 A researcher claims that less than 20% of adults in  the U.S. are allergic to an herbal medicine. In a SRS of 25 adults, 3 say they have such an allergy. Does this support the researcher’s claim? Test at the 5% level. ≥ Is ? 5 np q  0 0 25 * 0.2 * 0.8 = 4 

  14. Exact Method using Binomial Distribution-One sided p-value < 5 np q If Normal approximation cannot be used, i.e. if 0 0 then H a : p<p 0 one-sided p- value=P(X ≤ x success in n trials | H 0 )    n p ∑ x − = − k n k   (1 ) p 0 = 0   k k 0 EXCEL: BINOMDIST(x,n,p 0 ,TRUE) H a : p >p 0 one-sided p- value=P(X ≥ x success in n trials | H 0 )    n p ∑ n − = − k n k   (1 ) p 0 =   k x k 0 EXCEL: 1-BINOMDIST(x-1,n,p 0 ,TRUE)

  15. Exact Method using Binomial Distribution-Two sided p-value < 5 If Normal approximation cannot be used, i.e. if np q 0 0 then for H a : p≠ p 0, the two sided pvalue can be calculated by x = < If p- value=2 P(X ≤ x success in n trials | H 0 ) ˆ p p  0 n   n p ∑ NOTE: x − = − k n k 2   (1 ) p 0 = 0   k k 0 TRUE: EXCEL: 2*BINOMDIST(x,n,p 0 ,TRUE) cumulative FALSE: x = > ˆ p p If p-value=2* P(X>= x successs in n trials | H 0 ) probability mass  0 n   n p ∑ n − = − k n k 2   (1 ) p 0 =   k x k 0 EXCEL: 2*(1-BINOMDIST(x-1,n,p 0 ,TRUE))

  16. One-sample test of Proportion Example 2 A researcher claims that less than 20% of adults in the U.S. are  allergic to an herbal medicine. In a SRS of 25 adults, 3 say they have such an allergy. Does this support the researcher’s claim? Test at the 5% level. n=25 p 0 =0.2 x=3 3 x = = = ˆ 0.12 p 25 n

  17. One-sample test of Proportion Example 2 Solution H 0 : P-value = H a : α = n = Decision: Conclusion:

  18. One-sample test of Proportion Example 2 Solution H 0 : p = p 0 =0.2 P-value = H a : p < p 0 =0.2 α = .05 n = 25 x=3 Decision: Conclusion:

  19. One-sample test of Proportion Example 2 Solution H 0 : p = p 0 =0.2 P-value =   3 25 H a : p < p 0 =0.2 ∑   − − 25 k k 0 . 2 ( 1 0 . 2 )   α = .05   k = 0 k   n = 25     25 25 + + 0 25 1 24   0.2 0.8 0.2 0.8     x=3     0 1   =       25 25 EXCEL:   + 2 23 3 22   0.2 0.8   0.2 0.8   BINOMDIST(3,25,0.2,TRUE)  2   3    Decision: Conclusion:

  20. One-sample test of Proportion Example 2 Solution H 0 : p = p 0 =0.2 P-value =   3 25 H a : p 0 < p 0 =0.2 ∑   − − 25 k k 0 . 2 ( 1 0 . 2 )   α = .05   k = 0 k       25 25     +   + n = 25 0 25 1 24 0 . 2 0 . 8 0 . 2 0 . 8        0   1  = x=3       25 25     +   2 23 3 22 0 . 2 0 . 8 0 . 2 0 . 8 EXCEL:           2 3   BINOMDIST(3,25,0.2,TRUE) = > 0 . 234 0 . 05 Decision: Do not reject at α = .05 Conclusion: There is no evidence Proportion is less than 20%

  21. Review for Hypothesis Testing One-sample tests for population mean, μ :   Z-test if σ is known  T-test if σ is unknown One-sample test for population proportion, p :   Z-test if np o q o ≥ 5  Exact method using Binomial distribution Two-sample tests for difference in population means, μ 1 – μ 2 :   Independent samples:  Z-test if σ ’s are known  T-test with pooled estimate of variance if σ ’s are unknown and can be assumed equal  T-test with unequal variances if σ ’s are unknown and cannot be assumed equal  Paired samples:  Paired Z-test for the difference if σ is known  Paired T-test for the difference if σ is unknown Two-sample test for difference in population variances:   F-test with df 1 = n 1 – 1 and df 2 = n 2 – 1

  22. Analysis of Variance (ANOVA) Multisample Inference

  23. Learning Objectives Until now, we have considered two groups of individuals and we've  wanted to know if the two groups were sampled from distributions with equal population means or medians. Suppose we would like to consider more than two groups of  individuals and, in particular, test whether the groups were sampled from distributions with equal population means. How to use one-way analysis of variance (ANOVA) to test for  differences among the means of several populations ( “groups”)

  24. Hypotheses of One-Way ANOVA   All population means are equal  No treatment effect (no variation in means among groups)  H 1 :Not all of the population means are the same  At least one population mean is different  There is a treatment effect  Does not mean that all population means are different (some pairs may be the same)

  25. One-Factor ANOVA All means are the same: The null hypothesis is true (No treatment effect)

  26. One-Factor ANOVA (continued) At least one mean is different: The null hypothesis is NOT true (Treatment effect is present) or

Recommend


More recommend