1 【3D】パチンコ玉と釘の確率・統計 以前、上からパチンコ玉を落とすゲームで確率・統計を考察してみた。 ・パチンコ玉と釘の確率・統計。: https://tanakah17191928.blogspot.com/2024/11/blog-post_7.html 前回は2次元平面だったけれど、今回は3次元空間でシミュレーションしてみた。 2 それぞれ25%の確率で4方向(前後左右)にパチンコ玉がはじかれる場合 Option Explicit Sub game() Dim i As Long, j As Long Dim p_x As Integer, p_y As Integer, c As Integer For i = 1 To 1000 p_x = 0 p_y = 0 For j = 1 To 100 c = 0 Randomize c = Int(100 * Rnd + 1) If c <= 25 Then p_x = p_x + 1 ElseIf 25 < c And c <= 50 Then p_x = p_x - 1 ElseIf 50 < c And c <= 75 Then p_y = p_y + 1 Else p_y = p_y - 1 End If Next j Cells(i, 1) = p_x Cells(i, 2) = p_y Next i End Sub 3 それぞれ12.5%の確率で8方向にパチンコ玉がはじかれる場合 Option Explicit Sub game() Dim i As Long, j As Long Dim p_x As Integer, p_y As Integer, c As Integer For