Our third class was devoted to exploring random processes through random walks. Many physical processes in nature – diffusion, radiation, conduction, current flow, fluid dynamics – can be modeled as a random process. This is certainly true at the quantum mechanical level, where there is inherent uncertainty in the position-momentum of a particle due to its wave-like nature (modeled as a probability wave function); this is Planck’s Uncertainty Principle. But even in “deterministic” classical mechanics, randomness plays a role in modeling complexity; it is simply too hard to measure the precise state of every particle in a system and all of the forces involved. This is where statistical mechanics and thermodynamics become important.

## Pre-assessment

There are many misconceptions in randomness that we probed in the pre-assessment. Given the following set of coin flips (H = heads, T = tails), students were asked to which sequence looked more random, and which was most improbable:

(1) HTTHHTTHHTHTH

(2) HTHTHTHTHTHTH

(3) HHHHTTTTHHHH

(4) HTTTTTTTTTTTTT

All of the students who answered said (1) looked “most random” (one abstained), while 40% (2/5) said (2) was most improbable (“too orderly”) and 60% (3/5) said (4) was most improbable (“unlikely”, “the rest look more like something you’d find”). This question touches on the common idea that randomness means little or no structure, a misconception that manifests itself in lucky (or cursed) numbers to cancer clustering. In fact, each of these sequences is equally probable as a random sequence of coin tosses, but since we as evolved pattern-recognizers we infer non-random structure in perfectly alternating (2) or sequential (4) patterns even when they arise from random processes

The next question probed student’s ideas about randomness and predictability. They were given the following sequences and asked to predict the last letter assuming these were random:

AABBABB__

AAAABBB__

ABABABA__

ABAAAAB__

ABBAABB__

These are created using a computer program with a pseudo-random number generator (see *why computers can’t easily provide perfectly random sequences*). Half of the students intuited that they couldn’t predict the letters if they were random, the other half justified they answer based on the patterns they recognized:

“Alternating sequence”

“4As -> 4Bs”

“increasing As, constant Bs”

“after B there are A’s”

“…instinct?”

One even mistrusted their instincts:

“Put the opposite of what I wanted to see”.

Remarkably, the next letter of each of these sequences is A – by (pseudo) random chance!

The last question probed randomness in physics specifically through True/False statements (some of students left questions blank):

Distributions of random numbers have no structure | True: 33% | False: 67% |

Randomness is inherent to classical physics | True: 50% | False: 50% |

Randomness is inherent to quantum physics | True: 60% | False: 40% |

If a process is truly random, you cannot predict its outcome | True: 80% | False: 20% |

Noise is a measure of randomness in nature | True: 60% | False: 40% |

Except for prediction, there wasn’t strong agreement on any of these questions, where were aimed to illicit ideas they’ve heard about randomness in physics and measurement. As part of our discussion at the start of class, we touched on these ideas, particularly how randomness is part of the world of the very small, but in the classical world we commonly equate or model complexity with randomness. I also emphasized that there is often structure in random numbers, as we were about to see.

## Exercises

### 1D Walks:

Our first set of exercises modeled random processes through a 1D walk, a model of diffusion in a static medium. Our “random number generator” was a flipped coin. Parallel yarn lines were laid out with 20 golf pegs indicating steps. Starting at the middle, students were to flip a coin, move left or right depending on whether the coin was heads or tails, and mark their location with a cardboard square (which had to be pinned down to prevent it from blowing away). After 30 steps, the students went back and counted their cards to make up a probability distribution of being at any particular step.

Before we started, the students were asked to predict the farthest they would go from the middle and the location of their last step, and to sketch out an expected distribution of where they would be in their 30 steps.

They did their walk – with many surprises! – and recorded their observed distributions.Only 2/6 students got what they predicted (which was generally a Gaussian-like distribution). Some distributions were skewed far to the left or right; one even walked off the designated path. Here’s their resulting distributions:

When added together, however, these distributions come much closer to a Gaussian centered close to the starting position, which most students predicted.

We then did a variation on this in which one direction was “preferred”; 2 steps forward versus 1 step back. This was aimed at modeling electric current flow in a wire (a very high resistance wire!). Starting a couple steps in from one end, students made predictions as to whether they would reach the other end, and if so how many moves it would take them to make it. Again, here are their individual distributions:

Only half of the students made it out (two actually fell off the wrong end!), which is about what they estimated. In the combined sum, we see what is starting to look like an asymmetric Gaussian, somewhat centered near the starting point but shifted and broader in the biased direction.

We discussed the outcome of this in terms of how much energy is “wasted” in going back and forth, and how that could be related to resistance in a wire.

## 2D Walks

Our last exercise modeled the flow of radiant energy out of the Sun as a series of 2D random walks. Energy is generated in the Sun at the core, where the pressure and temperature are high enough for hydrogen fusion to take place. That energy eventually makes its way to the surface through a long series of photon scatterings, absorptions, and reemissions, which can be effectively modeled as a random diffusion process with a mean path length that decreases outward as the density decreases.

Our model of this process was a series of concentric rings laid down on the ground, with each ring specifying a step size: inner = toe to heel, middle = regular step, outer = large step. Each student had a spinner to inform the direction of each step. They had 100 steps to “get out” of the Sun, and again they first had to make predictions as to whether they would escape and if so in how many steps.

To make sure this worked, I again ran a simulation in Python to check how often such random tracks escaped. The plot below shows one realization of this, typically 40-80% of the rays make it out in this simulation, which suggested that there wouldn’t be too much frustration by the students!

Indeed, nearly all of the students (5/6) made it out in 31, 55, 62, 74, and 87 steps. This was much higher than they had anticipated, and may be due in part to the tight space providing some extra outward pressure!

Following the simulation, we discussed how this simulation informs us about the energy content of the Sun; where most of the radiant energy resides, why opacity decreases outward, and how this can be an equilibrium process.

## Post-assessments

“Talking about the connections between various random processes in nature was new”

“I liked learning about randomness, I felt like the activity was very interactive and I even learned a but about distribution”

“[I was] surprised with how counterintuitive probability is”

“[I] want to know more about the different models and the different kinds of randomness”

“The thermodynamics of the sun was fun to learn about. I would enjoy learning more about the Sun”

[…] Class 3: Random Walk […]