胜负概率与随机过程模拟

胜负概率与随机过程模拟
几何画板及绘图内容加载中,请稍等……
2015-02-04 10:19
本GeoGebra范例演示了胜负概率的数学模型,涉及博弈过程中的状态转移与随机游走。通过交互控件调整回合数、胜率与败率,动态计算并展示存活与淘汰的路径数及相应的概率公式。该模型直观呈现了概率统计中的相关概念,帮助学习者深入理解多回合博弈中的路径组合与最终胜负概率分布。

GeoGebra 命令及参数

  1. Ray((0, nLose), (1, nLose + 1)) → a
  2. Intersect(b, a) → A
  3. Ray((nWin, 0), (nWin + 1, 1)) → d
  4. Intersect(b, d) → C
  5. Intersect(b, xAxis) → B
  6. Sequence((k, nLose + k), k, 0, x1) → endsDead
  7. Sequence((k, nTurns - k), k, x1 + 1, x2) → endsTie
  8. Segment((nTurns, 0), (0, nTurns)) → c
  9. Join({endsDead, endsTie}) → ends
  10. Point(ends) → P
  11. Sequence(Binomial[nTurns, k] - Binomial[nTurns, nTurns - nLose - k], k, x1 + 1, nTurns) → nWaysAlive
  12. Sequence(Binomial[nLose + (2 * k), k] - (2 * Binomial[nLose + (2 * k) - 1, k - 1]), k, 0, x1) → nWaysDead
  13. Sequence(Text[Element[nWaysAlive, k], Element[endsTie, k] + OffsetAlive], k, 1, nTurns - x1) → txtWaysAlive
  14. Sequence(Text[Element[nWaysDead, k], Element[endsDead, k] + OffsetDead], k, 1, x1 + 1) → txtWaysDead
  15. Sequence(Text["C^{" + nTurns + "}_{" + (k) + "}-C^{" + nTurns + "}_{" + (nTurns - nLose - k) + "}", Element[endsTie, k - x1] + OffsetAliveF, true, true], k, x1 + 1, nTurns) → txtWaysAliveFormula
  16. Sequence((((Binomial[nTurns, k] - Binomial[nTurns, nTurns - nLose - k]) * p^(k)) * q^(nTurns - k)), k, x1 + 1, nTurns) → nAliveP
  17. Sequence(Text[Element[nAliveP, k], Element[endsTie, k] + OffsetAlive], k, 1, nTurns - x1) → txtAliveP
  18. Sequence((((Binomial[nLose + (2 * k), k] - (2 * Binomial[nLose + (2 * k) - 1, k - 1])) * p^(k)) * q^(nLose + k)), k, 0, x1) → nDeadP
  19. Sum(nDeadP) → pDead
  20. Sum(nAliveP) → pAlive
  21. Sequence(Text["C^{" + (nLose + (2 * k)) + "}_{" + (k) + "}-2C^{" + (nLose + (2 * k) - 1) + "}_{" + (k - 1) + "}", Element[endsDead, k + 1] + OffsetDeadF, true, true], k, 0, x1) → txtWaysDeadFormula
  22. Sequence(Text[Element[nDeadP, k], Element[endsDead, k] + OffsetDeadP], k, 1, x1 + 1) → txtDeadP
  23. Sequence(Text["(C^{" + nTurns + "}_{" + (k) + "}-C^{" + nTurns + "}_{" + (nTurns - nLose - k) + "})p^{" + (k) + "}q^{" + (nTurns - k) + "}", Element[endsTie, k - x1] + OffsetAliveF, true, true], k, x1 + 1, nTurns) → txtAlivePFormula
  24. Sequence(Text["(C^{" + (nLose + (2 * k)) + "}_{" + (k) + "}-2C^{" + (nLose + (2 * k) - 1) + "}_{" + (k - 1) + "})p^{" + (k) + "}q^{" + (nLose + k) + "}", Element[endsDead, k + 1] + OffsetDeadPF, true, true], k, 0, x1) → txtDeadPFormula
  25. Sequence(Sequence[Vector[(j, k), (j + 1, k)], j, Max[0, k - nLose + 1], Min[nTurns - k - 1, k + nWin - 1]], k, 0, y(A)) → goRight
  26. Sequence(Sequence[Vector[(k, j), (k, j + 1)], j, Max[0, k - nWin + 1], Min[k + nLose - 1, nTurns - k - 1]], k, 0, nTurns - 1) → goUp
  27. Sequence((k, nTurns - k), k, x1 + 1, x2) → endsTieFrame
  28. Sequence((k, k - nWin), k, nWin, x3) → endsWin
  29. RotateText(txtEquWin, 45*°) → txtEquWinRot
  30. RotateText(txtEquLose, 45*°) → txtEquLoseRot
  31. RotateText(txtEquTurn, -45*°) → txtEquTurnRot

AI 绘图提示语参考

绘制一个概率随机过程的路径图,横轴表示获胜次数,纵轴表示失败次数。从原点出发,用箭头表示每一步向右或向上的移动,形成网格状路径。画一条从左上到右下的对角线,代表平局边界。在对角线下方,用点标记所有失败结束的路径终点,并标注对应的路径数和概率公式;在对角线上方,用点标记所有平局结束的路径终点,同样标注路径数和概率公式。在每条路径终点旁,显示组合数形式的计数公式和概率表达式。最后,在图形顶部或底部显示总存活概率和总失败概率的数值。
以上提示语为根据原始绘图命令整理而来,仅供参考。