Mental Models204 cards · 12 fields

Mental Models/Mathematics & Statistics

Random Walk

随机游走

Each step is pure luck, yet the path looks like it's heading somewhere and keeps spreading out.

In the summer of 1827, the botanist Robert Brown was looking through a microscope in London at pollen soaking in water, and saw that the tiny particles given off by the pollen never stopped jiggling. Keep your eye on one and it shifts a little to the left, then a moment later turns off somewhere else. At first Brown suspected this was a sign of life, so he tried ground-up nonliving material instead, but the particles moved just the same. Only later did it become clear that water molecules were hitting the particles from every side. At each moment the hits don't exactly cancel out, so the particle gets a push; add up push after tiny push, and it traces a crooked, zigzag path.

The simplest random walk goes like this. You stand in the middle of a hallway and take one step for each coin toss: heads forward, tails back. No step favors either direction, yet after a hundred tosses you're rarely back where you started. Most likely you end up somewhere around ten steps from the start.

Each step is a coin toss, yet paths spread
Typical distance10 steps
Average push0 steps
-20-10010020406080100StepsSteps from startAverage pushTypical distance
-20-100100255075100StepsSteps from startAverage pushTypical distance

Eight people walk it once each. Four times the steps, twice the spread. Set going right to 51%: by 2,000 steps the average push of 40 nearly matches the spread.

Each step is independent, but the position carries the past

You start at 0 and toss a coin six times, going right on heads and left on tails. The results are right, right, left, right, right, right, so your positions are 1, 2, 1, 2, 3, 4, which together look like a rising trend. The seventh step has nothing to do with the first six, and the chance of going right is still one half. There is no momentum to keep rising and no force pulling the position back to zero. But this step starts from 4, so it can only reach 3 or 5. The first six steps don't decide the seventh step's direction, only where it starts from.

Four times the steps, only twice the typical distance

With each step of length 1, after steps the typical distance from the start is about

The steps forward and back mostly cancel each other out, so the distance grows only with the square root of the number of steps. The typical distance is the square root of the average squared distance. The reason is hidden in the squared distance. When you're already steps from the start, the next step takes you to or , half the time each, and the average of the two squares is . So each step adds exactly 1 to the average squared distance. At the start it is 0, so after steps it is , and its square root gives the typical distance .

100 steps gives about 10, 400 steps about 20, and 10,000 steps about 100: a hundred times the walking, but only ten times the typical distance.

Lean each step a little, and in the long run the direction outgrows the spread

Change the chance of going right from 0.5 to 0.51, and each step goes right by steps on average. After steps you've been pushed out steps on average and have spread out about steps. The first grows in proportion to the number of steps, faster than the second.

After 2,500 steps the average push is 50 steps, and the spread is also around 50 steps, so the two are even. By 10,000 steps the average push is 200 steps and the spread only about 100. The curve starts heading steadily right, and this time there really is a direction.

Coin-toss walks fit best for quantities that add up and don't show any lean yet, such as a particle's position, measurement errors, or a rise that has only just started. Once a system has a rule that pulls things back, the coin-toss walk no longer applies. When the room temperature drifts, the air conditioning pulls it back, so it doesn't wander further and further, and you need a model with a pull-back force. The opposite mistake happens too: seeing that a curve could have been drawn at random, you decide there's no mechanism behind it at all and don't even check for a lean. Yet a lean of 0.51 stays hidden in the spread for more than 2,000 steps.

Explore
When you suspect a rise in a curve is just chance, replace each step with a coin toss, draw a few dozen curves, and count how many of them show a rising stretch like this one too.
Communicate
To show colleagues why a curve looks like it has a trend, toss a coin 20 times on the spot and plot the position one square at a time on the whiteboard. A rising stretch shows up by itself.
  1. Am I looking at the change at each step, or at the position the changes add up to?
  2. Where can I get the raw data for each step of this curve?
  3. Is there a concrete rule that makes the next step depend on the current position, such as restocking, scheduling or calibration?

Biology

Bacteria swim toward sugar

An E. coli bacterium swims a short way, tumbles, and swims off again in a random new direction, much like a pollen particle. It can sense changes in how much sugar is around: when it senses things getting sweeter as it goes, it swims a little longer before tumbling. The lean at each step is tiny, but over thousands upon thousands of steps the whole colony gradually gathers on the side with more sugar.

Materials

Plastic molecules curl into balls

In the simplest model, a plastic molecule is a chain of about 40,000 links, each pointing in a direction independent of the others, like a random route of 40,000 steps. Stretched out straight it is 40,000 links long; curled into a ball, its two ends are only about 200 links apart. Pulling it open takes force, and when you let go it shrinks back into a ball.

Sports

Two equally matched chess players

You watch two equally matched chess players play 100 games with no draws, and draw a line of the running win-loss tally. Working it out as a fair coin, in about 40% of cases one player is ahead in over 90% of the games. On the chart, the line stays almost entirely on one side of zero.

A small cart's position is estimated by adding up its movement second by second. Each second's estimate adds an independent error that is equally likely to be plus or minus and always 1 millimeter in size, and nothing recalibrates it along the way. After 25 seconds of running, the typical position error is about 5 millimeters.

How many seconds in total must it run for the typical error to reach 15 millimeters?

You and a friend play a game in which you toss a fair coin each round. On heads your friend gives you 1 yuan; on tails you give your friend 1 yuan. Every round is independent. After the first 20 rounds you're up 6 yuan in total, and you play another 80 rounds under the same rules.

When all 100 rounds are done, how much would you expect to be up in total?

A bubble-tea shop takes each day's actual sales minus its forecast sales, adds the differences up day after day, and plots the running total as a curve. The curve has gone up 40 days in a row, and the manager wants to know whether the forecast is systematically too low or the shop has just been lucky.

Which of these checks can tell the two apart?