一袋混合样本:概率统计与几何作图交互示例

一袋混合样本:概率统计与几何作图交互示例
几何画板及绘图内容加载中,请稍等……
2026-03-23 22:23
这个范例演示了从装有不同对象的混合样本袋中随机抽取样本,并通过交互界面进行概率计算与统计分析的全过程。核心数学概念涵盖概率模型、树形图、统计键值、代数方程、箱线图(Boxplot)与立体几何体。作图要点:使用了 Polygon、Point、Midpoint、PointIn、IsInRegion 等几何作图命令,以及 Shuffle、SelectedIndex、If、Join、Length、Element、Append、Remove 等列表处理与逻辑判断命令,配合 Textfield、DropDown、input 等输入对象和 check、btnValidate、btnNext、btnNochmal 等交互控件,构建可自动验证答案的练习系统。适合初中及高中阶段的概率统计与代数教学,可用于课堂演示、学生自主探究或在线练习。

GeoGebra 命令及参数

  1. SelectedIndex(DropDown9) → input9
  2. SelectedIndex(DropDown7) → input7
  3. If(exnum ≟ 2, 2, 3) → sol9
  4. If(exnum ≟ 1, 2, 3) → sol7
  5. If(exnum ∈ {1, 4}, 1, If[exnum ∈ {2, 5}, 2, 3]) → extype
  6. If(exnum ≟ 3, check6, check5) → correct6
  7. SelectedIndex(DropDown8) → input8
  8. If(exnum ≟ 2, check3, check4) → correct5
  9. Join(Sequence[Shuffle[{1, 2, 3, 4, 5, 6, 7}], m, 1, 9]) → listExnum
  10. Textfield(input1) → Eingabefeld1
  11. Textfield(input2) → Eingabefeld2
  12. Textfield(input3) → Eingabefeld3
  13. Polygon(TüteBound1, TüteBound2, TüteBound3, TüteBound4) → TüteBounda, tütebound1, tütebound2, tütebound3, tütebount4
  14. PointIn(TüteBounda) → Z1a
  15. Length(Vector[Z1b, Z1c]) → d
  16. If(exnum ≟ 1, 36, 14.8) → sol2
  17. If(exnum ≟ 1, 39, 8.7) → sol3
  18. If(exnum ≟ 1, check1, check2) → correct4
  19. If(exnum ≟ 1, correct1 ∧ correct2 ∧ correct3 ∧ correctIB4 ∧ correctIB5 ∧ correct7 ∧ correct8, Element[{correct1 ∧ correct2 ∧ correct3 ∧ correct7 ∧ correct8, correct9, correct6}, extype]) → correct
  20. Polygon(Translate[TüteBound1, (0.8, 0.4)], Translate[TüteBound2, (0.8, 0.4)], Translate[TüteBound3, (0.8, 0.4)], Translate[TüteBound4, (0.8, 0.4)]) → TüteBoundb, f, g, h, i
  21. Textfield(input1old) → InputBox1
  22. Textfield(input2old) → InputBox2
  23. Polygon(PtopLeftCornerFeedback, PtopRightCornerFeedback, PbottomRightCornerFeedback, PbottomLeftCornerFeedback) → rectangleCorrect, rectangleCorrectS3, rectangleCorrectS4, rectangleCorrectS2, rectangleCorrectS1
  24. Shuffle(Sequence[Random[0, 10], i, 1, 100]) → randomNosForX, {6, 8, 5, 6, 5, 6, 8, 7, 6, 2, 3, 1, 8, 4, 8, 2, 8, 6, 10, 7, 3, 8, 9, 2, 6, 8, 8, 9, 4, 2, 0, 4, 2, 9, 8, 8, 7, 7, 4, 10, 4, 7, 10, 3, 2, 3, 9, 9, 1, 10, 6, 0, 8, 8, 6, 8, 2, 2, 7, 7, 1, 3, 3, 9, 5, 6, 9, 3, 1, 6, 8, 1, 10, 7, 6, 3, 7, 3, 3, 0, 4, 1, 4, 2, 6, 6, 5, 2, 9, 8, 6, 7, 8, 4, 10, 2, 0, 1, 0, 9}
  25. Element(randomNosForX, Mod[questionCount, 100] + 1) → numX
  26. Shuffle(Sequence[Random[0, 10], i, 1, 100]) → randomNosForY, {6, 3, 4, 7, 7, 3, 1, 9, 2, 3, 9, 8, 1, 7, 2, 10, 8, 9, 10, 5, 2, 1, 7, 6, 6, 10, 8, 10, 10, 6, 5, 3, 2, 5, 9, 3, 0, 1, 6, 4, 1, 9, 9, 4, 8, 6, 1, 4, 10, 6, 0, 7, 2, 9, 7, 1, 1, 9, 2, 9, 7, 7, 2, 5, 5, 1, 10, 6, 4, 1, 4, 7, 7, 10, 7, 10, 9, 2, 2, 1, 10, 4, 6, 3, 7, 7, 10, 8, 1, 5, 1, 0, 3, 0, 8, 2, 8, 3, 9, 2}
  27. Element(randomNosForY, Mod[questionCount, 100] + 1) → numY
  28. Append(true, Sequence[If[randomNosForX(i) ≟ randomNosForX(i - 1), false, true], i, 2, 100]) → stayX
  29. Append(true, Sequence[If[randomNosForY(i) ≟ randomNosForY(i - 1), false, true], i, 2, 100]) → stayY
  30. Remove(Sequence[If[stayX(i), randomNosForX(i), 0], i, 1, 100], Sequence[0, i, 1, 100]) → randomNosForXwithoutRepeat
  31. Remove(Sequence[If[stayY(i), randomNosForY(i), 0], i, 1, 100], Sequence[0, i, 1, 100]) → randomNosForYwithoutRepeat
  32. Element(randomNosForXwithoutRepeat, Mod[questionCount, Length[randomNosForXwithoutRepeat]] + 1) → numXwithoutRepeat
  33. Element(randomNosForYwithoutRepeat, Mod[questionCount, Length[randomNosForYwithoutRepeat]] + 1) → numYwithoutRepeat
  34. Point(Line[Bu1, xAxis]) → Bu2
  35. PointIn(TüteBounda) → Z2a
  36. PointIn(TüteBounda) → Z3a
  37. PointIn(TüteBounda) → Z4a
  38. PointIn(TüteBoundb) → Z5a
  39. PointIn(TüteBoundb) → Z6a
  40. PointIn(TüteBoundb) → Z7a
  41. Polygon(D1, (x(D1), y(D2)), D2, (x(D2), y(D1))) → DecisionArea, d1, j, d2, k
  42. Midpoint(Z1a, Z1c) → Z1M
  43. Midpoint(Z2a, Z2c) → Z2M
  44. Midpoint(Z3a, Z3c) → Z3M
  45. Midpoint(Z4a, Z4c) → Z4M
  46. Midpoint(Z5a, Z5c) → Z5M
  47. Midpoint(Z6a, Z6c) → Z6M
  48. Midpoint(Z7a, Z7c) → Z7M
  49. IsInRegion(Z1M, DecisionArea) → zettel1dec
  50. IsInRegion(Z2M, DecisionArea) → zettel2dec
  51. IsInRegion(Z3M, DecisionArea) → zettel3dec
  52. IsInRegion(Z4M, DecisionArea) → zettel4dec
  53. IsInRegion(Z5M, DecisionArea) → zettel5dec
  54. IsInRegion(Z6M, DecisionArea) → zettel6dec
  55. IsInRegion(Z7M, DecisionArea) → zettel7dec
  56. Length(Vector[Z1a, Z1b]) → c
  57. Textfield(input3old) → InputBox3
  58. If(exnum ≟ 1, (-0.6, 1.3), (0.10154, 2.13942)) → Pi1
  59. Element({If[part ≟ 1, 3, 1], 1, 2}, extype) → versuche
  60. Point(Line[Hakerl1a, xAxis]) → Hakerl1b
  61. If(exnum ≟ 1, Defined[((((input1(h, c) * input2(h, c)) * input3(h, c)) * input4(h, c)) * input5(h, c))], Defined[((input1(h, c) * input2(h, c)) * input3(h, c))]) → fixedDropDown7
  62. If(exnum ≟ 1, 4, 3.7) → sol1
  63. Textfield(input4) → Eingabefeld4
  64. Textfield(input5) → Eingabefeld5
  65. If(exnum ≟ 1, (650, 182), (540, 242)) → PosDD7

AI 绘图提示语参考

该图形是一个交互式概率与统计演示界面,包含箱线图、立体几何图形(如多边形)、点、区域、统计量以及输入输出区域。界面有输入框、下拉菜单、检查框和验证按钮。构造顺序为:先绘制箱线图的多边形边界,添加点并计算中点,判断点是否在区域内,再绘制立体几何图形,最后添加随机数生成和去重逻辑的图形元素。
以上提示语为根据原始绘图命令整理而来,仅供参考。