Random Walks in the Plane
Loading the math board and drawing, please wait…
This example demonstrates a random walk in a 2D plane where each step is randomly chosen from North, South, East, or West with equal 25% probability. After 12 moves, the path and final position are visualized. Key math concepts include Probability & Statistics, Coordinate Geometry, Vectors, Sequences, and Discrete Random Processes. GeoGebra commands like Random, If, Segment, DotPlot, and PolyLine are used to construct the simulation, plotting the path and final distribution. Suitable for high school and above to explore random processes and data analysis.
GeoGebra Commands & Parameters
Random(1, 4) → B1Random(1, 4) → B2Random(1, 4) → B3Random(1, 4) → B4Random(1, 4) → B5Random(1, 4) → B6Random(1, 4) → B7Random(1, 4) → B8Random(1, 4) → B9Random(1, 4) → B10Random(1, 4) → B11Random(1, 4) → B12If(B1 ≟ 1, A1 + (1, 0), If[B1 ≟ 2, A1 + (0, 1), If[B1 ≟ 3, A1 + (-1, 0), A1 + (0, -1)]]) → A2If(B2 ≟ 1, A2 + (1, 0), If[B2 ≟ 2, A2 + (0, 1), If[B2 ≟ 3, A2 + (-1, 0), A2 + (0, -1)]]) → A3If(B3 ≟ 1, A3 + (1, 0), If[B3 ≟ 2, A3 + (0, 1), If[B3 ≟ 3, A3 + (-1, 0), A3 + (0, -1)]]) → A4If(B4 ≟ 1, A4 + (1, 0), If[B4 ≟ 2, A4 + (0, 1), If[B4 ≟ 3, A4 + (-1, 0), A4 + (0, -1)]]) → A5If(B5 ≟ 1, A5 + (1, 0), If[B5 ≟ 2, A5 + (0, 1), If[B5 ≟ 3, A5 + (-1, 0), A5 + (0, -1)]]) → A6If(B6 ≟ 1, A6 + (1, 0), If[B6 ≟ 2, A6 + (0, 1), If[B6 ≟ 3, A6 + (-1, 0), A6 + (0, -1)]]) → A7If(B7 ≟ 1, A7 + (1, 0), If[B7 ≟ 2, A7 + (0, 1), If[B7 ≟ 3, A7 + (-1, 0), A7 + (0, -1)]]) → A8If(B8 ≟ 1, A8 + (1, 0), If[B8 ≟ 2, A8 + (0, 1), If[B8 ≟ 3, A8 + (-1, 0), A8 + (0, -1)]]) → A9If(B9 ≟ 1, A9 + (1, 0), If[B9 ≟ 2, A9 + (0, 1), If[B9 ≟ 3, A9 + (-1, 0), A9 + (0, -1)]]) → A10If(B10 ≟ 1, A10 + (1, 0), If[B10 ≟ 2, A10 + (0, 1), If[B10 ≟ 3, A10 + (-1, 0), A10 + (0, -1)]]) → A11If(B11 ≟ 1, A11 + (1, 0), If[B11 ≟ 2, A11 + (0, 1), If[B11 ≟ 3, A11 + (-1, 0), A11 + (0, -1)]]) → A12If(B12 ≟ 1, A12 + (1, 0), If[B12 ≟ 2, A12 + (0, 1), If[B12 ≟ 3, A12 + (-1, 0), A12 + (0, -1)]]) → A13Segment(A1, A13) → aIf(B1 ≟ 1, "E", If[B1 ≟ 2, "N", If[B1 ≟ 3, "W", "S"]]) → C1If(B2 ≟ 1, "E", If[B2 ≟ 2, "N", If[B2 ≟ 3, "W", "S"]]) → C2If(B3 ≟ 1, "E", If[B3 ≟ 2, "N", If[B3 ≟ 3, "W", "S"]]) → C3If(B4 ≟ 1, "E", If[B4 ≟ 2, "N", If[B4 ≟ 3, "W", "S"]]) → C4If(B5 ≟ 1, "E", If[B5 ≟ 2, "N", If[B5 ≟ 3, "W", "S"]]) → C5If(B6 ≟ 1, "E", If[B6 ≟ 2, "N", If[B6 ≟ 3, "W", "S"]]) → C6If(B7 ≟ 1, "E", If[B7 ≟ 2, "N", If[B7 ≟ 3, "W", "S"]]) → C7If(B8 ≟ 1, "E", If[B8 ≟ 2, "N", If[B8 ≟ 3, "W", "S"]]) → C8If(B9 ≟ 1, "E", If[B9 ≟ 2, "N", If[B9 ≟ 3, "W", "S"]]) → C9If(B10 ≟ 1, "E", If[B10 ≟ 2, "N", If[B10 ≟ 3, "W", "S"]]) → C10If(B11 ≟ 1, "E", If[B11 ≟ 2, "N", If[B11 ≟ 3, "W", "S"]]) → C11If(B12 ≟ 1, "E", If[B12 ≟ 2, "N", If[B12 ≟ 3, "W", "S"]]) → C12DotPlot(data) → list1PolyLine(A1, A2, A11, A12, A13, A3, A4, A5, A6, A7, A8, A9, A10) → c
AI Drawing Prompt Reference
Draw a random walk path in a 2D plane starting at the origin, moving randomly north, south, east, or west 12 times in total, connecting each endpoint with line segments to show the entire path, and use a dot plot to indicate the direction of each move (E, S, W, N), marking the final position with a point.
The prompt above was compiled from the original drawing commands and is for reference only.