Estimating p-values: 2-proportion z-test simulation

Estimating p-values: 2-proportion z-test simulation
Loading the math board and drawing, please wait…
2015-09-27 00:14
This example demonstrates how to estimate p-values for a 2-proportion z-test using simulation methods. Key math concepts include probability & statistics, hypothesis testing, and the 2-proportion z-test. GeoGebra commands and objects used in the construction are Random, TableText, Sequence, Shuffle, Take, CountIf, DotPlot, If, Segment. Suitable for high school students and beginners in statistics learning hypothesis testing methods.

GeoGebra Commands & Parameters

  1. Random(10, 60, true) → bf
  2. Random(10, 40, true) → af
  3. Random(10, 50, true) → bs
  4. Random(10, 40, true) → as
  5. TableText({header, success, failure, bottom}, "c") → text1
  6. Sequence(1, a, 1, as + bs) → ss
  7. Sequence(0, a, 1, af + bf) → ff
  8. Shuffle(Join[{ss, ff}]) → list1
  9. Take(list1, 1, af + as) → list2
  10. Take(list1, af + as + 1, af + as + bf + bs) → list3
  11. CountIf(x > -1, data) → b
  12. DotPlot(data, true) → list4
  13. If(as / (as + af) - bs / (bs + bf) < 0, CountIf[x ≤ as / (as + af) - bs / (bs + bf), data], CountIf[x ≥ as / (as + af) - bs / (bs + bf), data]) → c
  14. Segment((as / (as + af) - bs / (bs + bf), 0), (as / (as + af) - bs / (bs + bf), 4)) → d