Probability Simulation: Marble Drawing and Frequency Distribution

Probability Simulation: Marble Drawing and Frequency Distribution
Loading the math board and drawing, please wait…
2019-07-02 07:06
This GeoGebra example dynamically simulates random draws from a set of multicolored marbles, visually demonstrating the relationship between empirical frequency and theoretical probability. Core mathematical concepts include probability and statistics, random events, frequency distributions, ratios, and arithmetic operations such as subtraction. Construction highlights: uses RandomDiscrete and Random commands to generate random outcomes, Frequency and Unique to count occurrences of each color, BarChart to plot frequency bars, TableText to display data tables, and buttons (button2, RESET, STOP) plus a speed slider to control simulation pace and reset. Key objects include Marbles, color variables Red1 through Green6, and lists like dlist, NumTwos, NumOnes. Suitable for middle and high school probability lessons, this tool helps students grasp the law of large numbers and how relative frequency stabilizes around probability, while exploring the impact of sample size on randomness.

GeoGebra Commands & Parameters

  1. Frequency({2, 2}, dlist) → Twos
  2. Element(Twos, 1) → NumTwos
  3. Frequency({1, 1}, dlist) → Ones
  4. Element(Ones, 1) → NumOnes
  5. Unique(dlist) → list1
  6. Frequency(dlist) → dfreq
  7. If(dlist ≟ {}, 0.1, Sum[dfreq]) → sum
  8. Random(0, Marbles - 1) → Red1
  9. Random(0, Marbles - Red1) → Blue2
  10. Random(0, Marbles - Blue2 - Red1) → Yellow3
  11. Random(0, Marbles - Yellow3 - Blue2 - Red1) → Black4
  12. Random(0, Marbles - Black4 - Yellow3 - Blue2 - Red1) → White5
  13. BarChart(dlist, 0.8) → b
  14. Append(row1, "TOTAL") → row1a
  15. Append(row2, sum) → row2a
  16. TableText({row1a, row2a}, "c_") → text2
  17. Random(0, Marbles - 1) → a
  18. Random(0, Marbles - 1) → c
  19. Random(0, Marbles - 1) → d
  20. Random(0, Marbles - 1) → e
  21. Random(0, Marbles - 1) → f
  22. Random(0, Marbles - 1) → g
  23. Random(0, Marbles - 1) → h
  24. Random(0, Marbles - 1) → i
  25. Random(0, Marbles - 1) → j
  26. Random(0, Marbles - 1) → k
  27. TableText({row0, row1, row2, row3, row4, row5, row6}, "c_") → Answers
  28. RandomDiscrete({1, 2, 3, 4, 5, 6}, {1 / 6, 1 / 6, 1 / 6, 1 / 6, 1 / 6, 1 / 6}) → Outcome1
  29. Frequency({3, 3}, dlist) → Threes
  30. Frequency({4, 4}, dlist) → Fours
  31. Frequency({5, 5}, dlist) → Fives
  32. Frequency({6, 6}, dlist) → Sixes
  33. Element(Threes, 1) → NumThrees
  34. Element(Fours, 1) → NumFours
  35. Element(Fives, 1) → NumFives
  36. Element(Sixes, 1) → NumSixes
  37. Text(NumOnes) → text13
  38. Text(NumTwos) → text14
  39. Text(NumThrees) → text15
  40. Text(NumFours) → text16
  41. Text(NumFives) → text17
  42. Text(NumSixes) → text18
  43. Text(FreqOne) → text19
  44. Text(FreqTwo) → text20
  45. Text(FreqThree) → text21
  46. Text(FreqFour) → text22
  47. Text(FreqFive) → text23
  48. Text(FreqSix) → text24
  49. Text(("Total = " * sum)) → text27