04 / 15 · 60–90 min
Move between states.
How does uncertainty propagate across three areas?
Check my intuition
01 · Predict
Before changing the settings.
The robot is certainly in A. From A it stays in A with probability 0.8 and goes to B with probability 0.2. What is the probability of being in B after one transition?
A hint
Only one matrix row is needed for the first step.
02 · Experiment and compare
Put the model to the test.
Compare one transition with twenty. Vary the chance of staying in A and then the robot count. Distinguish an exact probability from an observed frequency.
8 transitions, 1000 simulated robots. P(C) = 0.18.
- Area A
- 54.80 %
- Area B
- 27.16 %
- Sample / exact distance
- 1.24 %
Read values as a table
| Step | P(A) | P(B) | P(C) |
|---|---|---|---|
| 0.00 | 1.00 | 0.00 | 0.00 |
| 1.00 | 0.80 | 0.14 | 0.06 |
| 2.00 | 0.68 | 0.21 | 0.11 |
| 3.00 | 0.62 | 0.24 | 0.14 |
| 4.00 | 0.58 | 0.26 | 0.16 |
| 5.00 | 0.56 | 0.26 | 0.17 |
| 6.00 | 0.56 | 0.27 | 0.18 |
| 7.00 | 0.55 | 0.27 | 0.18 |
| 8.00 | 0.55 | 0.27 | 0.18 |
Understand the calculations
03 · Connect the diagram to calculations
The numbers behind motion.
The row vector p contains probabilities for three areas. Each row of P describes departures from one area and sums to 1. Departures are split between the other two areas. Exact calculation propagates p; simulation draws a zone for each robot. Reducible or periodic chains do not necessarily converge to a unique distribution.
pₖ₊₁ = pₖ P
Σⱼ Pᵢⱼ = 1 ; Pᵢⱼ ≥ 0
distance = ½ Σⱼ |pⱼ − fréquenceⱼ|Current transition matrix
[ 0.80 0.14 0.06 ] [ 0.12 0.60 0.28 ] [ 0.42 0.18 0.40 ]
A few lines to reconstruct
next_p = [sum(p[i] * P[i][j] for i in range(3)) for j in range(3)]The notebook provides one function per laboratory, hand-calculated examples and tests. Exercises isolate components; these pages run the complete simulations.
Keep an observation
04 · Record
What changed?
Compare two settings. Record the effect, your explanation and a case where the model might fail. Saving keeps the current settings and seed, not a certification of competence.
atomsh / lab