Interactive Demonstration of Hypothesis Tests for Population Proportion

Interactive Demonstration of Hypothesis Tests for Population Proportion
Loading the math board and drawing, please wait…
2018-11-01 02:49
① This GeoGebra example provides an interactive visualization of hypothesis testing for a population proportion p, including setting null and alternative hypotheses, computing test statistics, and displaying rejection regions. ② Core mathematical concepts include hypothesis testing, significance level α, critical values, normal approximation, p-values, standard error, and the normal approximation to the binomial distribution. ③ Construction highlights: commands such as Sequence, Element, Mod, If, Normal, and Min are used to generate random samples and normal distribution curves; sliders (e.g., α, N, P0) control parameters; objects like CnfSq, OpSq series, CV, StdErr0/1 build confidence intervals, test statistics, and decision regions; the interface includes type selection (Type), direction selection (RndDir), and dynamic text (IEDr, IETx) for results. ④ Suitable for high school or college statistics courses to explain hypothesis testing concepts, also useful for AP Statistics or introductory probability and statistics classes, helping students intuitively understand Type I errors, p-values, and rejection regions.

GeoGebra Commands & Parameters

  1. Sequence(Mod[4 + (19 * k), 36] + 1, k, 1, 36) → OpSq4, {24, 7, 26, 9, 28, 11, 30, 13, 32, 15, 34, 17, 36, 19, 2, 21, 4, 23, 6, 25, 8, 27, 10, 29, 12, 31, 14, 33, 16, 35, 18, 1, 20, 3, 22, 5}
  2. Sequence(Mod[5 + (13 * k), 36] + 1, k, 1, 36) → OpSq1, {19, 32, 9, 22, 35, 12, 25, 2, 15, 28, 5, 18, 31, 8, 21, 34, 11, 24, 1, 14, 27, 4, 17, 30, 7, 20, 33, 10, 23, 36, 13, 26, 3, 16, 29, 6}
  3. Sequence(Mod[6 + (17 * k), 36] + 1, k, 1, 36) → OpSq0, {24, 5, 22, 3, 20, 1, 18, 35, 16, 33, 14, 31, 12, 29, 10, 27, 8, 25, 6, 23, 4, 21, 2, 19, 36, 17, 34, 15, 32, 13, 30, 11, 28, 9, 26, 7}
  4. Sequence(Mod[8 + (11 * k), 36] + 1, k, 1, 36) → OpSq2, {20, 31, 6, 17, 28, 3, 14, 25, 36, 11, 22, 33, 8, 19, 30, 5, 16, 27, 2, 13, 24, 35, 10, 21, 32, 7, 18, 29, 4, 15, 26, 1, 12, 23, 34, 9}
  5. Element(OpSq4, Seed) → Op4
  6. Mod(Op4, 2) → Chc4
  7. If(Chc4 ≟ 0, "percentage", "proportion") → PorPTx
  8. Element(OpSq1, Seed) → Op1
  9. If(Mod[Op1, 2] ≟ 0, 1, -1) → EON
  10. Mod(Op1, 6) → PrbOpt
  11. If(PrbOpt < 2, -1, If[PrbOpt > 3, 1, 0]) → Type
  12. Element(OpSq0, Seed) → Op0
  13. Element(CnfSq, Mod[Op0, 4] + 1) → Cfd
  14. If(Type ≟ 0, (-InverseNormal[0, 1, α / 2]), (-InverseNormal[0, 1, α])) → CV
  15. Element(OpSq2, Seed) → Op2
  16. If(Mod[Op2, 6] < 3, -1, 1) → RndDir
  17. Sequence(Mod[5 + (7 * k), 36] + 1, k, 1, 36) → OpSq3, {13, 20, 27, 34, 5, 12, 19, 26, 33, 4, 11, 18, 25, 32, 3, 10, 17, 24, 31, 2, 9, 16, 23, 30, 1, 8, 15, 22, 29, 36, 7, 14, 21, 28, 35, 6}
  18. Element(XSq, Op3) → X
  19. Element(NSq, Op3) → N
  20. If(Phat < P0, -1, If[Phat > P0, 1, 0]) → DtDr
  21. If(DtDr ≟ -1, If[EON ≟ 1, 0, 1], If[EON ≟ 1, 0, -1]) → IEDr
  22. If(IEDr ≟ 1, "is less than ", If[IEDr ≟ -1, "is more than ", "equals "]) → IETx
  23. If(DtDr ≟ -1, If[EON ≟ 1, " equals ", "is less than "], If[EON ≟ 1, " equals ", "is more than "]) → TypTx2
  24. If(Phat > 0.5, Phat, 1 - Phat) → PHHi
  25. If(Phat > 0.5, 1 - Phat, Phat) → PHLo
  26. If(PrbOpt < 3, -1, 1) → ClcDr
  27. Normal(0, 1, TstSt) → PVLT0
  28. Min(PVLT0, PVRT0) → PVhf
  29. If(PVLT0 < 0.00010, 0.00010, PVLT0) → PVLT1
  30. If(PVTT0 < 0.00010, " < ", " = ") → PVTTsg
  31. If(PVTT0 < 0.00010, 0.00010, PVTT0) → PVTT1
  32. If(PVRT0 < 0.00010, 0.00010, PVRT0) → PVRT1
  33. If(PVRT0 < 0.00010, " < ", " = ") → PVRTsg
  34. If(PVLT0 < 0.00010, " < ", " = ") → PVLTsg
  35. If(IEDr ≟ -1, " > ", If[IEDr ≟ 1, " < ", " ≠ "]) → DrSgnAlt
  36. If(IEDr ≟ -1, " ≤ ", If[IEDr ≟ 1, " ≥ ", " = "]) → DrSgnNll
  37. If(IEDr ≟ -1, "right-tailed", If[IEDr ≟ 1, "left-tailed", "two-tailed"]) → TypTx1
  38. If(Type ≟ -1, "≤ ", " ≥ ") → PVKSg
  39. If(IEDr ≟ -1, PVRT1, If[IEDr ≟ 1, PVLT1, PVTT1]) → PV
  40. If(PV < α, "<", "≥") → CmpIE
  41. If(PV < α, "reject", "keep") → DCS
  42. If(PV < α, "is", "is not") → OrNot
  43. If(PV < 0.00010, "<", "=") → PVsg
  44. Element(PSSq, Op3) → PS0
  45. If(IEDr ≟ 1, "is less than ", If[IEDr ≟ -1, "is more than ", "does not equal "]) → ConIETx
  46. If(IEDr ≟ 1, PVLTtx, If[IEDr ≟ -1, PVGTtx, PVTTtx]) → PVClc
  47. If(Chc4 ≟ 0, Prcnt, P0) → PoPVTx
  48. If(Chc4 ≟ 0, "%", "") → PrcSgn