Probability of Drawing a Color Ball

Probability of Drawing a Color Ball
Loading the math board and drawing, please wait…
2025-02-05 14:48
This example demonstrates the calculation of probability, involving the math concept of probability statistics. Using GeoGebra's slider animation, users can adjust the number of color balls and observe the change in probability. Suitable for middle school math, especially for learning probability statistics.

GeoGebra Commands & Parameters

  1. Sequence(Random[1, 10], i, 1, 10) → randomNumbers, {1, 7, 9, 9, 7, 3, 3, 3, 1, 9}
  2. Element(randomNumbers, Mod[questionCount, Length[randomNumbers]] + 1) → randomNumber
  3. Textfield(input) → inputBox
  4. Join({Sequence[Segment[Corner[4] + (RasterPixMat * ((k * RasterStepXY), 0)), Corner[4] + (RasterPixMat * ((k * RasterStepXY), RasterMaxY))], k, 0, RasterMaxX / RasterStepXY], Sequence[Segment[Corner[4] + (RasterPixMat * (0, (k * RasterStepXY))), Corner[4] + (RasterPixMat * (RasterMaxX, (k * RasterStepXY)))], k, 0, RasterMaxY / RasterStepXY]}) → RasterStrecken
  5. Join({Sequence[Text[UnicodeToLetter[65 + k], Midpoint[Corner[4] + (RasterPixMat * ((k * RasterStepXY), RasterMaxY)), Corner[4] + (RasterPixMat * (((k + 1) * RasterStepXY), RasterMaxY))], false, true, 0, -1], k, 0, RasterMaxX / RasterStepXY - 1], Sequence[Text[("" * k), Midpoint[Corner[4] + (RasterPixMat * (RasterMaxX, ((k - 1) * RasterStepXY))), Corner[4] + (RasterPixMat * (RasterMaxX, (k * RasterStepXY)))], false, true, 1, 0], k, 1, RasterMaxY / RasterStepXY]}) → RasterBeschriftung
  6. Sequence(Sequence[Corner[4] + (RasterPixMat * ((k * RasterStepXY), (m * RasterStepXY))), k, 0, RasterMaxX / RasterStepXY], m, 0, RasterMaxY / RasterStepXY) → RasterPunkte, {{(-0.39, 10.379999999999999), (0.6125062656641608, 10.379999999999999), (1.6150125313283215, 10.379999999999999), (2.6175187969924827, 10.379999999999999), (3.620025062656643, 10.379999999999999), (4.622531328320805, 10.379999999999999), (5.625037593984966, 10.379999999999999), (6.627543859649126, 10.379999999999999), (7.630050125313287, 10.379999999999999), (8.632556390977447, 10.379999999999999), (9.635062656641608, 10.379999999999999), (10.63756892230577, 10.379999999999999), (11.64007518796993, 10.379999999999999), (12.64258145363409, 10.379999999999999), (13.645087719298251, 10.379999999999999), (14.647593984962413, 10.379999999999999), (15.650100250626572, 10.379999999999999)}, {(-0.39, 9.37665551839465), (0.6125062656641608, 9.37665551839465), (1.6150125313283215, 9.37665551839465), (2.6175187969924827, 9.37665551839465), (3.620025062656643, 9.37665551839465), (4.622531328320805, 9.37665551839465), (5.625037593984966, 9.37665551839465), (6.627543859649126, 9.37665551839465), (7.630050125313287, 9.37665551839465), (8.632556390977447, 9.37665551839465), (9.635062656641608, 9.37665551839465), (10.63756892230577, 9.37665551839465), (11.64007518796993, 9.37665551839465), (12.64258145363409, 9.37665551839465), (13.645087719298251, 9.37665551839465), (14.647593984962413, 9.37665551839465), (15.650100250626572, 9.37665551839465)}, {(-0.39, 8.373311036789298), (0.6125062656641608, 8.373311036789298), (1.6150125313283215, 8.373311036789298), (2.6175187969924827, 8.373311036789298), (3.620025062656643, 8.373311036789298), (4.622531328320805, 8.373311036789298), (5.625037593984966, 8.373311036789298), (6.627543859649126, 8.373311036789298), (7.630050125313287, 8.373311036789298), (8.632556390977447, 8.373311036789298), (9.635062656641608, 8.373311036789298), (10.63756892230577, 8.373311036789298), (11.64007518796993, 8.373311036789298), (12.64258145363409, 8.373311036789298), (13.645087719298251, 8.373311036789298), (14.647593984962413, 8.373311036789298), (15.650100250626572, 8.373311036789298)}, {(-0.39, 7.3699665551839475), (0.6125062656641608, 7.3699665551839475), (1.6150125313283215, 7.3699665551839475), (2.6175187969924827, 7.3699665551839475), (3.620025062656643, 7.3699665551839475), (4.622531328320805, 7.3699665551839475), (5.625037593984966, 7.3699665551839475), (6.627543859649126, 7.3699665551839475), (7.630050125313287, 7.3699665551839475), (8.632556390977447, 7.3699665551839475), (9.635062656641608, 7.3699665551839475), (10.63756892230577, 7.3699665551839475), (11.64007518796993, 7.3699665551839475), (12.64258145363409, 7.3699665551839475), (13.645087719298251, 7.3699665551839475), (14.647593984962413, 7.3699665551839475), (15.650100250626572, 7.3699665551839475)}, {(-0.39, 6.366622073578597), (0.6125062656641608, 6.366622073578597), (1.6150125313283215, 6.366622073578597), (2.6175187969924827, 6.366622073578597), (3.620025062656643, 6.366622073578597), (4.622531328320805, 6.366622073578597), (5.625037593984966, 6.366622073578597), (6.627543859649126, 6.366622073578597), (7.630050125313287, 6.366622073578597), (8.632556390977447, 6.366622073578597), (9.635062656641608, 6.366622073578597), (10.63756892230577, 6.366622073578597), (11.64007518796993, 6.366622073578597), (12.64258145363409, 6.366622073578597), (13.645087719298251, 6.366622073578597), (14.647593984962413, 6.366622073578597), (15.650100250626572, 6.366622073578597)}, {(-0.39, 5.3632775919732465), (0.6125062656641608, 5.3632775919732465), (1.6150125313283215, 5.3632775919732465), (2.6175187969924827, 5.3632775919732465), (3.620025062656643, 5.3632775919732465), (4.622531328320805, 5.3632775919732465), (5.625037593984966, 5.3632775919732465), (6.627543859649126, 5.3632775919732465), (7.630050125313287, 5.3632775919732465), (8.632556390977447, 5.3632775919732465), (9.635062656641608, 5.3632775919732465), (10.63756892230577, 5.3632775919732465), (11.64007518796993, 5.3632775919732465), (12.64258145363409, 5.3632775919732465), (13.645087719298251, 5.3632775919732465), (14.647593984962413, 5.3632775919732465), (15.650100250626572, 5.3632775919732465)}, {(-0.39, 4.359933110367896), (0.6125062656641608, 4.359933110367896), (1.6150125313283215, 4.359933110367896), (2.6175187969924827, 4.359933110367896), (3.620025062656643, 4.359933110367896), (4.622531328320805, 4.359933110367896), (5.625037593984966, 4.359933110367896), (6.627543859649126, 4.359933110367896), (7.630050125313287, 4.359933110367896), (8.632556390977447, 4.359933110367896), (9.635062656641608, 4.359933110367896), (10.63756892230577, 4.359933110367896), (11.64007518796993, 4.359933110367896), (12.64258145363409, 4.359933110367896), (13.645087719298251, 4.359933110367896), (14.647593984962413, 4.359933110367896), (15.650100250626572, 4.359933110367896)}, {(-0.39, 3.3565886287625455), (0.6125062656641608, 3.3565886287625455), (1.6150125313283215, 3.3565886287625455), (2.6175187969924827, 3.3565886287625455), (3.620025062656643, 3.3565886287625455), (4.622531328320805, 3.3565886287625455), (5.625037593984966, 3.3565886287625455), (6.627543859649126, 3.3565886287625455), (7.630050125313287, 3.3565886287625455), (8.632556390977447, 3.3565886287625455), (9.635062656641608, 3.3565886287625455), (10.63756892230577, 3.3565886287625455), (11.64007518796993, 3.3565886287625455), (12.64258145363409, 3.3565886287625455), (13.645087719298251, 3.3565886287625455), (14.647593984962413, 3.3565886287625455), (15.650100250626572, 3.3565886287625455)}, {(-0.39, 2.353244147157195), (0.6125062656641608, 2.353244147157195), (1.6150125313283215, 2.353244147157195), (2.6175187969924827, 2.353244147157195), (3.620025062656643, 2.353244147157195), (4.622531328320805, 2.353244147157195), (5.625037593984966, 2.353244147157195), (6.627543859649126, 2.353244147157195), (7.630050125313287, 2.353244147157195), (8.632556390977447, 2.353244147157195), (9.635062656641608, 2.353244147157195), (10.63756892230577, 2.353244147157195), (11.64007518796993, 2.353244147157195), (12.64258145363409, 2.353244147157195), (13.645087719298251, 2.353244147157195), (14.647593984962413, 2.353244147157195), (15.650100250626572, 2.353244147157195)}, {(-0.39, 1.3498996655518454), (0.6125062656641608, 1.3498996655518454), (1.6150125313283215, 1.3498996655518454), (2.6175187969924827, 1.3498996655518454), (3.620025062656643, 1.3498996655518454), (4.622531328320805, 1.3498996655518454), (5.625037593984966, 1.3498996655518454), (6.627543859649126, 1.3498996655518454), (7.630050125313287, 1.3498996655518454), (8.632556390977447, 1.3498996655518454), (9.635062656641608, 1.3498996655518454), (10.63756892230577, 1.3498996655518454), (11.64007518796993, 1.3498996655518454), (12.64258145363409, 1.3498996655518454), (13.645087719298251, 1.3498996655518454), (14.647593984962413, 1.3498996655518454), (15.650100250626572, 1.3498996655518454)}, {(-0.39, 0.346555183946494), (0.6125062656641608, 0.346555183946494), (1.6150125313283215, 0.346555183946494), (2.6175187969924827, 0.346555183946494), (3.620025062656643, 0.346555183946494), (4.622531328320805, 0.346555183946494), (5.625037593984966, 0.346555183946494), (6.627543859649126, 0.346555183946494), (7.630050125313287, 0.346555183946494), (8.632556390977447, 0.346555183946494), (9.635062656641608, 0.346555183946494), (10.63756892230577, 0.346555183946494), (11.64007518796993, 0.346555183946494), (12.64258145363409, 0.346555183946494), (13.645087719298251, 0.346555183946494), (14.647593984962413, 0.346555183946494), (15.650100250626572, 0.346555183946494)}, {(-0.39, -0.6567892976588574), (0.6125062656641608, -0.6567892976588574), (1.6150125313283215, -0.6567892976588574), (2.6175187969924827, -0.6567892976588574), (3.620025062656643, -0.6567892976588574), (4.622531328320805, -0.6567892976588574), (5.625037593984966, -0.6567892976588574), (6.627543859649126, -0.6567892976588574), (7.630050125313287, -0.6567892976588574), (8.632556390977447, -0.6567892976588574), (9.635062656641608, -0.6567892976588574), (10.63756892230577, -0.6567892976588574), (11.64007518796993, -0.6567892976588574), (12.64258145363409, -0.6567892976588574), (13.645087719298251, -0.6567892976588574), (14.647593984962413, -0.6567892976588574), (15.650100250626572, -0.6567892976588574)}, {(-0.39, -1.660133779264207), (0.6125062656641608, -1.660133779264207), (1.6150125313283215, -1.660133779264207), (2.6175187969924827, -1.660133779264207), (3.620025062656643, -1.660133779264207), (4.622531328320805, -1.660133779264207), (5.625037593984966, -1.660133779264207), (6.627543859649126, -1.660133779264207), (7.630050125313287, -1.660133779264207), (8.632556390977447, -1.660133779264207), (9.635062656641608, -1.660133779264207), (10.63756892230577, -1.660133779264207), (11.64007518796993, -1.660133779264207), (12.64258145363409, -1.660133779264207), (13.645087719298251, -1.660133779264207), (14.647593984962413, -1.660133779264207), (15.650100250626572, -1.660133779264207)}}
  7. Textfield(input021) → InputBox021
  8. Textfield(input051) → InputBox051
  9. Textfield(input061) → InputBox061
  10. Textfield(input062) → InputBox062
  11. SelectedIndex(dropdown021) → index021
  12. If(step ≟ 1, (0.75, 4), (0, 6.25)) → PosImgNora1
  13. PolyLine(PosSB, Corner[txt012, 1] + (0.5, 0), Corner[txt012, 2] + (0.1, 0), Corner[txt012, 3] + (0.1, 0.1), Corner[txt012, 4] + (-0.1, 0.1), Corner[txt012, 1] + (-0.1, 0.5), PosSB) → sb01
  14. PolyLine(PosSB, Corner[txt031, 1] + (0.5, 0), Corner[txt031, 2] + (0.1, 0), Corner[txt031, 3] + (0.1, 0.1), Corner[txt031, 4] + (-0.1, 0.1), Corner[txt031, 1] + (-0.1, 0.5), PosSB) → sb03
  15. If(step ≟ 2, correct021 ∧ correct022 ∧ correctdd021 ∧ option021, step ≟ 5, correct051, step ≟ 6, correct06, true) → clickableBtnNext
  16. If(step ≟ 1, (12.5, 3.35), step ≟ 6, (13.25, 3.75), (13.25, 3.75)) → MP
  17. Circle(MP, radius) → glücksrad1
  18. Circle(MP, radius + 0.3) → glücksrad2
  19. CircleSector(MP + (0, radius - 0.3), MP + (0, radius - 0.3) + (0.6 * (cos(80°), sin(80°))), MP + (0, radius - 0.3) + (0.6 * (cos(100°), sin(100°)))) → zeiger
  20. Sequence(MP + (radius * (cos(startIndex° + k°), sin(startIndex° + k°))), k, 0, 360, 360 / 8) → GRPoints
  21. CircleSector(MP, GRPoints(1), GRPoints(2)) → sek1
  22. CircleSector(MP, GRPoints(2), GRPoints(3)) → sek2
  23. CircleSector(MP, GRPoints(3), GRPoints(4)) → sek3
  24. CircleSector(MP, GRPoints(4), GRPoints(5)) → sek4
  25. CircleSector(MP, GRPoints(5), GRPoints(6)) → sek5
  26. CircleSector(MP, GRPoints(6), GRPoints(7)) → sek6
  27. CircleSector(MP, GRPoints(7), GRPoints(8)) → sek7
  28. CircleSector(MP, GRPoints(8), GRPoints(1)) → sek8
  29. Sequence(Segment[MP, GRPoints(k)], k, 1, 8) → segList
  30. Rotate(imgSOriginal, startIndex°, MS1) → imgS1
  31. Rotate(imgS1, (2 * (360°) / 8), MP) → imgS2
  32. Rotate(imgS2, (3 * (360°) / 8), MP) → imgS3
  33. Textfield(input022) → InputBox022
  34. If(step ≟ 2, PosKB + (KBX + 1, -1), step ≟ 5, (0.25, 2.75), (0.25, -0.5)) → PosBtnShowSolution
  35. Text((("\textcolor{" * If[correct021 ∧ correct022 ∧ correctdd021, "#000000", "#616161"]) * "}{\textsf{ein Laplace-Zufallsexperiment.}}"), PosOption021 + (0.65, 0), false, true, 1, -1) → txtOption021
  36. Text((("\textcolor{" * If[correct021 ∧ correct022 ∧ correctdd021, "#000000", "#616161"]) * "}{\textsf{kein Laplace-Zufallsexperiment.}}"), PosOption022 + (0.65, 0), false, true, 1, -1) → txtO22