The warmth on your face, the scenic view outside – such delights are delivered to you by countless photons from the sun. But believe it or not, these photons move in much the same way as an inebriated person wandering home from the pub, or the initial whiff of coffee as you open a bag of beans.

Let me explain.

Travelling at the fastest speed known to physics, these photons crossed from the sun to the Earth in a mere nine minutes. In contrast, the first 0.05% of the journey – just from the sun’s core up to its surface – lasted almost ten thousand million times as long, taking an average of 170,000 years to complete.

Why? Unlike the freedom of (almost) empty space, the interior of the sun is a crowded place indeed; so crowded that a photon at the speed of light can only cross about a millimetre of space before bumping into one of the sun’s atoms, where it is absorbed and then ejected again after a moment’s delay.

The photon struggles toward the surface as it is absorbed by atom after atom and spat out in a random direction each time, drifting along an aimless path until it finally manages to burst free of the sun.

Our knowledge of this extraordinary journey owes much to the modern mathematical theory of random walks, which allows us to extract predictable behaviours out of such random physical processes.

## Discrete random walks

The simplest type of random motion is a discrete one-dimensional random walk, in which the walker only moves back and forth along one particular direction (with the same-sized steps). If we keep track of our progress of eight such walks over the course of 100 steps, we might end up with the following graphs:

It’s tempting to think that we ought to hover around our starting point, since at every step we’re just as likely to move north as we are south. However, most of the random walks above have actually drifted a little bit away from the origin. In these cases, would we keep on drifting if we went further still?

The mathematics of random walks contains an interesting insight known as the level-crossing phenomena (also known as the gambler’s ruin, due to its implications). It turns out that if it’s allowed to go on forever, a simple random walk will cross every point infinitely many times. So yes, we are guaranteed to return to our starting point – eventually.

Apart from their established role as models of stock prices, one dimensional random walks are also familiar to tennis fans. Whenever a score of deuce (40-40) occurs, one of the players is required to score two consecutive points before the game is awarded.

Thus we enter a situation similar to a random walk, where the advantage moves back and forth between the players until it manages to get two steps away from deuce. Likewise for the fifth set at a Grand Slam tournament.

## Non-discrete drunken walks

Two-dimensional random walks are often illustrated by considering the walk of a tipsy pub patron on their way home.

Perhaps they are more than a little tipsy; they might take two steps forward and then abruptly lurch to the right, before stepping left and stumbling onwards in a discrete two-dimensional random walk (the steps are still the same size, but now the walker can move randomly on a two-dimensional grid). An example is below.

These types of random walks (and their higher-dimensional counterparts) are the basis on which nearly all random activity is modelled – from the wanderings of foraging animals to the twists and turns of chemical polymers.

French mathematician Louis Bachelier, who laid the foundations for a coherent mathematical theory of random walks in his 1900 PhD thesis, first noticed a striking feature of these random walks known as the Markov property: if you want to predict the future behaviour of the random walker, you only need know where they are right now. Knowing where they have been in the past adds no helpful insight whatsoever!

Remarkably, mathematics allows us to predict a great many properties of these paths accurately – even if we cannot know the details of the otherwise random walks in advance (a situation echoed in Chaos Theory).

For instance, we can calculate the probability that the walker will eventually return to their starting point, given a long enough time. For a festive friend walking on a two-dimensional surface, mathematics is on their side – they are almost certainly guaranteed to return to their starting point (if you wait long enough).

On the other hand, for three-dimensional random walks – like those taken by inebriated birds, or solar photons – there is only about a one-in-three chance of returning to the point of origin. Thus do photons eventually, inevitably, drift free of the sun after a predictable period of time.

## Continuous random walks

As the Roman philosopher Lucretius observed around 60 BCE, beams of sunlight can also shed light on an unexpected (and ubiquitous) natural phenomenon – the mysterious jittery motions of tiny particles.

At the turn of the 20th century the greatest minds in physics had also turned their attention to this phenomenon, dubbed Brownian motion. The explanation of its origins would provide the first definitive proof for the existence of atoms.

The namesake of Brownian motion was the Scottish botanist and cleric Robert Brown, who in 1827 was examining grains of pollen suspended in water under a microscope.

The microscopic pieces of pollen threw off some still tinier bits, and their jittery motion caught Brown’s eye. At first thinking that the movement may have some biological origin, the mystery grew deeper after Brown observed the same mysterious motion in similarly small particles of inorganic material.

The mystery was finally cracked by none other than Albert Einstein during his Annus Mirabilis (miracle year) of 1905. Einstein provided a detailed explanation for why Brownian motion occurred – the particles were so small that they were actually being buffeted to and fro by collisions with surrounding atoms and molecules, like a miniature plane in a never-ending storm of molecular turbulence.

By modelling Brownian motion as a random walk with tiny, random step sizes, driven by molecular collisions, Einstein’s mathematics enabled the very first estimates of the size of individual molecules.

Einstein’s equations were experimentally verified by French physicist Jean Perrin four years later, finally providing the first conclusive proof for the long-suspected existence of atoms.

Brownian motion is closely related to diffusion. Any time you open a perfume bottle, a fresh bag of coffee or any other aromatic container, the pleasant scent that you experience is due to the fragrant molecules being carried along fractal paths all the way from the container to your nose, through Brownian-like collisions with the gas molecules in the atmosphere.

## Walking on π (and other nifty numbers)

The mathematics of random walks has recently found a very novel application in the analysis of walks on numbers, first described in a 2013 paper by Francisco J. Aragón Artacho, David H. Bailey, Jonathan M. Borwein and Peter B. Borwein.

To take a two-dimensional walk on a particular number, we use the same ideas as for discrete two-dimension random walks – except, rather than choosing the step directions at random, we use the digits in the number’s base-b expansion (binary or decimal, say) as a set of instructions on where to go next.

A number like 1/3 (which has decimal expansion 0.333333…) is not particularly interesting – the walk will keep going in the same direction forever. A walk on the famous circle constant pi (π) whose digits begin 3.141592…, is far more fascinating, especially if it is taken on the first 100 billion digits of π:

As you can see, this long walk on π bears a striking similarity to a random walk. This is almost certainly not a coincidence – in fact, new pictures such as these may help us resolve a long-standing mathematical question regarding the “randomness” of the digits of π.

Any time random motion is present – be it drifting molecules, fluctuating stock prices or escaping sunlight – the mathematics of random walk theory allows us to extract predictable features from the otherwise unpredictable.

At the current frontiers of mathematical research it is allowing us to see familiar numbers in a whole new light.

## Giles Pickford
Giles Pickford is a Friend of The Conversation.

Retired, Wollongong

I have heard that there are only two totally chaotic systems in existence. They are the weather and the stock market. People try to predict both of them but it is impossible to get perfection in your predictions.

## Henry Verberne

Former IT Professional

Giles, it is possible to predict the weather to a fairly high level of accuracy. But yes, it is impossible to get perfection. But for most purposes that fairly high level is enough for practical purposes.

## John Nicol

logged in via email @bigpond.com

Henry Verberne

It depends what you mean by "fairly high accuracy" and what "practical purposes" it is "enough" for.

We have been connected to email and mobile phone SMS alerts for hail, high winds, heavy rain etc from the met bureau, covering the Ipswich South Brisbane area for about two years, the potential practical purpose being to make sure one's car is in the garage and one hasn't gone for a long walk in the open.

The warnings come in regular sequence but the storms usually forget…

Read more## Baron Pike

logged in via Facebook

And yet, Einstein was a causal determinist, or so I've been told. Perhaps he didn't see all randomness as necessarily three dimensional, or four dimensional if you see continual change as an additional dimension.

## Michael Gormly

Editor at Superkern Design Pty Ltd

Thanks for a great article, lucidly explaining the art of numbers and nature to we curious but mathematically dyslexic onlookers.

## John Nicol

logged in via email @bigpond.com

This is a great article of which there should be many more on The Converstion - both for themselves and also to partially and randomly displace another article which is inevitably political and left wing in nature.

leaving that aside, there would be much to comment upon here but our level of understanding of statistics and chaos are limiting factors. I have been interested in chaos since its discovery in relation to weather modelling, a role which it continues to play, ensuring that the highest…

Read more## Doug Hutcheson

Poet

John, "... another article which is inevitably political and left wing in nature". Have you noticed that anything to the Left of extreme Right tends to look Left wing to those on the extreme Right? That includes moderate Right, Middle and all flavours of Left. Are you sure your comment does not come from your own Right wing views?

Merry Christmas, anyway, and I make that comment having no political or religious affiliations <grin>.

## John Nicol

logged in via email @bigpond.com

Doug Hutcheson

Thanks again. I like your comment and yes my writings do certainly reflect at least a moderate to strong tendency to the right - but I don't think it is overwhelming, or hope not. I do have a lot of very left wing (by their own definition) friends.

It is probably not the left wing thing that I find a bit difficult with regards to The Conversation - same as the ABC - but the consistency of it. I have not yet found any article here that could possibly be construed as reflecting…

Read more## Doug Hutcheson

Poet

John Nicol, for my part, I would welcome a well-researched article refuting AGW, being published on TC. Even in science, it is hard to avoid any hint of ideology, but I am sure a good paper would be well considered by the TC publishers.

Read moreAs to my contribution, I am unable to do the original research required - I am not a scientist or mathematician - so I would have to merely regurgitate the work of others in the field and that would scarcely add to the rigour of the paper. I would, however, be glad…

## John Nicol

logged in via email @bigpond.com

Doug Hutcheson

I'll try then to put something together for the TC on global warming. My suggestion for collaboration did not specify climate change as the topic necessarily - you might like to suggest something else.

I did not mean to imply, though may have, somewhat unconsciously, that your views were left wing - I am sorry if I did. You seem to be very balanced and middle of the road to me also. However, I believe - that word again - that of the range of views on climate change among…

Read more## Doug Hutcheson

Poet

John Nicol, as I am most concerned about AGW, other topics would probably not engage me as much. Peak Oil is another, as is global population overshoot, clean water depletion and so forth. I am privately predicting a global pandemic any time soon, involving drug resistant illnesses, such as the resistant tuberculosis we are seeing increase in PNG. AGW is just one of the Four Horsemen, although I think there will be more than four converging threats.

Read moreIn spite of my dire predictions, I am continuing…