plus.maths.org
https://plus.maths.org/content
enMaths in a minute: The axioms of probability theory
https://plus.maths.org/content/maths-minute-axioms-probability
<div class="field field-name-field-abs-img field-type-image field-label-hidden"><div class="field-items"><div class="field-item even"><img class="img-responsive" src="https://plus.maths.org/content/sites/plus.maths.org/files/abstractpics/%5Buid%5D/%5Bsite-date%5D/balls_icon_0.jpg" width="100" height="100" alt="" /></div></div></div><div class="field field-name-body field-type-text-with-summary field-label-hidden"><div class="field-items"><div class="field-item even"><p>Chance is a slippery concept. We all know that some random events
are more likely to occur than others, but how do you quantify such
differences? How do you work out the probability of, say, rolling a 6
on a die? And what does it mean to say the probability is 1/6?</p>
<div class="rightimage" style="width: 300px;"><img src="/content/sites/plus.maths.org/files/articles/2013/chance/balls.jpg" alt="" width="300" height="257" /><p>The probability of getting 6 right in the national lottery is around 1 in 14 million.</p></div>
<p>Mathematicians avoid these tricky
questions by defining the probability of an event mathematically
without going into its deeper meaning. At the heart of this definition
are three conditions,
called the <em>axioms</em> of probability theory.</p>
<ul><li><strong>Axiom 1:</strong> The probability of an event is a
real number greater than or equal to 0. </li>
<li><strong>Axiom 2:</strong> The probability that at least one of all
the possible outcomes of a process (such as rolling a die) will occur is 1.
<li><strong>Axiom 3:</strong> If two events <em>A</em> and
<em>B</em> are mutually exclusive, then the probability of either <em>A</em> or
<em>B</em> occurring
is the probability of <em>A</em> occurring plus the probability of
<em>B</em> occurring. </li></ul>
<p>As we have presented them here, these axioms are a simplified
version of those laid down be the mathematician <a
href="http://www-groups.dcs.st-and.ac.uk/history/Biographies/Kolmogorov.html">Andrey
Kolmogorov</a> in 1933. Up until then, the basic
concepts of probability theory had been "considered to be
quite peculiar" (Kolmogorov's words) so his aim was to put them in their "natural place,
among the general notions of modern mathematics". To this end
Kolmogorov also gave a precise mathematical definition (in terms of
sets) of what is
meant by a "random event". We have left this bit out when stating the
axioms above, but you can read about it in Kolmogorov's original text
<a
href="https://www.york.ac.uk/depts/maths/histstat/kolmogorov_foundations.pdf"><em>Foundations
of the theory of probability</em></a>.</p>
<p> With his axioms Kolmogorov put
probability into the wider context of <em>measure theory</em>. When
you are measuring something (such as length, area or volume) you are
assigning a number to some sort of mathematical object (a line
segment, a 2D shape, or a 3D shape). In a similar way, probability is
also a way of assigning a number to a mathematical object (collections
of events). Kolmogorov's formulation meant that the mathematical
theory of measures could encompass the theory of probability as a
special case.
</p>
<p>If you are familiar with probability you might feel that two
central ideas of the theory are missing from the above axioms. One is
the idea that the probabilities of all the possible mutually exclusive
outcomes of a process sum to 1, and the other is the notion of
<em>independent events</em>.</p>
<p>The first is simply a consequence of the axioms. Suppose that some
process (rolling a die) can result in a number of mutually exclusive <em>elementary
events</em> (rolling a
1, 2, 3, 4, 5, or 6). Then by axiom 2, the probability that at least
one of these events occurs is 1. Axiom 3 implies that the probability that at least
one of them occurs is the sum of the individual probabilities of the
elementary events. In
other words, the sum of the individual probabilities of the
elementary events is 1.</p>
<p>Moving on to the second missing feature, notice that the notion of
independence doesn't apply at the level of the events that can result from a single
process (such as rolling a die), but at the level of processes: we
need to say what we mean by two processes (such as rolling a die twice) being independent. Having
carefully defined what we mean by "two processes" mathematically,
Kolmogorov gives the familiar definition of independence. It amounts to
saying that two events are independent if the probability of both of
them occurring is equal to the product of their individual probabilities.</p>
</div></div></div>Thu, 10 May 2018 10:42:16 +0000Marianne7032 at https://plus.maths.org/contenthttps://plus.maths.org/content/maths-minute-axioms-probability#commentsArithmetic billiards
https://plus.maths.org/content/arithmetic-billiards-0
<div class="field field-name-field-abs-img field-type-image field-label-hidden"><div class="field-items"><div class="field-item even"><img class="img-responsive" src="https://plus.maths.org/content/sites/plus.maths.org/files/abstractpics/%5Buid%5D/%5Bsite-date%5D/arithmetic_billiard_icon.jpg" width="100" height="100" alt="" /></div></div></div><div class="field field-name-field-author field-type-text field-label-inlinec clearfix field-label-inline"><div class="field-label">By </div><div class="field-items"><div class="field-item even">Antonella Perucca</div></div></div><div class="field field-name-body field-type-text-with-summary field-label-hidden"><div class="field-items"><div class="field-item even"><p>Mathematical billiards is an idealisation of what we
experience on a regular pool table. In mathematical billiards the ball
bounces around according to the same rules as in ordinary billiards,
but it has no mass, which means there is no friction. There also aren't any
pockets that can swallow the ball. This means that the ball will
bounce infinitely many times on the sides of the billiard table and keep going forever.</p>
<p>One fascinating aspect of mathematical billiards is that it gives
us a geometrical method to determine the least common multiple and the
greatest common divisor of two natural numbers. Have a look at the <a href="https://www.geogebra.org">Geogebra</a> animation below (the play button is in the bottom left corner)
and try to figure out how the construction works. If you would like to play the animation again, double click the refresh button in the top right corner. The two natural numbers are 40 and 15 in this case. The least common multiple of 40 and 15 equals 120, and the
greatest common divisor is 5.</p>
<iframe scrolling="no" title="Arithmetic billiards" src="https://www.geogebra.org/material/iframe/id/ujYNgZbD/width/443/height/286/border/888888/smb/false/stb/false/stbh/false/ai/false/asb/false/sri/true/rc/false/ld/false/sdz/true/ctl/false" width="443px" height="286px" style="border:0px;"> </iframe>
<h3>The basics</h3>
<p>Here is the basic idea. Suppose we are given two positive whole numbers <img src="/MI/767f35f953eab3eef95a50b115293912/images/img-0001.png" alt="$a$" style="vertical-align:0px;
width:9px;
height:7px" class="math gen" /> and <img src="/MI/767f35f953eab3eef95a50b115293912/images/img-0002.png" alt="$b$" style="vertical-align:0px;
width:7px;
height:11px" class="math gen" />, neither of which is a multiple of the other (the case where one is a multiple of the other is easy and is left to the reader). For the billiard table we take a rectangle whose sides have lengths <img src="/MI/767f35f953eab3eef95a50b115293912/images/img-0001.png" alt="$a$" style="vertical-align:0px;
width:9px;
height:7px" class="math gen" /> and <img src="/MI/767f35f953eab3eef95a50b115293912/images/img-0002.png" alt="$b$" style="vertical-align:0px;
width:7px;
height:11px" class="math gen" />. We shoot a billiard ball from one corner (the bottom left in the figure above) making a 45 degree angle with the sides. The billiard ball bounces off the rectangle’s sides. It does not lose speed and, by the law of reflection, is reflected at a 45 degree angle each time it meets a side (thus the path only makes left or right 90 degree turns). The path of the billiard ball consists of line segments. </p>
<p> We claim that the ball eventually hits a corner and that the <em>least common multiple</em> of <img src="/MI/f83d2374a96814ddc2e4ff7fe8d514dd/images/img-0001.png" alt="$a$" style="vertical-align:0px;
width:9px;
height:7px" class="math gen" /> and <img src="/MI/f83d2374a96814ddc2e4ff7fe8d514dd/images/img-0002.png" alt="$b$" style="vertical-align:0px;
width:7px;
height:11px" class="math gen" /> is the length of the path the ball has traversed until it hit the corner, divided by <img src="/MI/f83d2374a96814ddc2e4ff7fe8d514dd/images/img-0003.png" alt="$\sqrt {2}$" style="vertical-align:-2px;
width:21px;
height:17px" class="math gen" />. If you decompose the billiard table into <em>unit squares</em> (squares of side length one), the least common multiple is equal to the number of unit squares which are crossed by the path. </p>
<p>We also claim that the path crosses itself. The first segment of the path contains the point of self-intersection which is closest to the starting point. The <em>greatest common divisor</em> of the two given numbers, we claim, is the distance from the starting point to the closest point of self-intersection, divided by <img src="/MI/a55ba841d99ec3477792ec0085744c84/images/img-0001.png" alt="$\sqrt {2}$" style="vertical-align:-2px;
width:21px;
height:17px" class="math gen" />. It is also equal to the number of unit squares crossed by the piece of the path from the starting point to the first point of self-intersection. </p>
<h3>Mirror billiards</h3>
<p>While looking at an object in a mirror, you have the impression that the object is
behind the mirror. Notice that three points are aligned: the point
marking your position, the point on the mirror where you see the reflection of the object and
the (imaginary) point behind the mirror where you believe the object to be. To prove our claims above, we are going to
exploit this simple idea, the mirror being one side of the billiard
table.</p>
<p>The <em>least common multiple</em> of <img src="/MI/f77ee630dc1552e753b94e26088a96fa/images/img-0001.png" alt="$a$" style="vertical-align:0px;
width:9px;
height:7px" class="math gen" /> and <img src="/MI/f77ee630dc1552e753b94e26088a96fa/images/img-0002.png" alt="$b$" style="vertical-align:0px;
width:7px;
height:11px" class="math gen" />, written as <img src="/MI/f77ee630dc1552e753b94e26088a96fa/images/img-0003.png" alt="$lcm(a,b)$" style="vertical-align:-4px;
width:61px;
height:18px" class="math gen" />, is the smallest natural number that is a multiple of both <img src="/MI/f77ee630dc1552e753b94e26088a96fa/images/img-0001.png" alt="$a$" style="vertical-align:0px;
width:9px;
height:7px" class="math gen" /> and <img src="/MI/f77ee630dc1552e753b94e26088a96fa/images/img-0002.png" alt="$b$" style="vertical-align:0px;
width:7px;
height:11px" class="math gen" />. We can write it as <img src="/MI/f77ee630dc1552e753b94e26088a96fa/images/img-0004.png" alt="$ma=nb$" style="vertical-align:0px;
width:62px;
height:11px" class="math gen" /> for some positive whole numbers <img src="/MI/f77ee630dc1552e753b94e26088a96fa/images/img-0005.png" alt="$m$" style="vertical-align:0px;
width:14px;
height:7px" class="math gen" /> and <img src="/MI/f77ee630dc1552e753b94e26088a96fa/images/img-0006.png" alt="$n$" style="vertical-align:0px;
width:10px;
height:7px" class="math gen" />. For example, if <img src="/MI/f77ee630dc1552e753b94e26088a96fa/images/img-0007.png" alt="$a=4$" style="vertical-align:0px;
width:39px;
height:12px" class="math gen" /> and <img src="/MI/f77ee630dc1552e753b94e26088a96fa/images/img-0008.png" alt="$b=6$" style="vertical-align:0px;
width:37px;
height:12px" class="math gen" />, then <img src="/MI/f77ee630dc1552e753b94e26088a96fa/images/img-0009.png" alt="$lcm(a,b)=12$" style="vertical-align:-4px;
width:101px;
height:18px" class="math gen" /> and can be written as </p><table id="a0000000002" class="equation" width="100%" cellspacing="0" cellpadding="7">
<tr>
<td style="width:40%"> </td>
<td><img src="/MI/f77ee630dc1552e753b94e26088a96fa/images/img-0010.png" alt="\[ 12 = 3\times 4 = 2 \times 6. \]" style="width:138px;
height:12px" class="math gen" /></td>
<td style="width:40%"> </td>
<td class="eqnnum" style="width:20%"> </td>
</tr>
</table><p> In this case <img src="/MI/f77ee630dc1552e753b94e26088a96fa/images/img-0011.png" alt="$m=3$" style="vertical-align:0px;
width:44px;
height:12px" class="math gen" /> and <img src="/MI/f77ee630dc1552e753b94e26088a96fa/images/img-0012.png" alt="$n=2$" style="vertical-align:0px;
width:40px;
height:12px" class="math gen" />. </p>
<p>Given our two numbers <img src="/MI/cf8900397a637e05c442727706fe1495/images/img-0001.png" alt="$a$" style="vertical-align:0px;
width:9px;
height:7px" class="math gen" /> and <img src="/MI/cf8900397a637e05c442727706fe1495/images/img-0002.png" alt="$b$" style="vertical-align:0px;
width:7px;
height:11px" class="math gen" />, none of which is a multiple of the other, start by forming a square with sides of length <img src="/MI/cf8900397a637e05c442727706fe1495/images/img-0003.png" alt="$lcm(a,b)$" style="vertical-align:-4px;
width:61px;
height:18px" class="math gen" />. Notice that this can be decomposed into <img src="/MI/cf8900397a637e05c442727706fe1495/images/img-0004.png" alt="$m\times n$" style="vertical-align:0px;
width:45px;
height:8px" class="math gen" /> rectangles with sides of length <img src="/MI/cf8900397a637e05c442727706fe1495/images/img-0001.png" alt="$a$" style="vertical-align:0px;
width:9px;
height:7px" class="math gen" /> and <img src="/MI/cf8900397a637e05c442727706fe1495/images/img-0002.png" alt="$b$" style="vertical-align:0px;
width:7px;
height:11px" class="math gen" />. That’s because <img src="/MI/cf8900397a637e05c442727706fe1495/images/img-0001.png" alt="$a$" style="vertical-align:0px;
width:9px;
height:7px" class="math gen" /> fits into <img src="/MI/cf8900397a637e05c442727706fe1495/images/img-0003.png" alt="$lcm(a,b)$" style="vertical-align:-4px;
width:61px;
height:18px" class="math gen" /> a total of <img src="/MI/cf8900397a637e05c442727706fe1495/images/img-0005.png" alt="$m$" style="vertical-align:0px;
width:14px;
height:7px" class="math gen" /> times and <img src="/MI/cf8900397a637e05c442727706fe1495/images/img-0002.png" alt="$b$" style="vertical-align:0px;
width:7px;
height:11px" class="math gen" /> fits into <img src="/MI/cf8900397a637e05c442727706fe1495/images/img-0003.png" alt="$lcm(a,b)$" style="vertical-align:-4px;
width:61px;
height:18px" class="math gen" /> a total of <img src="/MI/cf8900397a637e05c442727706fe1495/images/img-0006.png" alt="$n$" style="vertical-align:0px;
width:10px;
height:7px" class="math gen" /> times. Because <img src="/MI/cf8900397a637e05c442727706fe1495/images/img-0007.png" alt="$ma=nb$" style="vertical-align:0px;
width:62px;
height:11px" class="math gen" /> is the <em>least</em> common multiple of <img src="/MI/cf8900397a637e05c442727706fe1495/images/img-0001.png" alt="$a$" style="vertical-align:0px;
width:9px;
height:7px" class="math gen" /> and <img src="/MI/cf8900397a637e05c442727706fe1495/images/img-0002.png" alt="$b$" style="vertical-align:0px;
width:7px;
height:11px" class="math gen" /> our square is the smallest square that can be <em>tiled</em> by rectangles with sides of lengths <img src="/MI/cf8900397a637e05c442727706fe1495/images/img-0001.png" alt="$a$" style="vertical-align:0px;
width:9px;
height:7px" class="math gen" /> and <img src="/MI/cf8900397a637e05c442727706fe1495/images/img-0002.png" alt="$b$" style="vertical-align:0px;
width:7px;
height:11px" class="math gen" /> in this way. We’ll call the bottom left of these rectangles <img src="/MI/cf8900397a637e05c442727706fe1495/images/img-0008.png" alt="$R$" style="vertical-align:0px;
width:13px;
height:11px" class="math gen" /> and the top right <img src="/MI/cf8900397a637e05c442727706fe1495/images/img-0009.png" alt="$S$" style="vertical-align:0px;
width:10px;
height:11px" class="math gen" />. </p>
<div class="centreimage"><img src="/content/sites/plus.maths.org/files/articles/2018/billiards/billiards2.png" alt="Square" width="350" height="364" />
<p style="width: 350px;">In this example <em>a</em>=4 and <em>b</em>=6. Their least common multiple is 3x4=2x6=12, so the square has sides of lengths 12. It contains 3x2=6 rectangles.</p>
</div>
<!-- Image made by MF -->
<p>Now draw the diagonal <img src="/MI/e1273b68f9e2a2778ac5ef1e2cffb6fa/images/img-0001.png" alt="$d$" style="vertical-align:0px;
width:9px;
height:11px" class="math gen" /> of the square which starts at the bottom left corner and ends in the top right corner. </p>
<div class="centreimage"><img src="/content/sites/plus.maths.org/files/articles/2018/billiards/billiard3.png" alt="Square with diagonal" width="350" height="343" />
<p style="width: 350px;"></p>
</div>
<!-- Image made by MF -->
<p> From <img src="/MI/a0ec31568636da4f2ad0a53785357a63/images/img-0001.png" alt="$d$" style="vertical-align:0px;
width:9px;
height:11px" class="math gen" /> we’ll now create a zig-zag path <img src="/MI/a0ec31568636da4f2ad0a53785357a63/images/img-0002.png" alt="$t$" style="vertical-align:0px;
width:6px;
height:10px" class="math gen" />, which lies entirely within the bottom left rectangle <img src="/MI/a0ec31568636da4f2ad0a53785357a63/images/img-0003.png" alt="$R$" style="vertical-align:0px;
width:13px;
height:11px" class="math gen" />, using repeated reflection. This path <img src="/MI/a0ec31568636da4f2ad0a53785357a63/images/img-0002.png" alt="$t$" style="vertical-align:0px;
width:6px;
height:10px" class="math gen" /> will turn out to be the path of an arithmetic billiard ball moving within the rectangle <img src="/MI/a0ec31568636da4f2ad0a53785357a63/images/img-0003.png" alt="$R$" style="vertical-align:0px;
width:13px;
height:11px" class="math gen" />. </p><p>We start with the top right square <img src="/MI/a0ec31568636da4f2ad0a53785357a63/images/img-0004.png" alt="$S$" style="vertical-align:0px;
width:10px;
height:11px" class="math gen" /> and reflect it in the side that is crossed by the diagonal <img src="/MI/a0ec31568636da4f2ad0a53785357a63/images/img-0001.png" alt="$d$" style="vertical-align:0px;
width:9px;
height:11px" class="math gen" />, which it shares with a neighbouring rectangle (the rectangle below <img src="/MI/a0ec31568636da4f2ad0a53785357a63/images/img-0004.png" alt="$S$" style="vertical-align:0px;
width:10px;
height:11px" class="math gen" /> in our example). Let’s write <img src="/MI/a0ec31568636da4f2ad0a53785357a63/images/img-0005.png" alt="$S^{\prime }$" style="vertical-align:0px;
width:14px;
height:13px" class="math gen" /> for this rectangle. </p>
<div class="centreimage"><img src="/content/sites/plus.maths.org/files/articles/2018/billiards/billiards4.png" alt="First reflection" width="350" height="364" />
<p style="width: 400px;">Reflecting the square <em>S</em> in its bottom side reflects part of the diagonal into the rectangle below <em>S</em>. </p>
</div>
<!-- Image made by MF -->
<p> Now reflect <img src="/MI/a003971963c314441c4ec93ca81ddcb3/images/img-0001.png" alt="$S^{\prime }$" style="vertical-align:0px;
width:14px;
height:13px" class="math gen" /> in the other side that is crossed by <img src="/MI/a003971963c314441c4ec93ca81ddcb3/images/img-0002.png" alt="$d$" style="vertical-align:0px;
width:9px;
height:11px" class="math gen" /> (its left side in our example), not the one that would get us back to <img src="/MI/a003971963c314441c4ec93ca81ddcb3/images/img-0003.png" alt="$S$" style="vertical-align:0px;
width:10px;
height:11px" class="math gen" />. </p>
<div class="centreimage"><img src="/content/sites/plus.maths.org/files/articles/2018/billiards/billiards5.png" alt="First reflection" width="350" height="352" />
<p style="width: 400px;">Reflecting <em>S</em>' in its left side.</p>
</div>
<!-- Image made by MF -->
<p>Keep going like this, reflecting rectangles across sides crossed by <img src="/MI/97a59211b3f2823545c3d1c05e3850b4/images/img-0001.png" alt="$d$" style="vertical-align:0px;
width:9px;
height:11px" class="math gen" />, until you reach the bottom left rectangle <img src="/MI/97a59211b3f2823545c3d1c05e3850b4/images/img-0002.png" alt="$R$" style="vertical-align:0px;
width:13px;
height:11px" class="math gen" />. The repeated reflections transform the diagonal <img src="/MI/97a59211b3f2823545c3d1c05e3850b4/images/img-0001.png" alt="$d$" style="vertical-align:0px;
width:9px;
height:11px" class="math gen" /> into the zig-zag path <img src="/MI/97a59211b3f2823545c3d1c05e3850b4/images/img-0003.png" alt="$t$" style="vertical-align:0px;
width:6px;
height:10px" class="math gen" />. </p>
<div class="centreimage"><img src="/content/sites/plus.maths.org/files/articles/2018/billiards/billiards6.png" alt="First reflection" width="350" height="364" />
<p style="width: 350px;">The last reflection results in the path <em>t</em> entirely contained in the rectangle <em>R</em>.</p>
</div>
<!-- Image made by MF -->
<p> The path <img src="/MI/02f6d8a05974a2ab2e0adb05b7b3ff57/images/img-0001.png" alt="$t$" style="vertical-align:0px;
width:6px;
height:10px" class="math gen" /> is exactly the path of a ball shot from the bottom left corner of <img src="/MI/02f6d8a05974a2ab2e0adb05b7b3ff57/images/img-0002.png" alt="$R$" style="vertical-align:0px;
width:13px;
height:11px" class="math gen" /> at 45 degree angles to the sides of <img src="/MI/02f6d8a05974a2ab2e0adb05b7b3ff57/images/img-0002.png" alt="$R$" style="vertical-align:0px;
width:13px;
height:11px" class="math gen" />. You can verify this using the animation below. </p>
<iframe scrolling="no" title="Arithmetic billiards 3" src="https://www.geogebra.org/material/iframe/id/bZxaHQ7G/width/427/height/397/border/888888/smb/false/stb/false/stbh/false/ai/false/asb/false/sri/true/rc/false/ld/false/sdz/true/ctl/false" width="427px" height="397px" style="border:0px;"> </iframe>
<p>To prove that this is really the case, recall that the ball will make 90 degree turns whenever it hits a side of <img src="/MI/c0d9ba8baad9e22b1de42a3acfbc39a9/images/img-0001.png" alt="$R$" style="vertical-align:0px;
width:13px;
height:11px" class="math gen" />. It’s quite easy to see that the path <img src="/MI/c0d9ba8baad9e22b1de42a3acfbc39a9/images/img-0002.png" alt="$t$" style="vertical-align:0px;
width:6px;
height:10px" class="math gen" /> does the same. This is best explained using a picture: </p>
<div class="centreimage"><img src="/content/sites/plus.maths.org/files/articles/2018/billiards/billiards7.png" alt="First reflection" width="350" height="337" />
<p style="width: 350px;">The path <em>t</em> makes 90 degree turns when it meets a side of <em>R</em>.</p>
</div>
<!-- Image made by MF -->
<p>Our path <img src="/MI/36e41c4956d774bb1bec8933bc600e64/images/img-0001.png" alt="$t$" style="vertical-align:0px;
width:6px;
height:10px" class="math gen" /> ends at the point that comes from repeatedly reflecting the top right corner of <img src="/MI/36e41c4956d774bb1bec8933bc600e64/images/img-0002.png" alt="$S$" style="vertical-align:0px;
width:10px;
height:11px" class="math gen" /> in sides of rectangles, so the end point of <img src="/MI/36e41c4956d774bb1bec8933bc600e64/images/img-0001.png" alt="$t$" style="vertical-align:0px;
width:6px;
height:10px" class="math gen" /> is a corner of <img src="/MI/36e41c4956d774bb1bec8933bc600e64/images/img-0003.png" alt="$R$" style="vertical-align:0px;
width:13px;
height:11px" class="math gen" />. </p>
<p>Now the length of <img src="/MI/61e7cfc2bc6e3b60908d149cdd67a89b/images/img-0001.png" alt="$t$" style="vertical-align:0px;
width:6px;
height:10px" class="math gen" /> is equal to the length of the diagonal <img src="/MI/61e7cfc2bc6e3b60908d149cdd67a89b/images/img-0002.png" alt="$d$" style="vertical-align:0px;
width:9px;
height:11px" class="math gen" />. The length of the diagonal of any square is <img src="/MI/61e7cfc2bc6e3b60908d149cdd67a89b/images/img-0003.png" alt="$\sqrt {2}$" style="vertical-align:-2px;
width:21px;
height:17px" class="math gen" /> times its side length (this comes from Pythagoras’ theorem). Therefore </p><table id="a0000000002" class="equation" width="100%" cellspacing="0" cellpadding="7">
<tr>
<td style="width:40%"> </td>
<td><img src="/MI/61e7cfc2bc6e3b60908d149cdd67a89b/images/img-0004.png" alt="\[ |t| = \sqrt {2} lcm(a,b), \]" style="width:124px;
height:20px" class="math gen" /></td>
<td style="width:40%"> </td>
<td class="eqnnum" style="width:20%"> </td>
</tr>
</table><p>where <img src="/MI/61e7cfc2bc6e3b60908d149cdd67a89b/images/img-0005.png" alt="$|t|$" style="vertical-align:-4px;
width:12px;
height:17px" class="math gen" /> stands for the length of <img src="/MI/61e7cfc2bc6e3b60908d149cdd67a89b/images/img-0001.png" alt="$t$" style="vertical-align:0px;
width:6px;
height:10px" class="math gen" />. Rearranging, we have that </p><table id="a0000000003" class="equation" width="100%" cellspacing="0" cellpadding="7">
<tr>
<td style="width:40%"> </td>
<td><img src="/MI/61e7cfc2bc6e3b60908d149cdd67a89b/images/img-0006.png" alt="\[ lcm(a,b) = \frac{|t|}{\sqrt {2}}, \]" style="width:115px;
height:39px" class="math gen" /></td>
<td style="width:40%"> </td>
<td class="eqnnum" style="width:20%"> </td>
</tr>
</table><p>which is exactly what we were trying to prove. </p>
<p>Our method worked perfectly for our example, but can we be sure it works for general values of <img src="/MI/75a19d6a7debc5af95e4f1f3aa2ac3e2/images/img-0001.png" alt="$a$" style="vertical-align:0px;
width:9px;
height:7px" class="math gen" /> and <img src="/MI/75a19d6a7debc5af95e4f1f3aa2ac3e2/images/img-0002.png" alt="$b$" style="vertical-align:0px;
width:7px;
height:11px" class="math gen" /> (that aren’t multiples of each other)? The only thing that could go wrong is that the diagonal <img src="/MI/75a19d6a7debc5af95e4f1f3aa2ac3e2/images/img-0003.png" alt="$d$" style="vertical-align:0px;
width:9px;
height:11px" class="math gen" /> of the square meets the corner of a rectangle which lies in the interior of the square. If that were the case, we wouldn’t know which of the two sides that meet at the corner to reflect in. </p><p>We’ll show that this can’t happen. It’s quite easy to convince yourself that any point <img src="/MI/75a19d6a7debc5af95e4f1f3aa2ac3e2/images/img-0004.png" alt="$p$" style="vertical-align:-3px;
width:10px;
height:10px" class="math gen" /> on the diagonal determines a square: simply drop a line down vertically until you hit the bottom edge of the original square, and draw a horizontal line over to the left until you hit the left edge of the original square. </p>
<div class="centreimage"><img src="/content/sites/plus.maths.org/files/articles/2018/billiards/billiards10.png" alt="First reflection" width="350" height="347" />
<p style="width: 350px;">Any point on the diagonal of a square determines a smaller square.</p>
</div>
<!-- Image made by MF -->
<p>If such a point were also the corner of one of the rectangles, then our small square would be tiled by rectangles with sides of lengths <img src="/MI/47978ca2535d4aefd653d3ef75a83942/images/img-0001.png" alt="$a$" style="vertical-align:0px;
width:9px;
height:7px" class="math gen" /> and <img src="/MI/47978ca2535d4aefd653d3ef75a83942/images/img-0002.png" alt="$b$" style="vertical-align:0px;
width:7px;
height:11px" class="math gen" />. But this is impossible: as we noted above, the square with side length <img src="/MI/47978ca2535d4aefd653d3ef75a83942/images/img-0003.png" alt="$ma=nb$" style="vertical-align:0px;
width:62px;
height:11px" class="math gen" /> is the smallest square that can be tiled in this way. </p>
<p>We’ve shown that <img src="/MI/0fd70a084f5d1bcb7585f9d214148b23/images/img-0001.png" alt="$lcm(a,b)$" style="vertical-align:-4px;
width:61px;
height:18px" class="math gen" /> is equal to the length of the path <img src="/MI/0fd70a084f5d1bcb7585f9d214148b23/images/img-0002.png" alt="$t$" style="vertical-align:0px;
width:6px;
height:10px" class="math gen" /> divided by <img src="/MI/0fd70a084f5d1bcb7585f9d214148b23/images/img-0003.png" alt="$\sqrt {2}$" style="vertical-align:-2px;
width:21px;
height:17px" class="math gen" />. Let’s move on to the unit squares. </p>
<h3>The unit squares crossed by the path</h3>
<p>To count the number of unit squares (squares with sides of length <img src="/MI/39011acccaa08acdd6140d0023f57532/images/img-0001.png" alt="$1$" style="vertical-align:0px;
width:6px;
height:12px" class="math gen" />) the path <img src="/MI/39011acccaa08acdd6140d0023f57532/images/img-0002.png" alt="$t$" style="vertical-align:0px;
width:6px;
height:10px" class="math gen" /> crosses, we equip our rectangle <img src="/MI/39011acccaa08acdd6140d0023f57532/images/img-0003.png" alt="$R$" style="vertical-align:0px;
width:13px;
height:11px" class="math gen" /> with a coordinate system. The vertical axis runs along the left vertical side of <img src="/MI/39011acccaa08acdd6140d0023f57532/images/img-0003.png" alt="$R$" style="vertical-align:0px;
width:13px;
height:11px" class="math gen" /> and the horizontal axis runs along the bottom side of <img src="/MI/39011acccaa08acdd6140d0023f57532/images/img-0003.png" alt="$R$" style="vertical-align:0px;
width:13px;
height:11px" class="math gen" />. The coordinates of the corners of the unit squares are whole numbers. </p>
<div class="centreimage"><img src="/content/sites/plus.maths.org/files/articles/2018/billiards/coordinates.png" alt="First reflection" width="400" height="310" />
<p style="width: 400px;">The rectangle <em>R</em> with its coordinate systems. Coordinates of the corners of unit squares that lie on <em>t</em> are shown in red. </p>
</div>
<!-- Image made by MF -->
<p>It’s clear that if <img src="/MI/ed2aa55154c11dd0e891accacf4a67c4/images/img-0001.png" alt="$t$" style="vertical-align:0px;
width:6px;
height:10px" class="math gen" /> crosses a unit square, it does so along a diagonal. You can also convince yourself that if the corner of any unit square lies on <img src="/MI/ed2aa55154c11dd0e891accacf4a67c4/images/img-0001.png" alt="$t$" style="vertical-align:0px;
width:6px;
height:10px" class="math gen" />, then its coordinates must add up to an even number. Any unit square only has two corners whose coordinates add up to an even number and these are diagonally opposite each other. Therefore <img src="/MI/ed2aa55154c11dd0e891accacf4a67c4/images/img-0001.png" alt="$t$" style="vertical-align:0px;
width:6px;
height:10px" class="math gen" /> can only pass along one of the two diagonals of a unit square. </p>
<p>We leave it up to you to show that <img src="/MI/1dff8f1a237c1b77d95d5afdfa310757/images/img-0001.png" alt="$t$" style="vertical-align:0px;
width:6px;
height:10px" class="math gen" /> never passes along the diagonal of a unit square twice, neither in the same direction, nor in the opposite direction. You will need to show that the end point of <img src="/MI/1dff8f1a237c1b77d95d5afdfa310757/images/img-0001.png" alt="$t$" style="vertical-align:0px;
width:6px;
height:10px" class="math gen" /> is different from its starting point. To do this, note that at least one of <img src="/MI/e52aac98b53c8152ca09c9159d58b066/images/img-0001.png" alt="$m$" style="vertical-align:0px;
width:14px;
height:7px" class="math gen" /> or <img src="/MI/8f44fa37c063b81a5577d3977d187a7b/images/img-0001.png" alt="$n$" style="vertical-align:0px;
width:10px;
height:7px" class="math gen" /> must be odd, and that the end point of <img src="/MI/1dff8f1a237c1b77d95d5afdfa310757/images/img-0001.png" alt="$t$" style="vertical-align:0px;
width:6px;
height:10px" class="math gen" /> comes from repeatedly reflecting the top right corner of the rectangle <img src="/MI/c12a4c5cb34a12a37df59d446ecae7a3/images/img-0001.png" alt="$S$" style="vertical-align:0px;
width:10px;
height:11px" class="math gen" />.</p>
<p>We now know that <img src="/MI/3bf55f6adf729b97e75df09481918ba1/images/img-0001.png" alt="$t$" style="vertical-align:0px;
width:6px;
height:10px" class="math gen" /> never crosses a unit square more than once and always does so along the diagonal. Since the diagonal of a unit square has length <img src="/MI/3bf55f6adf729b97e75df09481918ba1/images/img-0002.png" alt="$\sqrt {2}$" style="vertical-align:-2px;
width:21px;
height:17px" class="math gen" />, the number of squares crossed by <img src="/MI/3bf55f6adf729b97e75df09481918ba1/images/img-0001.png" alt="$t$" style="vertical-align:0px;
width:6px;
height:10px" class="math gen" /> is </p><table id="a0000000002" class="equation" width="100%" cellspacing="0" cellpadding="7">
<tr>
<td style="width:40%"> </td>
<td><img src="/MI/3bf55f6adf729b97e75df09481918ba1/images/img-0003.png" alt="\[ \frac{|t|}{\sqrt {2}} = \frac{\sqrt {2} lcm(a,b)}{\sqrt {2}} = lcm(a,b), \]" style="width:225px;
height:41px" class="math gen" /></td>
<td style="width:40%"> </td>
<td class="eqnnum" style="width:20%"> </td>
</tr>
</table><p>just as we claimed above. </p>
<h3>The greatest common divisor</h3>
<p> We claimed that the greatest common divisor of <img src="/MI/10899a19642ebdce1b4ab72f6655f3c7/images/img-0001.png" alt="$a$" style="vertical-align:0px;
width:9px;
height:7px" class="math gen" /> and <img src="/MI/10899a19642ebdce1b4ab72f6655f3c7/images/img-0002.png" alt="$b$" style="vertical-align:0px;
width:7px;
height:11px" class="math gen" /> <img src="/MI/10899a19642ebdce1b4ab72f6655f3c7/images/img-0003.png" alt="$gcd(a,b)$" style="vertical-align:-4px;
width:59px;
height:18px" class="math gen" /> is the distance from the starting point of <img src="/MI/10899a19642ebdce1b4ab72f6655f3c7/images/img-0004.png" alt="$t$" style="vertical-align:0px;
width:6px;
height:10px" class="math gen" /> to the closest point of self-intersection, divided by <img src="/MI/10899a19642ebdce1b4ab72f6655f3c7/images/img-0005.png" alt="$\sqrt {2}$" style="vertical-align:-2px;
width:21px;
height:17px" class="math gen" />. It is also equal to the number of unit squares crossed by the piece of the path from the starting point to the first point of self-intersection. </p>
<p>Let’s first assume that <img src="/MI/b5605ca05e94014ad78e68116bf2ba3b/images/img-0001.png" alt="$gcd(a,b)=1$" style="vertical-align:-4px;
width:89px;
height:18px" class="math gen" />. In this case, the least common multiple of <img src="/MI/b5605ca05e94014ad78e68116bf2ba3b/images/img-0002.png" alt="$a$" style="vertical-align:0px;
width:9px;
height:7px" class="math gen" /> and <img src="/MI/b5605ca05e94014ad78e68116bf2ba3b/images/img-0003.png" alt="$b$" style="vertical-align:0px;
width:7px;
height:11px" class="math gen" /> is the product <img src="/MI/b5605ca05e94014ad78e68116bf2ba3b/images/img-0004.png" alt="$ab$" style="vertical-align:0px;
width:16px;
height:11px" class="math gen" /> (see if you can prove this for yourself). By our previous result, the number of unit squares crossed by our path is also <img src="/MI/b5605ca05e94014ad78e68116bf2ba3b/images/img-0004.png" alt="$ab$" style="vertical-align:0px;
width:16px;
height:11px" class="math gen" />. Since the sides of the rectangle <img src="/MI/b5605ca05e94014ad78e68116bf2ba3b/images/img-0005.png" alt="$R$" style="vertical-align:0px;
width:13px;
height:11px" class="math gen" /> have lengths <img src="/MI/b5605ca05e94014ad78e68116bf2ba3b/images/img-0002.png" alt="$a$" style="vertical-align:0px;
width:9px;
height:7px" class="math gen" /> and <img src="/MI/b5605ca05e94014ad78e68116bf2ba3b/images/img-0003.png" alt="$b$" style="vertical-align:0px;
width:7px;
height:11px" class="math gen" />, there are <img src="/MI/b5605ca05e94014ad78e68116bf2ba3b/images/img-0004.png" alt="$ab$" style="vertical-align:0px;
width:16px;
height:11px" class="math gen" /> unit squares in total. And since the path crosses no unit square more than once, it must cross all <img src="/MI/b5605ca05e94014ad78e68116bf2ba3b/images/img-0004.png" alt="$ab$" style="vertical-align:0px;
width:16px;
height:11px" class="math gen" /> unit squares in this case. </p>
<div class="centreimage"><img src="/content/sites/plus.maths.org/files/articles/2018/billiards/billiards8.png" alt="First reflection" width="600" height="441" />
<p style="width: 600px;">In this example <em>a</em>=3 and <em>b</em>=8. The greatest common divisor is 1 and the least common multiple is 24.</p>
</div>
<!-- Image made by MF -->
<p>We already know that the corners of unit squares that lie on <img src="/MI/00f0a1e5a2445e83ba8525c628c29144/images/img-0001.png" alt="$t$" style="vertical-align:0px;
width:6px;
height:10px" class="math gen" /> all have coordinates that add to an even number. Conversely, the fact that every unit square is crossed by <img src="/MI/00f0a1e5a2445e83ba8525c628c29144/images/img-0001.png" alt="$t$" style="vertical-align:0px;
width:6px;
height:10px" class="math gen" /> means that every point with coordinates that add to an even number lies on <img src="/MI/00f0a1e5a2445e83ba8525c628c29144/images/img-0001.png" alt="$t$" style="vertical-align:0px;
width:6px;
height:10px" class="math gen" />. </p>
<p>This means that the points with coordinates <img src="/MI/7a8848a72f4376253c3d7672607e4a3a/images/img-0001.png" alt="$(0,0)$" style="vertical-align:-4px;
width:34px;
height:18px" class="math gen" />, <img src="/MI/7a8848a72f4376253c3d7672607e4a3a/images/img-0002.png" alt="$(2,0)$" style="vertical-align:-4px;
width:34px;
height:18px" class="math gen" /> and <img src="/MI/7a8848a72f4376253c3d7672607e4a3a/images/img-0003.png" alt="$(0,2)$" style="vertical-align:-4px;
width:34px;
height:18px" class="math gen" /> and <img src="/MI/7a8848a72f4376253c3d7672607e4a3a/images/img-0004.png" alt="$(2,2)$" style="vertical-align:-4px;
width:34px;
height:18px" class="math gen" /> all lie on <img src="/MI/7a8848a72f4376253c3d7672607e4a3a/images/img-0005.png" alt="$t$" style="vertical-align:0px;
width:6px;
height:10px" class="math gen" />. This can only happen if <img src="/MI/7a8848a72f4376253c3d7672607e4a3a/images/img-0006.png" alt="$(1,1)$" style="vertical-align:-4px;
width:34px;
height:18px" class="math gen" /> is a self-intersection point of <img src="/MI/7a8848a72f4376253c3d7672607e4a3a/images/img-0005.png" alt="$t$" style="vertical-align:0px;
width:6px;
height:10px" class="math gen" />. </p>
<p> The point <img src="/MI/e02b86611dc50a3fa287121dbbd38ac0/images/img-0001.png" alt="$(1,1)$" style="vertical-align:-4px;
width:34px;
height:18px" class="math gen" /> is therefore a point at which <img src="/MI/e02b86611dc50a3fa287121dbbd38ac0/images/img-0002.png" alt="$t$" style="vertical-align:0px;
width:6px;
height:10px" class="math gen" /> intersects itself, and it’s the point closest to <img src="/MI/e02b86611dc50a3fa287121dbbd38ac0/images/img-0003.png" alt="$(0,0)$" style="vertical-align:-4px;
width:34px;
height:18px" class="math gen" /> along <img src="/MI/e02b86611dc50a3fa287121dbbd38ac0/images/img-0002.png" alt="$t$" style="vertical-align:0px;
width:6px;
height:10px" class="math gen" />. The distance from <img src="/MI/e02b86611dc50a3fa287121dbbd38ac0/images/img-0003.png" alt="$(0,0)$" style="vertical-align:-4px;
width:34px;
height:18px" class="math gen" /> to <img src="/MI/e02b86611dc50a3fa287121dbbd38ac0/images/img-0001.png" alt="$(1,1)$" style="vertical-align:-4px;
width:34px;
height:18px" class="math gen" /> along <img src="/MI/e02b86611dc50a3fa287121dbbd38ac0/images/img-0002.png" alt="$t$" style="vertical-align:0px;
width:6px;
height:10px" class="math gen" /> is <img src="/MI/e02b86611dc50a3fa287121dbbd38ac0/images/img-0004.png" alt="$\sqrt {2}$" style="vertical-align:-2px;
width:21px;
height:17px" class="math gen" />. Divide this by <img src="/MI/e02b86611dc50a3fa287121dbbd38ac0/images/img-0004.png" alt="$\sqrt {2}$" style="vertical-align:-2px;
width:21px;
height:17px" class="math gen" /> and you get <img src="/MI/e02b86611dc50a3fa287121dbbd38ac0/images/img-0005.png" alt="$1$" style="vertical-align:0px;
width:6px;
height:12px" class="math gen" />, the greatest common divisor of <img src="/MI/e02b86611dc50a3fa287121dbbd38ac0/images/img-0006.png" alt="$a$" style="vertical-align:0px;
width:9px;
height:7px" class="math gen" /> and <img src="/MI/e02b86611dc50a3fa287121dbbd38ac0/images/img-0007.png" alt="$b$" style="vertical-align:0px;
width:7px;
height:11px" class="math gen" /> (by our assumption above). The number of unit squares crossed on the way from <img src="/MI/e02b86611dc50a3fa287121dbbd38ac0/images/img-0003.png" alt="$(0,0)$" style="vertical-align:-4px;
width:34px;
height:18px" class="math gen" /> to <img src="/MI/e02b86611dc50a3fa287121dbbd38ac0/images/img-0001.png" alt="$(1,1)$" style="vertical-align:-4px;
width:34px;
height:18px" class="math gen" /> along <img src="/MI/e02b86611dc50a3fa287121dbbd38ac0/images/img-0002.png" alt="$t$" style="vertical-align:0px;
width:6px;
height:10px" class="math gen" /> is also equal to <img src="/MI/e02b86611dc50a3fa287121dbbd38ac0/images/img-0005.png" alt="$1$" style="vertical-align:0px;
width:6px;
height:12px" class="math gen" />. This proves our original claim for <img src="/MI/e02b86611dc50a3fa287121dbbd38ac0/images/img-0008.png" alt="$gcd(a,b)$" style="vertical-align:-4px;
width:59px;
height:18px" class="math gen" /> for the case in which <img src="/MI/e02b86611dc50a3fa287121dbbd38ac0/images/img-0009.png" alt="$gcd(a,b) =1$" style="vertical-align:-4px;
width:89px;
height:18px" class="math gen" />. </p>
<p>If <img src="/MI/6a856800c756230218d30c0c97d7c2e3/images/img-0001.png" alt="$gcd(a,b)\neq 1$" style="vertical-align:-4px;
width:89px;
height:18px" class="math gen" />, then we can rescale the whole figure by a factor <img src="/MI/6a856800c756230218d30c0c97d7c2e3/images/img-0002.png" alt="$gcd(a, b)$" style="vertical-align:-4px;
width:59px;
height:18px" class="math gen" />: dividing <img src="/MI/6a856800c756230218d30c0c97d7c2e3/images/img-0003.png" alt="$a$" style="vertical-align:0px;
width:9px;
height:7px" class="math gen" /> and <img src="/MI/6a856800c756230218d30c0c97d7c2e3/images/img-0004.png" alt="$b$" style="vertical-align:0px;
width:7px;
height:11px" class="math gen" /> by their greatest common divisor, we obtain two positive integers whose greatest common divisor is <img src="/MI/6a856800c756230218d30c0c97d7c2e3/images/img-0005.png" alt="$1$" style="vertical-align:0px;
width:6px;
height:12px" class="math gen" />. We can repeat the construction from above for these two integers, and then scale the picture up by multiplying each axis in our coordinate system by <img src="/MI/6a856800c756230218d30c0c97d7c2e3/images/img-0006.png" alt="$gcd(a,b)$" style="vertical-align:-4px;
width:59px;
height:18px" class="math gen" />. Unit squares then become squares of side length <img src="/MI/6a856800c756230218d30c0c97d7c2e3/images/img-0006.png" alt="$gcd(a,b)$" style="vertical-align:-4px;
width:59px;
height:18px" class="math gen" />. All geometric properties not related to the length (the shape of the path, in which corner the billiard ball lands, etc...) are unaffected by the rescaling. </p>
<div class="centreimage"><img src="/content/sites/plus.maths.org/files/articles/2018/billiards/billiards9.png" alt="First reflection" width="600" height="379" />
<p style="width: 600px;">In this example <em>a</em>=9 and <em>b</em>=24. The greatest common divisor is 3. Dividing through by 3, we get 3 and 8, the numbers used in the example above. Scaling up the picture from the previous example by a factor of 3 then gives us this picture. The unit squares from the previous picture turn into larger squares of side length 3, made up of 3x3=9 unit squares each.</p>
</div>
<!-- Image made by MF -->
<p>It then follows that the self-intersection point closest to the starting point lies on the first segment of the path at distance <img src="/MI/a60fcffdb0846d78c0d0f235d4de393b/images/img-0001.png" alt="$\sqrt {2}gcd(a, b)$" style="vertical-align:-4px;
width:80px;
height:19px" class="math gen" /> from the starting corner and that <img src="/MI/a60fcffdb0846d78c0d0f235d4de393b/images/img-0002.png" alt="$gcd(a, b)$" style="vertical-align:-4px;
width:59px;
height:18px" class="math gen" /> is the number of unit squares crossed by the first segment of the path from the starting point to the closest point of self-intersection. </p>
<h3>Questions for the reader</h3>
<p>If you enjoyed this article, then here are some questions you might
want to explore yourself:</p>
<ol><li>If one of the two given numbers is a multiple of the other, what is the shape of
the arithmetic billiard path?</li>
<li> For which numbers does the arithmetic billiard path end in the corner opposite
to the starting point?</li>
<li>
What are the symmetries of the arithmetic billiard path (as a
geometrical figure)?</li>
</ol>
<hr/>
<h3>About the author</h3>
<div class="rightimage" style="width: 150px;"><img src="/content/sites/plus.maths.org/files/articles/2018/billiards/AntonellaPerucca.jpg" alt="Antonella Perucca" width="150" height="230" />
<p></p>
</div>
<p>Antonella Perucca is Professor for Mathematics and its Didactics at the University of Luxembourg. She is a researcher in number theory and invents mathematical exhibits (for example the "Chinese Remainder Clock"). To find out more, explore her <a href="http://www.antonellaperucca.net/">webpage</a>. She would like to thank Andrew Bruce for help with the article.</p>
</div></div></div>Tue, 24 Apr 2018 14:55:13 +0000Marianne7027 at https://plus.maths.org/contenthttps://plus.maths.org/content/arithmetic-billiards-0#commentsThe maths of randomness
https://plus.maths.org/content/maths-randomness
<div class="field field-name-field-abs-img field-type-image field-label-hidden"><div class="field-items"><div class="field-item even"><img class="img-responsive" src="https://plus.maths.org/content/sites/plus.maths.org/files/abstractpics/%5Buid%5D/%5Bsite-date%5D/icon_4.png" width="100" height="100" alt="" /></div></div></div><div class="field field-name-field-author field-type-text field-label-inlinec clearfix field-label-inline"><div class="field-label">By </div><div class="field-items"><div class="field-item even">Martin Hairer</div></div></div><div class="field field-name-body field-type-text-with-summary field-label-hidden"><div class="field-items"><div class="field-item even"><div class="rightshoutout"><p>Watch our conversation with Martin Hairer <a href="#video">below</a></p></div>
<p>
For an idea we are all familiar with, randomness is surprisingly hard to formally define. We think of a random process as something that evolves over time but in a way we can’t predict. One example would be the smoke that comes out of your chimney. Although there is no way of exactly predicting the shape of your smoke plume, we can use <em>probability theory</em> – the mathematical language we use to describe randomness – to predict what shapes the plume of smoke is more (or less) likely to take.
</p>
<div class="rightimage" style="max-width:250px"><img src="/content/sites/plus.maths.org/files/articles/2018/hairer/beamsplitter.png" alt="beamsplitter"><p>A beamsplitter</p></div>
<!-- Image from https://commons.wikimedia.org/wiki/File:Flat_metal-coated_beamsplitter.png in public domain -->
<p>
Smoke formation is an example of an inherently random process, and there is evidence that nature is random at a fundamental level. The theory of quantum mechanics, describing physics at the smallest scales of matter, posits that, at a very basic level, nature is random. This is very different to the laws of 19th century physics, such as Newton's laws of motion (you can read more about them <a href="/content/maths-minute-newtons-laws-motion">here</a> ). Newton's physical laws are <em>deterministic</em>: if you were god and you had a precise description of everything in the world at a particular instant, then you could predict the whole future.
</p>
<p>
This is not the case according to quantum mechanics. Think of a <em>beam splitter</em> (a device that splits a beam of light in two); half of the light passes through the beam splitter, and half gets reflected off its surface.What would happen if you sent a single photon of light to the beam splitter? The answer is that we can't know for sure. Even if you were completely omniscient and knew everything about that photon and the experiment, there's no way you could predict whether the photon will be reflected or not. The only thing you can say is that the photon will be reflected with a probability of 1/2, and go straight with probability of 1/2. (You can read more about quantum mechanics <a href="/content/deadandalive">here</a>.)
</p>
<h3>Insufficient information</h3>
<p>
Most of the times we use probability theory, it's not because we are dealing with a fundamentally random process. Instead, it's usually because we don't possess all the information required to predict the outcome of the process. We are left to guess, in some sense, what the outcome could be and how likely it is that different outcomes happen. The way we make or interpret these "guesses" depends on which interpretation of the concept of probability you agree with.
</p>
<div class="leftimage" style="max-width: 250px;"><img src="/content/sites/plus.maths.org/files/articles/2018/hairer/ballot_web.jpg" alt="Ballot" /><p>One of the 2016 US presidential ballots (Photo <a href="https://commons.wikimedia.org/wiki/File:2016_Presidential_Election_ballot.jpg">Corey Taratuta</a> <a href="https://creativecommons.org/licenses/by/2.0/deed.en">CC BY 2.0</a>)</p></div>
<p>
The first interpretation is subjective – you interpret a probability as a guess, made before the event, of how likely it is that a given outcome will happen. This interpretation is known as <em>Bayesian</em>, after the English statistician <a href="http://www-history.mcs.st-andrews.ac.uk/Biographies/Bayes.html">Thomas Bayes</a>, who famously came up with a way of calculating probabilities based on the evidence you have.
</p><p>
In particular, Bayes' theorem in all its forms allows you to update your beliefs about the likelihood of outcomes in response to new evidence. An example are the changing percentages associated with the outcomes of certain candidates winning future elections. It was a widely held belief that Hillary Clinton would win the US presidential election in 2016: going into the polls it was estimated she had a <a href="https://www.nytimes.com/interactive/2016/upshot/presidential-polls-forecast.html">85% probability of winning</a>. As information about the poll became available, this belief was continuously updated until the likelihood reached 0%, indicating certainty that she lost.
</p><p>
The other interpretation of probabilities is objective – you repeat the same experiment many times and record how frequently an outcome occurs. This frequency is taken as the probability of that outcome occurring and is called the <em>frequentist</em> interpretation of probabilities. (You can read more about these two interpretations in <a href="/content/struggling-chance">Struggling with chance</a>.)
</p><p>
Statisticians often argue about who is right: proponents of the first interpretation (the Bayesians) and those who believe more in the second interpretation (the frequentists). (For example, what would a frequentist interpretation of the probability of Clinton’s election chances be? You can't repeat an election multiple times!)
</p>
<h3>Agnostic statistics</h3>
<div class="rightimage" style="width: 250px;"><img src="/content/sites/plus.maths.org/files/articles/2014/haigh/dice.jpg" alt="Dice" width="250" height="250" /><p></p></div>
<p>
As mathematicians we try to keep out of these arguments, we have the luxury of brushing these questions to the side. We only care about the maths of the theory of randomness, and that theory is fine! There is absolutely no controversy from a mathematical point of view and we have a well-defined theory of how to work with probabilities.
</p>
<p>
For example, suppose I had a six-sided die. Assuming the die is fair, we'd say the probability of rolling any particular number, say a 6, was 1/6. If I wanted to roll an even number, that is, a 2, a 4 or a 6, then I can add the probabilities of these three outcomes together as they are <em>mutually exclusive</em>:
</p><p>
P(even number) = P(2 or 4 or 6) = 1/6 + 1/6 + 1/6 = 1/2 .
</p><p>
And if we had two dice and wanted to know the probability of rolling two 6s, then we would multiply the probabilities of the individual outcomes, as these outcomes are independent:
</p><p>
P(two 6s) = P(6 and 6) = 1/6 x 1/6 = 1/36 .
</p><p>
The maths for working with probabilities is completely well defined, regardless of your statistical religion. There are, however, two important concepts that we must consider when understanding probabilities – <a href="/content/maths-randomness-symmetry">symmetry</a> and <a href="/content/maths-randomness-universality">universality</a> – which we will explore in the next articles.
</p>
<div class="centreimage" style="max-width:560px">
<iframe width="560" height="315" src="https://www.youtube.com/embed/7CBLzPB2uCY?rel=0" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>
<p></p></div>
<hr/>
<h3>About this article</h3>
<div class="rightimage"><img src="/content/sites/plus.maths.org/files/articles/2018/hairer/mugshot--tojpeg_1515529178410_x1.jpg" alt="Hairer"><p>Martin Hairer</p></div>
<p>Martin Hairer is a Professor of Pure Mathematics at <a href="http://www.imperial.ac.uk/mathematics/">Imperial College London</a>. His research is in probability and stochastic analysis and he was awarded the <a href="/content/mh">Fields Medal in 2014</a>. This article is based on his lecture at the <a href="http://www.heidelberg-laureate-forum.org/">Heidelberg Laureate Forum</a> in September 2017.</p></div></div></div>Fri, 20 Apr 2018 14:03:29 +0000Rachel7029 at https://plus.maths.org/contenthttps://plus.maths.org/content/maths-randomness#commentsThe maths of randomness: universality
https://plus.maths.org/content/maths-randomness-universality
<div class="field field-name-field-abs-img field-type-image field-label-hidden"><div class="field-items"><div class="field-item even"><img class="img-responsive" src="https://plus.maths.org/content/sites/plus.maths.org/files/abstractpics/%5Buid%5D/%5Bsite-date%5D/champagn_icon_0.jpg" width="100" height="100" alt="" /></div></div></div><div class="field field-name-field-author field-type-text field-label-inlinec clearfix field-label-inline"><div class="field-label">By </div><div class="field-items"><div class="field-item even">Martin Hairer</div></div></div><div class="field field-name-body field-type-text-with-summary field-label-hidden"><div class="field-items"><div class="field-item even"><div class="rightshoutout"><p>Watch our conversation with Martin Hairer <a href="#video">below</a></p></div>
<p>
Despite the fact that randomness is surprisingly hard to define, we do have a well defined way of describing randomness mathematically with <em>probability theory</em>. (You can read more in the <a href="/content/maths-randomness">previous article</a>.) And there are two guiding principles in understanding probabilities: <em>symmetry</em> and <em>universality</em>.
</p><p>
<em>Universality</em>, the second guiding principle in understanding probability, is a more subtle concept than symmetry. (You can read about the principle of symmetry <A href="/content/maths-randomness-symmetry">here</a>.) The idea of universality is that that if an outcome is a consequence of many different sources of randomness, then the details of the underlying mechanisms should not matter.
</p>
<h3>At larger scales</h3>
<div class="rightimage" style="max-width: 250px;"><img src="/content/sites/plus.maths.org/files/packages/2016/events/champagne.jpg" alt="Brain" />
<p>The behaviour of all fluids can be described by the same mathematics.</p>
</div>
<!-- Image from fotolia.com-->
<p>
This concept comes from theoretical physics. Fluids, for example, all behave in much the same way, even though they are made up of molecules with very different shapes and properties. If you look at the molecules in two different fluids microscopically, you would find that they look very different. If you looked at how the two fluids behave at large scales, however, you would see very similar behaviour. The behaviour of all fluids can be described with the same mathematical model, and one which has which has only a few parameters. (You can read more about fluid mechanics in <a href="/content/going-flow"><em>Going with the flow</em></a> and <a href="/content/maths-minute-navier-stokes-equations"><em>Maths in a minute: The Navier-Stokes equations</em></a>.)
</p><p>
It's a similar story in probability theory. At large scales information is aggregated and, sometimes, the same mathematics can describe the outcomes of different underlying processes.
An example of a mathematical theorem that captures this concept is the <em>central limit theorem</em>. This theorem says if we compound many random quantities, the result will always follow a "bell curve" – the shape of the <em>normal distribution</em>. (You can read more about the central limit theorem <a href="/content/maths-three-minutes-central-limit-theorem">here</a>.)
</p><p>
The central limit theorem is universal. It says that a large set of averages of samples of the property you are measuring will follow the normal distribution, even if the distribution of the property you are measuring is itself not normal. The distribution for flipping a coin many times is <em>uniform</em>: you will get it landing heads half the time and tails half the time. But if you flip a coin 100 times and take the average (with 0 for heads and 1 for tails), then flip a coin another 100 times and take the average, and so on, until you have lots of averages, then these averages will be normally distributed with mean 0.5. Similar to the case for fluid dynamics, the microscopic details of the distribution of the underlying property can be ignored, as the macroscopic view of the distribution of averages will always be normal.
</p>
<h3>Brownian motion</h3>
<p>
One of the most famous and surprising examples of universality comes from the discovery of <em>Brownian motion</em>. In 1827 the Scottish botanist <a href=”https://en.wikipedia.org/wiki/Robert_Brown_(botanist,_born_1773)”>Robert Brown</a> was looking at pollen grains suspended in water under a microscope. He observed highly irregular motion in the microscopic particles released by the pollen grains that he could not explain. Intrigued, he went on to conduct many experiments, ruling out any external causes for this jittery motion from the surrounding environment or the experimental set-up, and any internal causes, such as the particles being organic. (He observed the same motion in a inorganic particles, such as coal dust.)
</p><p>
This jittery motion – <a href="https://en.wikipedia.org/wiki/Brownian_motion#History"><em>Brownian motion</em></a> – was independently explained by Albert Einstein and Marian Smoluchowski in 1905: the vibrating fluid molecules in the liquid give tiny kicks to the microscopic particles, and these many independent tiny kicks accumulated to buffet the microparticles about.
</p>
<iframe width="560" height="315" src="https://www.youtube.com/embed/cDcprgWiQEY?rel=0" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>
<p>
The resulting Brownian motion is random – you can't predict with certainty the position of one of these microparticles from one moment to the next. But you can assign a probability distribution describing where a particle might move to. Einstein and Smoluchowski realised that the way this probability distribution changed over time was described by the same mathematics for describing the way heat flows through objects: using Joesph Fourier's <a href="/content/maths-minute-fourier-series">heat equation</a>.
</p><p>
This theory came with quantitative predictions that were verified experimentally by Jean Perrin in 1908, not only confirming this description of Brownian motion but settling the debate about the existence of atoms.
</p>
<h3>The bigger picture</h3>
<p>
Brownian motion is universal. It is observed in the random motion of many microparticles regardless of the underlying details of the particular shapes of the particles and fluid molecules involved. But this universality extends even further. Brownian motion was actually first mathematically described by French mathematician Louis Bachelier when he was studying financial systems in 1900. Bachelier described the evolution of stock prices as the accumulation of tiny pushes up and down in price resulting from the myriad of trades that take place. Like the movement of the pollen microparticles, the evolution of stock prices is impossible to predict exactly. But we can assign a probability distribution describing how a stock price will change in value, and again the evolution of this probability distribution is described by the heat equation, a discovery that laid the foundation for financial mathematics.
</p>
<div class="centreimage" style="max-width:600px"><img src="/content/sites/plus.maths.org/files/articles/2018/hairer/brownian.png" alt="Brownian motion"/><p>A sample path of Brownian motion</p></div>
<!-- image from author's slides -->
<p>
The story of the discovery of Brownian motion, and its universality, illustrates the power of mathematics to describe complicated events using probabilities. It also shows the unexpected and fruitful ways mathematics and physics can inform each other. The principle of universality justifies the study of simplified "toy" models when trying to understand more complicated systems, and highlights the links between seemingly disparate systems.
</p>
<a name="video"></a>
<div class="centreimage" style="max-width:560px">
<iframe width="560" height="315" src="https://www.youtube.com/embed/7CBLzPB2uCY?rel=0" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>
<p></p></div>
<hr/>
<h3>About this article</h3>
<div class="rightimage"><img src="/content/sites/plus.maths.org/files/articles/2018/hairer/mugshot--tojpeg_1515529178410_x1.jpg" alt="Hairer"><p>Martin Hairer</p></div>
<p>Martin Hairer is a Professor of Pure Mathematics at <a href="http://www.imperial.ac.uk/mathematics/">Imperial College London</a>. His research is in probability and stochastic analysis and he was awarded the <a href="/content/mh">Fields Medal in 2014</a>. This article is based on his lecture at the <a href="http://www.heidelberg-laureate-forum.org/">Heidelberg Laureate Forum</a> in September 2017.</p></div></div></div>Thu, 19 Apr 2018 15:53:03 +0000Rachel7031 at https://plus.maths.org/contenthttps://plus.maths.org/content/maths-randomness-universality#commentsThe maths of randomness: symmetry
https://plus.maths.org/content/maths-randomness-symmetry
<div class="field field-name-field-abs-img field-type-image field-label-hidden"><div class="field-items"><div class="field-item even"><img class="img-responsive" src="https://plus.maths.org/content/sites/plus.maths.org/files/abstractpics/%5Buid%5D/%5Bsite-date%5D/icon2.png" width="98" height="100" alt="" /></div></div></div><div class="field field-name-field-author field-type-text field-label-inlinec clearfix field-label-inline"><div class="field-label">By </div><div class="field-items"><div class="field-item even">Martin Hairer</div></div></div><div class="field field-name-body field-type-text-with-summary field-label-hidden"><div class="field-items"><div class="field-item even"><div class="rightshoutout"><p>Watch our conversation with Martin Hairer <a href="#video">below</a></p></div>
<p>
Despite the fact that randomness is surprisingly hard to define, we do have a well defined way of describing randomness mathematically with <em>probability theory</em>. (You can read more in the <a href="/content/maths-randomness">previous article</a>.) And there are two guiding principles in understanding probabilities: <em>symmetry</em> and <em>universality</em>.
</p>
<div class="rightimage" style="max-width:250px"><img src="/content/sites/plus.maths.org/files/articles/2018/hairer/Fotolia_82795265_XS.jpg" alt="Coin flip"></div>
<!-- Image purchased from https://en.fotolia.com/id/82795265# -->
<p>
<em>Symmetry</em> comes into play in probability theory in the following way: if different outcomes are equivalent they should have the same probability. Two outcomes might look different to you (say a coin landing on heads versus it landing on tails), but the process that produces the outcomes (the mechanics of the spinning coin) is entirely indifferent to which occurs. (You can read more in <a href=”https://plus.maths.org/content/struggling-chance”>Struggling with chance</a>.)
</p><p>
This symmetry leads us to judge the probability of a coin landing tails should be the same as it landing heads: giving them equal probabilities of 1/2. Similarly the probability of rolling any of the six numbers on a die should be the same: so each has a probability of 1/6.
</p><p>
Symmetry is a powerful guiding principle in probability theory, as it is in many areas of mathematics. But you have to be careful, even in simple situations, when using it to apply probabilities to the real world.
</p>
<h3>Two envelopes</h3>
<p>
For example, imagine you have two envelopes. They both contain a cheque, one for twice as much money as the other. You choose one envelope and look inside and see it contains a cheque for a certain amount. Now you have one chance to decide whether to keep that money, or switch envelopes. What should you do?
</p>
<p>
Write <img src="/MI/9dc1e0102c96abbe6a8d114661dae152/images/img-0001.png" alt="$x$" style="vertical-align:0px;
width:9px;
height:7px" class="math gen" /> for the amount that's in your chosen envelope. This means that the amount of money in the other envelope is either <img src="/MI/9dc1e0102c96abbe6a8d114661dae152/images/img-0002.png" alt="$2x$" style="vertical-align:0px;
width:17px;
height:12px" class="math gen" /> or <img src="/MI/9dc1e0102c96abbe6a8d114661dae152/images/img-0003.png" alt="$x/2$" style="vertical-align:-4px;
width:25px;
height:16px" class="math gen" />. The probability that it's <img src="/MI/9dc1e0102c96abbe6a8d114661dae152/images/img-0002.png" alt="$2x$" style="vertical-align:0px;
width:17px;
height:12px" class="math gen" /> is <img src="/MI/9dc1e0102c96abbe6a8d114661dae152/images/img-0004.png" alt="$1/2$" style="vertical-align:-4px;
width:23px;
height:16px" class="math gen" /> and so is the probability that it's <img src="/MI/9dc1e0102c96abbe6a8d114661dae152/images/img-0003.png" alt="$x/2$" style="vertical-align:-4px;
width:25px;
height:16px" class="math gen" />. So the <a href="/content/maths-minute-expectation"><em>expected</em></a> amount you'll get is
<table id="a0000000002" class="equation" width="100%" cellspacing="0" cellpadding="7">
<tr>
<td style="width:40%"> </td>
<td><img src="/MI/8793593562fb0cc3a66a34a31c5b543e/images/img-0001.png" alt="\[ \frac{1}{2}\left(2x+\frac{x}{2}\right) =x+\frac{x}{4} = \frac{5x}{4}. \]" style="width:198px;
height:36px" class="math gen" /></td>
<td style="width:40%"> </td>
<td class="eqnnum" style="width:20%"> </td>
</tr>
</table> Since that's bigger than <img src="/MI/8793593562fb0cc3a66a34a31c5b543e/images/img-0002.png" alt="$x$" style="vertical-align:0px;
width:9px;
height:7px" class="math gen" />, you should always swap envelopes. But what if you'd been asked to choose before you looked inside the first envelope? You would have changed your mind, then changed your mind again – obviously something silly is going on!
</p>
<div class="leftimage" style="max-width: 250px;"><img src="/content/sites/plus.maths.org/files/articles/2018/envelopes/envelopes.jpg" alt="Envelope" /><p></p></div>
<!-- Image from fotolia.com -->
<p>
This isn't really a paradox once you realise that the different possible outcomes are not symmetric. If the cheque in your first envelope said £100,000 – you'd keep it as the threat of losing £50,000 might seem too great. But you might be happy to gamble if you saw £5 in your first envelope.
</p><p>
More importantly, you have to include your prior beliefs of how much the person handing you the two envelopes would be willing to part with. Symmetry suggests that all possible amounts are equally likely which is not only entirely unrealistic, but also leads to an ill-posed probabilistic model. The situation as described above doesn't have enough information to build a complete model. (You can read a full explanation of this famous paradox in <a href=”/content/two-envelopes-problem-resolution”><em>The two envelope problem solved</em></a>.)
</p><p>
This is a trivial and unlikely example, but the point it makes is important. Blindly following the principle of symmetry could lead you to the wrong mathematical model, or indeed to trick you into wrongly thinking you have enough information to create such a model at all. And the consequence of using the wrong mathematical model can be dramatic.
</p>
<h3>The danger of flawed statistics</h3>
<p>
In 1999 <a href=”/content/os/issue21/features/clark/index”>Sally Clark</a> was tried in court over the murder of two of her children. The defence argued that both children died of Sudden Infant Death Syndrome (SIDS or "cot death"). An expert witness for the prosecution (who has since been discredited) argued that the probability of two children dying of SIDS was the square of probability of one child dying of SIDS – leading to a value of 1 in 73 million for the frequency of two cases of SIDS in such a family. But this argument assumes two such deaths had been independent, whereas it is highly likely that there are unknown environmental or genetic factors that might predispose a family to SIDS, making a second death much more likely.
</p><p>
This incorrect mathematical model, alongside basic errors in the presentation of the statistical evidence, lead to Clark being jailed. Her conviction was eventually overturned on appeal but the experience had a terrible impact on Clark and her family. It serves as an example of the dangers of using flawed statistical arguments. You really have to be very careful, even in simple situations, when applying probability to real world situations.
</p><p>
But probability theory does allow us to work and describe situations where we don't have complete knowledge. Linking this mathematics to real events can be problematic, but trying to understand such real world situations has stimulated development in the maths. And the mathematical description of randomness has allowed us to gain a deeper understanding of the world around us.
</p><p>
<em>Read about the other guiding principle of probability theory – <a href="/content/maths-randomness-universality">universality</a>.</em></p>
<div class="centreimage" style="max-width:560px">
<iframe width="560" height="315" src="https://www.youtube.com/embed/7CBLzPB2uCY?rel=0" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>
<p></p></div>
<hr/>
<h3>About this article</h3>
<div class="rightimage"><img src="/content/sites/plus.maths.org/files/articles/2018/hairer/mugshot--tojpeg_1515529178410_x1.jpg" alt="Hairer"><p>Martin Hairer</p></div>
<p>Martin Hairer is a Professor of Pure Mathematics at <a href="http://www.imperial.ac.uk/mathematics/">Imperial College London</a>. His research is in probability and stochastic analysis and he was awarded the <a href="/content/mh">Fields Medal in 2014</a>. This article is based on his lecture at the <a href="http://www.heidelberg-laureate-forum.org/">Heidelberg Laureate Forum</a> in September 2017.</p></div></div></div>Thu, 19 Apr 2018 15:39:28 +0000Rachel7030 at https://plus.maths.org/contenthttps://plus.maths.org/content/maths-randomness-symmetry#commentsThe two envelopes problem solved
https://plus.maths.org/content/two-envelopes-problem-resolution
<div class="field field-name-field-abs-img field-type-image field-label-hidden"><div class="field-items"><div class="field-item even"><img class="img-responsive" src="https://plus.maths.org/content/sites/plus.maths.org/files/abstractpics/%5Buid%5D/%5Bsite-date%5D/envelope_ficon.jpg" width="100" height="100" alt="" /></div></div></div><div class="field field-name-body field-type-text-with-summary field-label-hidden"><div class="field-items"><div class="field-item even"><div class="rightimage" style="max-width: 350px;"><img src="/content/sites/plus.maths.org/files/articles/2018/envelopes/envelopes.jpg" alt="Envelope" width="350" height="234" /><p></p></div>
<!-- Image from fotolia.com -->
<p>The <em>two envelope problem</em> is a famous
paradox from probability theory (which we first presented on <em>Plus</em> <a href="/content/maths-minute-two-envelopes-problem">back in September</a>). Imagine you are given two envelopes, one of which contains twice as much money as the other. You're allowed to pick one envelope and keep the money inside. But just before you open your chosen envelope you are given the chance to change your mind. Should you stick with the envelope you picked first or switch?</p>
<p>To find out write <img src="/MI/ccb39a4eedd62ce5748c45954cc3431f/images/img-0001.png" alt="$x$" style="vertical-align:0px;
width:9px;
height:7px" class="math gen" /> for the amount that's in your chosen envelope. This means that the amount of money in the other envelope is either <img src="/MI/ccb39a4eedd62ce5748c45954cc3431f/images/img-0002.png" alt="$2x$" style="vertical-align:0px;
width:17px;
height:12px" class="math gen" /> or <img src="/MI/ccb39a4eedd62ce5748c45954cc3431f/images/img-0003.png" alt="$x/2$" style="vertical-align:-4px;
width:25px;
height:16px" class="math gen" />. The probability that it's <img src="/MI/ccb39a4eedd62ce5748c45954cc3431f/images/img-0002.png" alt="$2x$" style="vertical-align:0px;
width:17px;
height:12px" class="math gen" /> is <img src="/MI/ccb39a4eedd62ce5748c45954cc3431f/images/img-0004.png" alt="$1/2$" style="vertical-align:-4px;
width:23px;
height:16px" class="math gen" /> and so is the probability that it's <img src="/MI/ccb39a4eedd62ce5748c45954cc3431f/images/img-0003.png" alt="$x/2$" style="vertical-align:-4px;
width:25px;
height:16px" class="math gen" />. So the <a href="/content/maths-minute-expectation"><em>expected</em></a> amount you'll get for switching is</p>
<table id="a0000000002" class="equation" width="100%" cellspacing="0" cellpadding="7">
<tr>
<td style="width:40%"> </td>
<td><img src="/MI/906b4e1be841d77cdaee2e99e30966dc/images/img-0001.png" alt="\[ \frac{1}{2}\left(2x+\frac{x}{2}\right) =x+\frac{x}{4} = \frac{5x}{4}. \]" style="width:198px;
height:36px" class="math gen" /></td>
<td style="width:40%"> </td>
<td class="eqnnum" style="width:20%"> </td>
</tr>
</table>
<p>Since that’s bigger than <img src="/MI/0e338d29c96b38c727739f2df57b98b3/images/img-0001.png" alt="$x$" style="vertical-align:0px;
width:9px;
height:7px" class="math gen" />, you should swap envelopes. But what if you are given another chance to swap envelopes after you have changed your mind once? By the same reasoning as above you should swap back again. And then, by the same argument again, you should swap a third time, and so on, forever. You end up in an infinite loop of swapping and never get any money at all. What’s wrong with this reasoning? </p>
<h3>A resolution</h3>
<p> Let’s write <img src="/MI/8c9ae8480c676f8b9f510e33feee4f24/images/img-0001.png" alt="$A$" style="vertical-align:0px;
width:12px;
height:11px" class="math gen" /> for the envelope you picked at first and <img src="/MI/8c9ae8480c676f8b9f510e33feee4f24/images/img-0002.png" alt="$B$" style="vertical-align:0px;
width:13px;
height:11px" class="math gen" /> for the other one. We write <img src="/MI/8c9ae8480c676f8b9f510e33feee4f24/images/img-0003.png" alt="$x$" style="vertical-align:0px;
width:9px;
height:7px" class="math gen" /> for the amount of money in <img src="/MI/8c9ae8480c676f8b9f510e33feee4f24/images/img-0001.png" alt="$A$" style="vertical-align:0px;
width:12px;
height:11px" class="math gen" />. Now since we haven’t opened envelope <img src="/MI/8c9ae8480c676f8b9f510e33feee4f24/images/img-0001.png" alt="$A$" style="vertical-align:0px;
width:12px;
height:11px" class="math gen" />, <img src="/MI/8c9ae8480c676f8b9f510e33feee4f24/images/img-0003.png" alt="$x$" style="vertical-align:0px;
width:9px;
height:7px" class="math gen" /> isn’t a fixed amount: it’s a random variable. It can take one of two values: the smaller amount of money that’s hidden in the two envelopes or the larger amount of money. Let’s write <img src="/MI/8c9ae8480c676f8b9f510e33feee4f24/images/img-0004.png" alt="$y$" style="vertical-align:-3px;
width:8px;
height:10px" class="math gen" /> for the smaller amount and <img src="/MI/8c9ae8480c676f8b9f510e33feee4f24/images/img-0005.png" alt="$2y$" style="vertical-align:-3px;
width:16px;
height:15px" class="math gen" /> for the larger amount (recall that one envelope contains twice as much money as the other). Since you have picked <img src="/MI/8c9ae8480c676f8b9f510e33feee4f24/images/img-0001.png" alt="$A$" style="vertical-align:0px;
width:12px;
height:11px" class="math gen" /> randomly, there’s a 50:50 chance that <img src="/MI/8c9ae8480c676f8b9f510e33feee4f24/images/img-0001.png" alt="$A$" style="vertical-align:0px;
width:12px;
height:11px" class="math gen" /> contains either of the two amounts. This means that the expected amount of money <img src="/MI/8c9ae8480c676f8b9f510e33feee4f24/images/img-0006.png" alt="$E(A)$" style="vertical-align:-4px;
width:36px;
height:18px" class="math gen" /> in envelope <img src="/MI/8c9ae8480c676f8b9f510e33feee4f24/images/img-0001.png" alt="$A$" style="vertical-align:0px;
width:12px;
height:11px" class="math gen" /> is </p><table id="a0000000002" class="equation" width="100%" cellspacing="0" cellpadding="7">
<tr>
<td style="width:40%"> </td>
<td><img src="/MI/8c9ae8480c676f8b9f510e33feee4f24/images/img-0007.png" alt="\[ E(A) = \frac{1}{2}\left(y+2y\right) =\frac{3y}{2}. \]" style="width:182px;
height:35px" class="math gen" /></td>
<td style="width:40%"> </td>
<td class="eqnnum" style="width:20%"> </td>
</tr>
</table><p>We said above that the expected amount in envelope <img src="/MI/8c9ae8480c676f8b9f510e33feee4f24/images/img-0002.png" alt="$B$" style="vertical-align:0px;
width:13px;
height:11px" class="math gen" /> is </p><table id="a0000000003" class="equation" width="100%" cellspacing="0" cellpadding="7">
<tr>
<td style="width:40%"> </td>
<td><img src="/MI/8c9ae8480c676f8b9f510e33feee4f24/images/img-0008.png" alt="\begin{equation} E(B) = \frac{1}{2}\left(2x+\frac{x}{2}\right).\end{equation}" style="width:155px;
height:35px" class="math gen" /></td>
<td style="width:40%"> </td>
<td class="eqnnum" style="width:20%"><span>(<span>1</span>)</span></td>
</tr>
</table><p>But recall that <img src="/MI/8c9ae8480c676f8b9f510e33feee4f24/images/img-0003.png" alt="$x$" style="vertical-align:0px;
width:9px;
height:7px" class="math gen" /> isn’t a fixed amount but can take one of two values. In the case that envelope <img src="/MI/8c9ae8480c676f8b9f510e33feee4f24/images/img-0002.png" alt="$B$" style="vertical-align:0px;
width:13px;
height:11px" class="math gen" /> contains <img src="/MI/8c9ae8480c676f8b9f510e33feee4f24/images/img-0009.png" alt="$2x$" style="vertical-align:0px;
width:17px;
height:12px" class="math gen" />, envelope <img src="/MI/8c9ae8480c676f8b9f510e33feee4f24/images/img-0001.png" alt="$A$" style="vertical-align:0px;
width:12px;
height:11px" class="math gen" /> contains the smaller amount of money, so <img src="/MI/8c9ae8480c676f8b9f510e33feee4f24/images/img-0010.png" alt="$x=y.$" style="vertical-align:-3px;
width:44px;
height:10px" class="math gen" /> In the case that envelope <img src="/MI/8c9ae8480c676f8b9f510e33feee4f24/images/img-0002.png" alt="$B$" style="vertical-align:0px;
width:13px;
height:11px" class="math gen" /> contains <img src="/MI/8c9ae8480c676f8b9f510e33feee4f24/images/img-0011.png" alt="$x/2$" style="vertical-align:-4px;
width:25px;
height:16px" class="math gen" />, envelope <img src="/MI/8c9ae8480c676f8b9f510e33feee4f24/images/img-0001.png" alt="$A$" style="vertical-align:0px;
width:12px;
height:11px" class="math gen" /> contains the larger amount of money, so <img src="/MI/8c9ae8480c676f8b9f510e33feee4f24/images/img-0012.png" alt="$x=2y.$" style="vertical-align:-3px;
width:52px;
height:15px" class="math gen" /> So in formula (1) above, the first <img src="/MI/8c9ae8480c676f8b9f510e33feee4f24/images/img-0003.png" alt="$x$" style="vertical-align:0px;
width:9px;
height:7px" class="math gen" /> really stands for <img src="/MI/8c9ae8480c676f8b9f510e33feee4f24/images/img-0004.png" alt="$y$" style="vertical-align:-3px;
width:8px;
height:10px" class="math gen" /> and the second <img src="/MI/8c9ae8480c676f8b9f510e33feee4f24/images/img-0003.png" alt="$x$" style="vertical-align:0px;
width:9px;
height:7px" class="math gen" /> stands for <img src="/MI/8c9ae8480c676f8b9f510e33feee4f24/images/img-0005.png" alt="$2y$" style="vertical-align:-3px;
width:16px;
height:15px" class="math gen" />. The two <img src="/MI/8c9ae8480c676f8b9f510e33feee4f24/images/img-0013.png" alt="$xs$" style="vertical-align:0px;
width:16px;
height:7px" class="math gen" /> in the formula are actually different and shouldn’t have been added up to give <img src="/MI/8c9ae8480c676f8b9f510e33feee4f24/images/img-0014.png" alt="$5x/4.$" style="vertical-align:-4px;
width:37px;
height:17px" class="math gen" /> </p><p>Substituting the <img src="/MI/8c9ae8480c676f8b9f510e33feee4f24/images/img-0004.png" alt="$y$" style="vertical-align:-3px;
width:8px;
height:10px" class="math gen" /> for the first appearance of <img src="/MI/8c9ae8480c676f8b9f510e33feee4f24/images/img-0003.png" alt="$x$" style="vertical-align:0px;
width:9px;
height:7px" class="math gen" /> in (1) and <img src="/MI/8c9ae8480c676f8b9f510e33feee4f24/images/img-0005.png" alt="$2y$" style="vertical-align:-3px;
width:16px;
height:15px" class="math gen" /> for the second gives </p><table id="a0000000004" class="equation" width="100%" cellspacing="0" cellpadding="7">
<tr>
<td style="width:40%"> </td>
<td><img src="/MI/8c9ae8480c676f8b9f510e33feee4f24/images/img-0015.png" alt="\[ E(B) = \frac{1}{2}\left(2y+y\right)=\frac{3y}{2}. \]" style="width:183px;
height:35px" class="math gen" /></td>
<td style="width:40%"> </td>
<td class="eqnnum" style="width:20%"> </td>
</tr>
</table><p>Thus <img src="/MI/8c9ae8480c676f8b9f510e33feee4f24/images/img-0016.png" alt="$E(A) = E(B)$" style="vertical-align:-4px;
width:98px;
height:18px" class="math gen" /> so there is no incentive to switch envelopes and hence no paradox. </p>
<h3>What if you open envelope A?</h3>
<p>What if we had already opened envelope <img src="/MI/ca5a618a4ef8d372004e0e0baf16f615/images/img-0001.png" alt="$A$" style="vertical-align:0px;
width:12px;
height:11px" class="math gen" />, to find <img src="/MI/ca5a618a4ef8d372004e0e0baf16f615/images/img-0002.png" alt="$\pounds x$" style="vertical-align:0px;
width:21px;
height:11px" class="math gen" /> inside, before being offered the chance to switch? Can we still produce the apparent paradox? </p><p>If you have opened envelope <img src="/MI/ca5a618a4ef8d372004e0e0baf16f615/images/img-0001.png" alt="$A$" style="vertical-align:0px;
width:12px;
height:11px" class="math gen" /> then <img src="/MI/ca5a618a4ef8d372004e0e0baf16f615/images/img-0003.png" alt="$x$" style="vertical-align:0px;
width:9px;
height:7px" class="math gen" /> is a fixed amount of money. There’s a 50:50 chance of finding <img src="/MI/ca5a618a4ef8d372004e0e0baf16f615/images/img-0004.png" alt="$2x$" style="vertical-align:0px;
width:17px;
height:12px" class="math gen" /> or <img src="/MI/ca5a618a4ef8d372004e0e0baf16f615/images/img-0005.png" alt="$x/2$" style="vertical-align:-4px;
width:25px;
height:16px" class="math gen" /> in envelope <img src="/MI/ca5a618a4ef8d372004e0e0baf16f615/images/img-0006.png" alt="$B$" style="vertical-align:0px;
width:13px;
height:11px" class="math gen" />, so the expected amount in envelope <img src="/MI/ca5a618a4ef8d372004e0e0baf16f615/images/img-0006.png" alt="$B$" style="vertical-align:0px;
width:13px;
height:11px" class="math gen" /> is </p><table id="a0000000002" class="equation" width="100%" cellspacing="0" cellpadding="7">
<tr>
<td style="width:40%"> </td>
<td><img src="/MI/ca5a618a4ef8d372004e0e0baf16f615/images/img-0007.png" alt="\[ E(B) = \frac{1}{2}\left(2x+\frac{x}{2}\right) =x+\frac{x}{4} = \frac{5x}{4}. \]" style="width:261px;
height:36px" class="math gen" /></td>
<td style="width:40%"> </td>
<td class="eqnnum" style="width:20%"> </td>
</tr>
</table>
<div class="leftimage" style="max-width: 350px;"><img src="/content/sites/plus.maths.org/files/articles/2017/envelopes/Hairer.jpg" alt="Martin Hairer " width="350" height="233" /><p>We heard about the two envelopes problem in a talk by the Fields medallist Martin Hairer at the Heidelberg Laureate Forum 2017. Foto: Bernhard Kreutzer for HLF (c) Pressefoto Kreutzer.</p></div>
<p>The formula is now correct. It tells you that on average (if you repeated the same wager many times with the same amount <img src="/MI/b9c7247502ca26e520379d6feaf4025a/images/img-0001.png" alt="$x$" style="vertical-align:0px;
width:9px;
height:7px" class="math gen" /> in envelope <img src="/MI/b9c7247502ca26e520379d6feaf4025a/images/img-0002.png" alt="$A$" style="vertical-align:0px;
width:12px;
height:11px" class="math gen" />), you’d do better by switching. The paradox doesn’t arise. If after switching to envelope <img src="/MI/b9c7247502ca26e520379d6feaf4025a/images/img-0003.png" alt="$B$" style="vertical-align:0px;
width:13px;
height:11px" class="math gen" /> you are given the chance to switch back again, you won’t because you already know that the amount in <img src="/MI/b9c7247502ca26e520379d6feaf4025a/images/img-0002.png" alt="$A$" style="vertical-align:0px;
width:12px;
height:11px" class="math gen" /> is less than the expected amount in <img src="/MI/b9c7247502ca26e520379d6feaf4025a/images/img-0003.png" alt="$B$" style="vertical-align:0px;
width:13px;
height:11px" class="math gen" />. The paradox arose in the original version because both envelopes could be treated the same — the situation was symmetric. Once you have opened envelope <img src="/MI/b9c7247502ca26e520379d6feaf4025a/images/img-0002.png" alt="$A$" style="vertical-align:0px;
width:12px;
height:11px" class="math gen" />, however, the symmetry is broken. </p><p>Notice, however, that opening envelope <img src="/MI/b9c7247502ca26e520379d6feaf4025a/images/img-0002.png" alt="$A$" style="vertical-align:0px;
width:12px;
height:11px" class="math gen" /> and seeing the amount <img src="/MI/b9c7247502ca26e520379d6feaf4025a/images/img-0001.png" alt="$x$" style="vertical-align:0px;
width:9px;
height:7px" class="math gen" /> may change your mind about the probability that envelope <img src="/MI/b9c7247502ca26e520379d6feaf4025a/images/img-0003.png" alt="$B$" style="vertical-align:0px;
width:13px;
height:11px" class="math gen" /> contains <img src="/MI/b9c7247502ca26e520379d6feaf4025a/images/img-0004.png" alt="$2x$" style="vertical-align:0px;
width:17px;
height:12px" class="math gen" /> or <img src="/MI/b9c7247502ca26e520379d6feaf4025a/images/img-0005.png" alt="$x/2.$" style="vertical-align:-4px;
width:29px;
height:16px" class="math gen" /> For example, if <img src="/MI/b9c7247502ca26e520379d6feaf4025a/images/img-0001.png" alt="$x$" style="vertical-align:0px;
width:9px;
height:7px" class="math gen" /> is a very large amount, then you might think it very unlikely that envelope <img src="/MI/b9c7247502ca26e520379d6feaf4025a/images/img-0003.png" alt="$B$" style="vertical-align:0px;
width:13px;
height:11px" class="math gen" /> contains the even larger amount <img src="/MI/b9c7247502ca26e520379d6feaf4025a/images/img-0004.png" alt="$2x$" style="vertical-align:0px;
width:17px;
height:12px" class="math gen" />. Writing <img src="/MI/b9c7247502ca26e520379d6feaf4025a/images/img-0006.png" alt="$p$" style="vertical-align:-3px;
width:10px;
height:10px" class="math gen" /> for the probability that envelope <img src="/MI/b9c7247502ca26e520379d6feaf4025a/images/img-0002.png" alt="$A$" style="vertical-align:0px;
width:12px;
height:11px" class="math gen" /> contains the larger amount, the expectation <img src="/MI/b9c7247502ca26e520379d6feaf4025a/images/img-0007.png" alt="$E(B)$" style="vertical-align:-4px;
width:38px;
height:18px" class="math gen" /> becomes </p><table id="a0000000002" class="equation" width="100%" cellspacing="0" cellpadding="7">
<tr>
<td style="width:40%"> </td>
<td><img src="/MI/b9c7247502ca26e520379d6feaf4025a/images/img-0008.png" alt="\[ E(B) = 2x(1-p)+\frac{px}{2}. \]" style="width:175px;
height:30px" class="math gen" /></td>
<td style="width:40%"> </td>
<td class="eqnnum" style="width:20%"> </td>
</tr>
</table><p>This is greater than <img src="/MI/b9c7247502ca26e520379d6feaf4025a/images/img-0001.png" alt="$x$" style="vertical-align:0px;
width:9px;
height:7px" class="math gen" /> if and only if <img src="/MI/b9c7247502ca26e520379d6feaf4025a/images/img-0009.png" alt="$p<2/3.$" style="vertical-align:-4px;
width:59px;
height:16px" class="math gen" /> In other words, as long as you’re confident that <img src="/MI/b9c7247502ca26e520379d6feaf4025a/images/img-0006.png" alt="$p$" style="vertical-align:-3px;
width:10px;
height:10px" class="math gen" /> is less than <img src="/MI/b9c7247502ca26e520379d6feaf4025a/images/img-0010.png" alt="$2/3$" style="vertical-align:-4px;
width:24px;
height:16px" class="math gen" /> you should switch envelopes. </p>
<p>To us the above resolution of the supposed paradox appears satisfactory, but not everyone would agree. People have spent a lot of time thinking and writing about the two envelopes problem. Its <a href="https://en.wikipedia.org/wiki/Two_envelopes_problem">Wikipedia page</a> is a good start if you'd like to find out more.</p>
</div></div></div>Wed, 18 Apr 2018 12:06:33 +0000Marianne7013 at https://plus.maths.org/contenthttps://plus.maths.org/content/two-envelopes-problem-resolution#commentsError correcting codes
https://plus.maths.org/content/error-correcting-codes
<div class="field field-name-field-abs-img field-type-image field-label-hidden"><div class="field-items"><div class="field-item even"><img class="img-responsive" src="https://plus.maths.org/content/sites/plus.maths.org/files/abstractpics/%5Buid%5D/%5Bsite-date%5D/CD_icon.png" width="100" height="100" alt="" /></div></div></div><div class="field field-name-field-author field-type-text field-label-inlinec clearfix field-label-inline"><div class="field-label">By </div><div class="field-items"><div class="field-item even">Chris Budd</div></div></div><div class="field field-name-body field-type-text-with-summary field-label-hidden"><div class="field-items"><div class="field-item even"><p><em>This article is based on a talk in Chris Budd's ongoing <a
href="https://www.gresham.ac.uk/series/mathematics-and-the-making-of-the-modern-and-future-world/">Gresham
College lecture series</a>. You can see a video of the talk <a
href="/content/genetics-natures-digital-code#video">below</a> and there is another article based on the talk <a href="/content/genetics-natures-digital-code">here</a>.</em></p><hr/>
<p>We are surrounded by information and are constantly receiving and transmitting it to other people all over the world. With good reason we can call the 21st century the <em>information age</em>. But whenever a message is being sent, be it over the phone, via the internet, or via satellites that orbit the Earth, there is the danger for errors to creep in. Background noise, technical faults, even cosmic rays can corrupt the message and important information may be lost. Rather amazingly, however, there are ways of encoding a message that allow errors to be detected, and even corrected, automatically. Here is how these codes work.</p>
<div class="rightimage" style="max-width: 350px;"><img src="/content/sites/plus.maths.org/files/articles/2018/errors/Jean_Miélot%2C_Brussels.jpg" alt=" Jean Miélot" width="350" height="266"/>
<p>The 15th century scribe, manuscript illuminator, translator and author Jean Miélot at his desk.</p>
</div>
<!-- Image from wikipedia, in public domain -->
<h3>Error detecting codes</h3>
<p>The need for the detection of errors has been recognised since the earliest scribes copied manuscripts by hand.
It was important to copy these without error, but to check every word would have been too large a task. Instead various checks were used. For example, when copying the Torah the letters, words, and paragraphs were counted, and then checked against the middle paragraph, word and letter of the original document. If they didn't match, there was a problem.</p>
<p>Modern digital information is encoded as sequences of 0s and 1s. When transmitting binary information a simple check that is often used involves a so-called <em>hash function</em>, which adds a fixed-length tag to a message. The tag allows the receiver to verify the delivered message by re-computing it and comparing it with the one provided in the message.</p>
<p> A simple example of such a tag comes from including a check or parity digit in each block of data. The simplest example of this method is to add up the digits that make up a message and then append a 1 if the sum is odd and a 0 if it is even. So if the original message is 111 then message sent is 1111, and if the original message is 101, then the message sent is 1010. The effect of this is that every message sent should have digits adding up to an even number. On receiving the transmission the receiving computer will add up the digits, and if the sum is not even then it will record an error. </p>
<div class="leftimage" style="max-width: 350px;"><img src="/content/sites/plus.maths.org/files/articles/2018/errors/barcode.png" alt="Barcode" width="350" height="254"/>
<p></p>
</div>
<!-- Image from wikipedia, in public domain -->
<p>An example of the use of this technology can be found on the bar codes that are used on nearly all mass-produced consumer goods sold. Such consumer products typically use either UPC-A or EAN-13 codes. UPC-A describes a 12-digit sequence, which is broken into four groups. The first digit of the bar code carries some general information about the item: it can either indicate the nationality of the manufacturer, or describe one of a few other categories, such as the ISBN (book identifier) numbers. The next five digits are a manufacturer's identification. The five digits that follow are a product identification number, assigned by the manufacturer. The last digit is a <a href="https://en.wikipedia.org/wiki/Universal_Product_Code#Check_digit_calculation">check digit</a>, allowing a scanner to validate whether the barcode has been read correctly.</p>
<p>Similar check digits are used in the numbers on your credit card, which are usually a sequence of decimal digits. In this case the <em>Luhn algorithm</em> is used (find out more <a href="https://en.wikipedia.org/wiki/Luhn_algorithm">here</a>).</p>
<h3>Error correcting codes</h3>
<p>Suppose that we have detected an error in a message we have deceived. How can we proceed to find the correct information contained in the message? There are various approaches to this. One is simply to (effectively) panic: to shut the whole system down and not to proceed until the problem has been fixed. The infamous blue screen of death, pictured below and familiar to many computer operators, is an example of this. </p>
<div class="centreimage"><img src="/content/sites/plus.maths.org/files/articles/2018/errors/BSD.png" alt="Blue screen of death" width="450" height="328" /><p style="max-width: 450px;"><p>Blue Screen of Death on Windows 8.</p></div>
<!-- image in public domain -->
<p>The rationale behind this approach is that in some (indeed many) cases it is better to do nothing than to do something which you know is wrong. However, all we can do at this point is to start again from scratch, and we lose all information in the process.</p>
<p>A second approach called the <em>automatic repeat request</em> (ARQ), often used on the Internet, is for the message to be repeated if it is thought to contain an error. We do this all the time. For example if you scan in an item at the supermarket and the scanner does not recognise it, then you simply scan it in again. </p>
<p>However, this option is not available to us if we are receiving information from, say, a satellite, a mobile phone or from a CD. In this case if we know that an error has been made in transmission then we have to attempt to correct it. The general idea for achieving correction is to add some extra data to a message, which allows us to recover it even after an error has been made. To do this, the transmitter sends the original data, and attaches a fixed number of check bits using an <em>error correcting code</em> (ECC). The idea behind this is to make the symbols from the different characters in the code as different from each other as possible, so that even if one symbol in the code was corrupted by noise it could still be distinguished from other symbols in the code. Error correcting codes were invented in 1947, at Bell Labs, by the American mathematician <a href="http://www-groups.dcs.st-and.ac.uk/history/Biographies/Hamming.html">Richard Hamming</a>.
</p>
<div class="rightimage" style="max-width: 350px;"><img src="/content/sites/plus.maths.org/files/articles/2018/errors/Satellite.jpg" alt="Satellite" width="350" height="289"/>
<p>Illustration of the U.S./European Ocean Surface Topography Mission (OSTM)/Jason-2 satellite in orbit.
Image: NASA-JPL/Caltech</p>
</div>
<p>To understand how error correcting codes work we must define the <em>Hamming distance</em> between two binary strings. Suppose that we have two six-bit strings such as 1 1 1 0 1 0 and 1 0 1 1 1 1. Then the Hamming distance is the number of digits which are different. So in this case the Hamming distance is 3. If one bit in a symbol is changed then it has a Hamming distance of one from its original. This change might be due to the action of noise, which has corrupted the message. If two strings are separated by a large Hamming distance, say 3, then they can still be distinguished even if one bit is changed by noise. The idea of the simplest error correcting codes is to exploit this fact by adding extra digits to a binary symbol, so that the symbols are a large Hamming distance apart. </p>
<p>I will illustrate this with a simple example. The numbers from 0 up to 7, written in binary, are:</p>
<p>000 (0) 001 (1) 010 (2) 011 (3) </br>100 (4) 101 (5) 110 (6) 111 (7)</p>
<p>(You can read more about binary numbers <a href="/content/maths-minute-binary-numbers">here</a>, or simply believe me.)</p><p> Many of these strings are only one Hamming distance apart. For example a small amount of noise could turn the string for 2 into the string for 3. We now add some extra parity digits (we explain the maths behind these later) to these codes to give the code</p>
<p>000 000 (0) 001 110 (1) 010 011 (2) 011 101 (3) </br>
100 101 (4) 101 011 (5) 110 110 (6) 111 000 (7)</p>
<p>The point of doing this is that each of these codes is a Hamming distance of 3 apart. Suppose that the noise is fairly low and has the effect changing one bit of a symbol. Suppose we take the symbol 101 011 for 5 and this changes to (say) 100 011. This is a Hamming distance of one from the original symbol and a distance of at least two from all of the others. So if we receive 100 011 what we do is to find the nearest symbol on our list to this. This must be the original symbol, and we correct 100 011 to 101 011 to read the symbol without error. </p>
<h3>Space flight, Facebook and CDs</h3>
<p>All error correcting codes use a similar principle to the one above: receive a string, if it's not on the list
find the closest string on the list to the one received, correct the string to this one. A lot of mathematical sophistication is used to find codes for more symbols which will work in the presence of higher levels of noise. Basically the challenge is to find symbols which are as different from each other as possible. Alongside the development of a code is that of an efficient decoder, which is used to correct corrupted messages fast and reliably.</p>
<div class="leftimage" style="max-width: 350px;"><img src="/content/sites/plus.maths.org/files/articles/2018/errors/CD.png" alt="CD" width="350" height="350"/>
<p>In case you don't remember what a CD looks like (or are too young to ever have seen one). Image: <a href="https://commons.wikimedia.org/wiki/File:OD_Compact_disc.svg"> Arun Kulshreshtha </a>, <A href="https://creativecommons.org/licenses/by-sa/2.5/deed.en">CC BY-SA 2.5</a>.</p>
</div>
<!-- Image from wikipedia, in public domain -->
<p>Another example of an error correcting code is the <a href="https://en.wikipedia.org/wiki/Reed%E2%80%93Solomon_error_correction">Reed-Solomon code</a> invented in 1960. The first commercial application in mass-produced consumer products appeared in 1982, with the CD, where two Reed–Solomon codes are used on each track to give even greater redundancy. This is very useful when having to reconstruct the music on a scratched CD.</p>
<p>Today, Reed–Solomon codes are widely implemented in digital storage devices and digital communication standards (for example digital TV), although they are now being replaced by <a href="https://en.wikipedia.org/wiki/Low-density_parity-check_code">low-density parity-check</a> (LDPC) codes. Reed–Solomon coding is very widely used in mass storage systems to correct the burst errors associated with media defects. This code can correct up to 2 byte errors per 32-byte block. One significant application of Reed–Solomon coding was to encode the digital pictures sent back by the Voyager space probe, which was launched in 1977 and took the first satellite pictures of Jupiter, Saturn and the far planets. </p>
<p> A major recent user of error correction is on Facebook, which is possibly the largest repository of information in the world. It is estimated that 300 million photos are stored on Facebook every day. This information is stored in vast data banks around the world, mostly on spinning discs. Whilst the individual failure rate of a disc is very low, there are so many discs required to store the information that the chance of one of the discs failing at any one time is high. When this happens the data on the disc is recovered efficiently and quickly by using a Reed-Solomon code, so that Facebook can continue without interruption. </p>
<h3>Some mathematics</h3>
<p>In this last section we will give some mathematical detail for those who are interested. (If you aren't interested in the details, you can skip to the <a href="/content/genetics-natures-digital-code">next article</a>.) It is far from simple to work out codes which are both efficient and robust, and a whole branch of mathematics, <em>coding theory</em>, has been developed to do it. </p>
<p> The Hamming (7,4) code is similar to the Hamming code above, only in this case three parity bits are added to a message with four information bits (rather than a message with three information bits , as above). If <img src="/MI/b2a07b8ea8e4f0f8e0a91b2f5f70dad7/images/img-0001.png" alt="$x$" style="vertical-align:0px;
width:9px;
height:7px" class="math gen" /> is the string <img src="/MI/b2a07b8ea8e4f0f8e0a91b2f5f70dad7/images/img-0002.png" alt="$x = (d_1,d_2,d_3,d_4)$" style="vertical-align:-4px;
width:129px;
height:18px" class="math gen" /> of the information (which is four bits long), then the transmitted symbol <img src="/MI/b2a07b8ea8e4f0f8e0a91b2f5f70dad7/images/img-0003.png" alt="$y$" style="vertical-align:-3px;
width:8px;
height:10px" class="math gen" /> is seven bits long and is given by <img src="/MI/b2a07b8ea8e4f0f8e0a91b2f5f70dad7/images/img-0004.png" alt="$y=(p_1,p_2,d_1,p_3,d_2,d_3,d_4) $" style="vertical-align:-4px;
width:198px;
height:18px" class="math gen" /> where <img src="/MI/b2a07b8ea8e4f0f8e0a91b2f5f70dad7/images/img-0005.png" alt="$p_1$" style="vertical-align:-3px;
width:15px;
height:10px" class="math gen" />, <img src="/MI/b2a07b8ea8e4f0f8e0a91b2f5f70dad7/images/img-0006.png" alt="$p_2$" style="vertical-align:-3px;
width:15px;
height:10px" class="math gen" /> and ,<img src="/MI/b2a07b8ea8e4f0f8e0a91b2f5f70dad7/images/img-0007.png" alt="$p_3$" style="vertical-align:-3px;
width:15px;
height:10px" class="math gen" /> are the parity bits. These parity bits are added so that groups of the digits in the code have an even number of 1s. The following diagram shows what these groups are: each <img src="/MI/b2a07b8ea8e4f0f8e0a91b2f5f70dad7/images/img-0008.png" alt="$p_ i$" style="vertical-align:-3px;
width:13px;
height:10px" class="math gen" /> is represented by a circle and the group of bits consisting of this <img src="/MI/b2a07b8ea8e4f0f8e0a91b2f5f70dad7/images/img-0008.png" alt="$p_ i$" style="vertical-align:-3px;
width:13px;
height:10px" class="math gen" /> and the <img src="/MI/b2a07b8ea8e4f0f8e0a91b2f5f70dad7/images/img-0009.png" alt="$d_ i$" style="vertical-align:-2px;
width:13px;
height:13px" class="math gen" /> that also lie in this circle must contain an even number of 1s. </p>
<div class="centreimage"><img src="/content/sites/plus.maths.org/files/articles/2018/errors/Hamming_code.png" alt="Hamming code diagram" width="258" height="240" /><p style="max-width: 258px;"><p>Image: <a href="https://commons.wikimedia.org/wiki/File:Hamming(7,4).svg">CBurnett</a>, <a href="https://creativecommons.org/licenses/by-sa/3.0/deed.en">CC BY-SA 3.0</a>.</p></div>
<p>For example, this means that if <img src="/MI/4f4ea39d641b53458f931941a45fc85e/images/img-0001.png" alt="$x=(1,1,0,1)$" style="vertical-align:-4px;
width:98px;
height:18px" class="math gen" /> then because <img src="/MI/4f4ea39d641b53458f931941a45fc85e/images/img-0002.png" alt="$d_1$" style="vertical-align:-2px;
width:15px;
height:13px" class="math gen" />, <img src="/MI/4f4ea39d641b53458f931941a45fc85e/images/img-0003.png" alt="$d_2$" style="vertical-align:-2px;
width:15px;
height:13px" class="math gen" /> and <img src="/MI/4f4ea39d641b53458f931941a45fc85e/images/img-0004.png" alt="$d_4$" style="vertical-align:-2px;
width:15px;
height:13px" class="math gen" /> lie in the circle of <img src="/MI/4f4ea39d641b53458f931941a45fc85e/images/img-0005.png" alt="$p_1$" style="vertical-align:-3px;
width:15px;
height:10px" class="math gen" /> and together contain three 1s, <img src="/MI/4f4ea39d641b53458f931941a45fc85e/images/img-0005.png" alt="$p_1$" style="vertical-align:-3px;
width:15px;
height:10px" class="math gen" /> must be equal to 1 to make the number of 1s in the green circle even. The parity bits <img src="/MI/4f4ea39d641b53458f931941a45fc85e/images/img-0006.png" alt="$p_2$" style="vertical-align:-3px;
width:15px;
height:10px" class="math gen" /> and <img src="/MI/4f4ea39d641b53458f931941a45fc85e/images/img-0007.png" alt="$p_3$" style="vertical-align:-3px;
width:15px;
height:10px" class="math gen" /> must both be equal to 0. Therefore <img src="/MI/4f4ea39d641b53458f931941a45fc85e/images/img-0008.png" alt="$y=(1, 0, 1, 0, 1, 0, 1).$" style="vertical-align:-4px;
width:149px;
height:18px" class="math gen" /> </p>
<p>Now suppose that <img src="/MI/cfe69f01e8ac839d9676c27f8135e684/images/img-0001.png" alt="$y$" style="vertical-align:-3px;
width:8px;
height:10px" class="math gen" /> is incorrectly transmitted so that one bit is corrupted and we receive instead the signal <img src="/MI/cfe69f01e8ac839d9676c27f8135e684/images/img-0002.png" alt="$z=(1, 0, 1, 0, 1, 1, 1)$" style="vertical-align:-4px;
width:144px;
height:18px" class="math gen" />. Let’s see if we can correct this error. The group of bits that belong to the green circle (<img src="/MI/cfe69f01e8ac839d9676c27f8135e684/images/img-0003.png" alt="$p_1$" style="vertical-align:-3px;
width:15px;
height:10px" class="math gen" />, <img src="/MI/cfe69f01e8ac839d9676c27f8135e684/images/img-0004.png" alt="$d_1$" style="vertical-align:-2px;
width:15px;
height:13px" class="math gen" />, <img src="/MI/cfe69f01e8ac839d9676c27f8135e684/images/img-0005.png" alt="$d_2$" style="vertical-align:-2px;
width:15px;
height:13px" class="math gen" /> and <img src="/MI/cfe69f01e8ac839d9676c27f8135e684/images/img-0006.png" alt="$d_4$" style="vertical-align:-2px;
width:15px;
height:13px" class="math gen" />), have the correct parity (even), and the groups of bits that belong to the blue and red circles each have the wrong parity (odd). Since the only information bit that belongs to both the red and the blue circle is <img src="/MI/cfe69f01e8ac839d9676c27f8135e684/images/img-0007.png" alt="$d_3$" style="vertical-align:-2px;
width:15px;
height:13px" class="math gen" />, it’s <img src="/MI/cfe69f01e8ac839d9676c27f8135e684/images/img-0007.png" alt="$d_3$" style="vertical-align:-2px;
width:15px;
height:13px" class="math gen" /> that must be the offending bit. And that’s correct. </p>
<p>In a more abstract setting </p><table id="a0000000002" class="equation" width="100%" cellspacing="0" cellpadding="7">
<tr>
<td style="width:40%"> </td>
<td><img src="/MI/0f3ad8b23b9fbff178e9a0726c0b363d/images/img-0001.png" alt="\[ y = G x, \]" style="width:57px;
height:14px" class="math gen" /></td>
<td style="width:40%"> </td>
<td class="eqnnum" style="width:20%"> </td>
</tr>
</table><p> where <img src="/MI/0f3ad8b23b9fbff178e9a0726c0b363d/images/img-0002.png" alt="$G$" style="vertical-align:0px;
width:13px;
height:11px" class="math gen" /> is a 7x4 code generator matrix and all operations are calculated in modular 2 arithmetic. Since a 7x4 matrix multiplied by a vector of length 4 gives a vector of length 7, the multiplication gives a vector of the correct length, that is, three parity bits are added. This multiplication is a linear transformation, and the Hamming (7,4) code is an example of a <em>linear code</em>. If a corrupted form <img src="/MI/0f3ad8b23b9fbff178e9a0726c0b363d/images/img-0003.png" alt="$z$" style="vertical-align:0px;
width:8px;
height:7px" class="math gen" /> of the message <img src="/MI/0f3ad8b23b9fbff178e9a0726c0b363d/images/img-0004.png" alt="$y$" style="vertical-align:-3px;
width:8px;
height:10px" class="math gen" /> is received, then the bit for which the error is made is found by using a second, and cleverly constructed, parity checking 3x7 matrix <img src="/MI/0f3ad8b23b9fbff178e9a0726c0b363d/images/img-0005.png" alt="$H$" style="vertical-align:0px;
width:15px;
height:11px" class="math gen" />. This matrix is constructed so that if there is no error, then </p><table id="a0000000003" class="equation" width="100%" cellspacing="0" cellpadding="7">
<tr>
<td style="width:40%"> </td>
<td><img src="/MI/0f3ad8b23b9fbff178e9a0726c0b363d/images/img-0006.png" alt="\[ d=Hz \]" style="width:54px;
height:11px" class="math gen" /></td>
<td style="width:40%"> </td>
<td class="eqnnum" style="width:20%"> </td>
</tr>
</table><p> should be the zero vector. If it is not the zero vector, then an error has occurred. The vector <img src="/MI/0f3ad8b23b9fbff178e9a0726c0b363d/images/img-0007.png" alt="$d$" style="vertical-align:0px;
width:9px;
height:11px" class="math gen" /> will correspond to one of the columns of <img src="/MI/0f3ad8b23b9fbff178e9a0726c0b363d/images/img-0005.png" alt="$H$" style="vertical-align:0px;
width:15px;
height:11px" class="math gen" /> and the location of this column (first, second, third, etc) indicates where in the original string the error was made. Then it is easily possible to construct a 4x7 matrix <img src="/MI/0f3ad8b23b9fbff178e9a0726c0b363d/images/img-0008.png" alt="$R$" style="vertical-align:0px;
width:13px;
height:11px" class="math gen" /> to recover the original symbol so that </p><table id="a0000000004" class="equation" width="100%" cellspacing="0" cellpadding="7">
<tr>
<td style="width:40%"> </td>
<td><img src="/MI/0f3ad8b23b9fbff178e9a0726c0b363d/images/img-0009.png" alt="\[ x = R z. \]" style="width:57px;
height:11px" class="math gen" /></td>
<td style="width:40%"> </td>
<td class="eqnnum" style="width:20%"> </td>
</tr>
</table>
<div class="rightimage" style="max-width: 270px;"><img src="/content/sites/plus.maths.org/files/articles/2014/constants/quintics/galois.png" alt="Galois" width="270" height="323"/>
<p>Évariste Galois, drawn from memory by his brother in 1848, sixteen years after his death.</p>
</div>
<p>The Reed-Solomon code is more sophisticated in its construction. In the classic implementation of the Reed-Solomon code the original message is mapped to a polynomial with the terms of the message being the coefficients of the polynomial. The transmitted message is then given by evaluating the polynomial at a set of points. As in the Hamming (7,4) code, the Reed-Solomon code is a linear transformation of the original message. Decoding works by finding the best fitting message polynomial. All of the multiplications for the polynomial are performed over mathematical structures called <em>finite fields</em>. The theory behind the construction of these codes uses advanced ideas from the branch of mathematics called <em><a href="/content/stubborn-equations">Galois theory</a></em>, which was invented by the French mathematician <a href="/content/genius-stupidity-and-genius-again">Évariste Galois</a>
when he was only 19, and at least 150 years before it was used in CD players. </p>
<hr/>
<h3>About this article</h3>
<p>This article is based on a talk in Budd's ongoing <a
href="https://www.gresham.ac.uk/series/mathematics-and-the-making-of-the-modern-and-future-world/">Gresham
College lecture series</a>. A video of the talk is below and there is another article based on the talk <a href="/content/genetics-natures-digital-code">here</a>.</p>
<div class="rightimage" style="max-width: 250px;"><img src="/content/sites/plus.maths.org/files/articles/2015/Mornington/chris.jpg" alt="Chris Budd" width="250" height="153" />
<p>Chris Budd.</p>
</div>
<p>Chris Budd OBE is Professor of Applied Mathematics at the University of Bath, Vice President of the <a href="http://www.ima.org.uk/">Institute of Mathematics and its Applications</a>, Chair of Mathematics for the <a href="http://www.rigb.org/registrationControl?action=home">Royal Institution</a> and an honorary fellow of the <a href="http://www.britishscienceassociation.org/">British Science Association</a>. He is particularly interested in applying mathematics to the real world and promoting the public understanding of mathematics.</p><p>
He has co-written the popular mathematics book <em><a href="/content/mathematics-galore">Mathematics Galore!</a></em>, published by Oxford University Press, with C. Sangwin, and features in the book <em><a href="https://global.oup.com/academic/product/50-visions-of-mathematics-9780198701811?cc=gb&lang=en&">50 Visions of Mathematics</a></em> ed. Sam Parc.
</p><a name="video"></a>
<iframe width="560" height="315" src="https://www.youtube.com/embed/d0BCZtp91KM?rel=0" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>
</div></div></div>Tue, 17 Apr 2018 12:07:36 +0000Marianne7009 at https://plus.maths.org/contenthttps://plus.maths.org/content/error-correcting-codes#commentsGenetics: Nature's digital code
https://plus.maths.org/content/genetics-natures-digital-code
<div class="field field-name-field-abs-img field-type-image field-label-hidden"><div class="field-items"><div class="field-item even"><img class="img-responsive" src="https://plus.maths.org/content/sites/plus.maths.org/files/abstractpics/%5Buid%5D/%5Bsite-date%5D/DNA_icon.png" width="100" height="100" alt="" /></div></div></div><div class="field field-name-field-author field-type-text field-label-inlinec clearfix field-label-inline"><div class="field-label">By </div><div class="field-items"><div class="field-item even">Chris Budd</div></div></div><div class="field field-name-body field-type-text-with-summary field-label-hidden"><div class="field-items"><div class="field-item even"><p><em>This article is based on a talk in Chris Budd's ongoing <a
href="https://www.gresham.ac.uk/series/mathematics-and-the-making-of-the-modern-and-future-world/">Gresham
College lecture series</a>. You can see a video of the talk <a
href="/content/genetics-natures-digital-code#video">below</a> and there is another article based on the talk <a href="/content/error-correcting-codes">here</a>.</em></p><hr/>
<div class="rightimage" style="max-width: 375px;"><img src="/content/sites/plus.maths.org/files/articles/2018/digitalnature/Haeckel.jpg" alt="The phylogenetic tree of life as produced by Ernst Haeckel." width="375" height="598"/>
<p>The phylogenetic tree of life as produced by <a href="https://en.wikipedia.org/wiki/Ernst_Haeckel">Ernst Haeckel</a>.</p>
</div>
<!-- Image from wikimedia commons, in public domain -->
<p>When a green-eyed woman has a child with a blue-eyed man, what colour will the child's eyes be? Well, in all likelihood they won't be turquoise, but either blue or green, or perhaps even brown. This fact gives us a clue as to how nature deals with the genetic information that's passed on from one generation to the next. Nature doesn't work with a continuous spectrum of possibilities, but with separate either/or alternatives. This is similar to how computers transmit the reams of information in the digital world, which is made of the discrete units of 0 and 1. In this article we look at the digital nature of genetic information, and how it appears to be cleverly encoded so that not too many mistakes are made when this information is passed on through the generations.</p>
<h3>The colour of peas</h3>
<p>The most famous figure in the field of genetics is <a href="http://www-groups.dcs.st-and.ac.uk/history/Biographies/Darwin.html">Charles Darwin</a>, who published his groundbreaking book <a href="https://en.wikipedia.org/wiki/On_the_Origin_of_Species"><em>On the origin of species</em></a> in 1859. Despite giving an explanation of how species would change and evolve, Darwin was unaware of the mechanism behind this process. The digital nature of genetic information was discovered in 1866 by the monk <a href="https://en.wikipedia.org/wiki/Gregor_Mendel">Gregor Mendel</a>. However, the precise mechanism was only identified a hundred years later with the discovery of the structure of DNA. </p>
<p>Mendel was wondering how <em>phenotypes</em> (or traits) of a species are inherited from one generation to another. An example of such in humans might be eye colour, or height. Mendel instead looked at the colour of peas. He bred successive generations of peas of different colours and made very careful quantitative measurements of what he observed.</p>
<p> In particular he observed that if he took as a parent generation yellow and green peas and crossed them, then all of the next generation were yellow. If he then allowed each plant from the second generation to pollinate itself (peas can do that) he obtained both yellow and green peas in a ratio of 3:1. This already showed a high degree of mathematical regularity. If he then self-pollinated future generations he ended up with a quarter yellow peas, a quarter green peas, and the remaining half a mixture of both yellow and green, again in the 3:1 ratio.</p>
<div class="leftimage" style="max-width: 250px;"><img src="/content/sites/plus.maths.org/files/articles/2018/digitalnature/Mendel.jpg" alt="Gregor Mendel" width="250" height="340"/>
<p>Gregor Mendel.</p>
</div>
<!-- Image from wikipedia, in public domain -->
<p> This was evidence of the discrete nature of inheritance rather than a blending of the yellow and green colours. He explained this by postulating that two factors were responsible for the colour of the pea, a yellow Y factor and a green G factor (today these factors would be called <em>alleles</em> of the same gene). Each plant would have
two of these factors (so either YY, YG, GY or GG). A green pea would only arise if there were two G factors. When getting together with another plant to cross-pollinate, a parent plant would pass one of these factors on to its offspring, with each factor having a 50:50 chance of being passed on. A plant getting together with itself to self-pollinate can be regarded as two plants with the same pair of factors cross-pollinating. Mendel started by cross-pollinating yellow plants with the pair of factors YY and green plants with the pair of factors GG.</p>
<p> The second line in the diagram below shows what happens when you combine the first factor from the first parent plant with the first factor from the second parent plant, the first factor from the first plant with the second factor of the second, and so on. It turns out that all offspring plants in this second generation of peas will have the combination YG. The third line shows what combinations of Y and G are possible for the third generation as a result of self-pollination of the second generation. The fourth line shows the combinations that are possible for the fourth generation as a result of self-pollination of the third generation. </p>
<div class="centreimage"><img src="/content/sites/plus.maths.org/files/articles/2018/digitalnature/gene_diagram.png" alt="Gene distribution diagram" width="600" height="347" /><p style="max-width: 600px;"><p></p></div>
<!-- image made by MF -->
<p>The resulting pea colours are shown below (bear in mind that only GG plants will be green).</p>
<div class="centreimage"><img src="/content/sites/plus.maths.org/files/articles/2018/digitalnature/peas.png" alt="Colour distribution diagram" width="600" height="324" /><p style="max-width: 600px;"><p></p></div>
<!-- image made by MF -->
<p>If enough plants are involved in the experiment then we can assume that all of the possible outcomes occur in roughly the proportions given by the diagram: a quarter yellow, a quarter green, and the rest a mixture with a 3:1 ration between yellow and green. These are exactly the proportions Mendel observed.</p>
<h3>From peas to us</h3>
<p>We now understand the mechanism behind this process: discrete amounts of information are coded in our genes, and the traits of an organism, such as the colour of the peas, depends on the sequence of its genes. The term <em>gene</em> was introduced by <a href="https://en.wikipedia.org/wiki/Wilhelm_Johannsen">Wilhelm Johannsen</a> in 1905. <em>Deoxyribonucleic acid</em> (DNA) was shown to be the molecular repository of genetic information by experiments in the 1940s to 1950s. The structure of DNA was studied using <a href="/content/shattering-crystal-symmetries">X-ray crystallography</a> by <a href="https://en.wikipedia.org/wiki/Rosalind_Franklin">Rosalind Franklin</a> and <a href="https://en.wikipedia.org/wiki/Maurice_Wilkins">Maurice Wilkins</a>. This research led <a href="https://en.wikipedia.org/wiki/James_Watson">James D. Watson</a> and <a href="https://en.wikipedia.org/wiki/Francis_Crick">Francis Crick</a> to publish a model of the double-stranded DNA molecule as illustrated below. We can already see a strong mathematical regularity in the shape of this molecule, which begs the question of whether this molecule came into existence at random or through the action of deep mathematical principles.</p>
<div class="centreimage"><img src="/content/sites/plus.maths.org/files/articles/2018/digitalnature/DNA_double_helix_horizontal.png" alt="DNA" width="469" height="256" /><p style="max-width: 469px;"><p>The double helix of DNA.</p></div>
<!-- image from wikimedia commons, in public domain -->
<p>A gene itself is a sequence of DNA or RNA molecules. A <em>chromosome</em> is a long strand of DNA containing many genes. A human chromosome can have up to 500 million so-called <em>base pairs</em> of DNA with thousands of genes. The DNA is first copied into RNA. The RNA can either itself have a direct function in the body, or, more typically, it provides the template for a protein that then goes on to perform a function. </p>
<p>Because genes are discrete, we can observe a discontinuous inheritance of the traits of an organism. Some genetic traits are easily visible, such as eye colour or height, and some are not, such as blood type, risk for specific diseases, or internal biochemical processes. The total complement of genes in an organism or cell is known as its <em>genome</em>, which may be stored in one or more chromosomes. </p>
<p>The DNA molecule is a chain made from four types of <em>nucleotide</em> units, each composed of a five-carbon sugar, a phosphate group, and one of the four bases: A for adenine, C for cytosine, G for guanine, and T for thymine. The base U for uracil is also present in RNA. The components (base pairs) of the genes act rather like the 0s and 1s of a binary message. As you can see in <a href="/content/information-about-information">many other articles on <em>Plus</em></a>, these binary digits can encode a huge amount of information. Similarly all the proteins in your body are made from protein building blocks called <em>amino acids</em>. There are twenty different amino acids used to make proteins, all of which are specified from a four-letter code sequence made from the letters A, C, G and U.</p>
<div class="centreimage"><img src="/content/sites/plus.maths.org/files/articles/2018/digitalnature/600px-Difference_DNA_RNA-EN.svg.png" alt="DNA and RNA" width="600" height="480" /><p style="max-width: 469px;"><p>RNA and DNA. Image <a href="https://commons.wikimedia.org/wiki/File:Difference_DNA_RNA-EN.svg">Roland 1952</a>, <a href="https://creativecommons.org/licenses/by-sa/3.0/deed.en">CC B-SA 3.0</a>.</p></div>
<h3>Inheritance as a data transmission problem</h3>
<p>Organisms inherit their genes from their parents. Asexual organisms, such as amoebae, inherit a complete copy of the genome of their parents. Sexual organisms (such as us) have two copies of each chromosome as they inherit one from each parent. The traits we inherit from our parents depend on how these combine.</p>
<p> Genes can acquire mutations in their sequence, leading to different variants of a trait, known as <em>alleles</em>, in the population. These alleles encode slightly different versions of a protein, which in turn cause different traits. It's through mutations that evolution occurs: if a random mutation proves beneficial for an organism, then that organism will pass the mutated gene on to its offspring. Mendel was the first to recognise that some alleles can be dominant and some recessive, which in part is a reason for the large variety that we see in inheritance. </p>
<p>The process of passing on information is done digitally. The RNA code that contains the template for producing proteins is designed to be read as triplets made of A, C, G and U. Each triplet is called a <em>codon</em>. Just about every living thing uses this exact code to make proteins from DNA. Codons are similar to the <a href="https://en.wikipedia.org/wiki/ASCII">ASCII</a> code used in computers to represent text. In the ASCII code individual letters are represented by a string of eight 0s and 1s. </p>
<div class="centreimage"><img src="/content/sites/plus.maths.org/files/articles/2018/digitalnature/RNA-codons-aminoacids.svg.png" alt="DNA and RNA" width="512" height="137" /><p style="max-width: 469px;"><p>RNA and DNA. Image <a href="https://commons.wikimedia.org/wiki/File:RNA-codons-aminoacids.svg">Thomas Splettstoesser</a>, <a href="https://creativecommons.org/licenses/by-sa/4.0/deed.en">CC B-SA 4.0</a>.</p></div>
<p> Since a codon is a three-letter combination of the A C G U base pairs, there are 4x4x4=4<sup>3</sup>=64 possible codons. These are used as codes for only twenty different amino acids, and also special "start" and "stop" codons that mark the beginning and end of a gene. This <em>redundancy</em> allows for the correction of errors. Suppose that in "reading" the codon for a particular amino acid an error is made and one of the three letters is misread. If the new triple is also associated to an amino acid, then we have a problem: the wrong amino acid is produced. If however, the codons for all the other amino acids differ in at least two letters from the scrambled-up triple, then it's easy to guess that an error has been made and to deduce which amino acid was really meant. (You can find out more about encoding information in a way that allows for fixing of mistakes in <a href="/content/error-correcting-codes"><em>Error correction codes</em></a>.) With 64 possibilities for codons for only twenty amino acids, there is plenty of room to choose the codons for the acids so that they are different enough for this error correction process to work. </p>
<p>Thus, the codons could be playing a similar role in the process of inheritance as the strings of 0s and 1s in <a href="/content/error-correcting-codes">error correction codes</a> used by humans. We are not certain that nature really does use error correction codes in this way, but it certainly seems a very reasonable possibility given
the discrete nature of the data and the obvious redundancy in the number of codons versus the number
of amino acids. The use of this process of transmitting information is very effective and would only lead to errors in the order of one in 100 million. Does nature use other forms of error correction? At some level it must do, otherwise species could not reproduce reliably. However, fortunately (for us) this error correction does still allow for mutations to occur. Otherwise evolution would not be possible, and we would not be here. </p>
<p>In conclusion, we live in an information age, and the mathematical development of digital data transmission, combined with error correcting codes, allows us to communicate accurately and reliably. The processes used by nature to transmit information from one generation to another are also digital and highly reliable, and in many ways resemble digital communication methods. I hope that you will agree with me that maths is truly coded in our genes.</p>
<hr/>
<h3>About this article</h3>
<p>This article is based on a talk in Budd's ongoing <a
href="https://www.gresham.ac.uk/series/mathematics-and-the-making-of-the-modern-and-future-world/">Gresham
College lecture series</a>. A video of the talk is below.</p>
<div class="rightimage" style="max-width: 250px;"><img src="/content/sites/plus.maths.org/files/articles/2015/Mornington/chris.jpg" alt="Chris Budd" width="250" height="153" />
<p>Chris Budd.</p>
</div>
<p>Chris Budd OBE is Professor of Applied Mathematics at the University of Bath, Vice President of the <a href="http://www.ima.org.uk/">Institute of Mathematics and its Applications</a>, Chair of Mathematics for the <a href="http://www.rigb.org/registrationControl?action=home">Royal Institution</a> and an honorary fellow of the <a href="http://www.britishscienceassociation.org/">British Science Association</a>. He is particularly interested in applying mathematics to the real world and promoting the public understanding of mathematics.</p><p>
He has co-written the popular mathematics book <em><a href="/content/mathematics-galore">Mathematics Galore!</a></em>, published by Oxford University Press, with C. Sangwin, and features in the book <em><a href="https://global.oup.com/academic/product/50-visions-of-mathematics-9780198701811?cc=gb&lang=en&">50 Visions of Mathematics</a></em> ed. Sam Parc.
</p><a name="video"></a>
<iframe width="560" height="315" src="https://www.youtube.com/embed/d0BCZtp91KM?rel=0" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe></div></div></div>Tue, 17 Apr 2018 11:11:03 +0000Marianne7010 at https://plus.maths.org/contenthttps://plus.maths.org/content/genetics-natures-digital-code#commentsA very useful pandemic
https://plus.maths.org/content/very-useful-pandemic
<div class="field field-name-field-abs-img field-type-image field-label-hidden"><div class="field-items"><div class="field-item even"><img class="img-responsive" src="https://plus.maths.org/content/sites/plus.maths.org/files/abstractpics/%5Buid%5D/%5Bsite-date%5D/icon_3.png" width="100" height="100" alt="" /></div></div></div><div class="field field-name-field-author field-type-text field-label-inlinec clearfix field-label-inline"><div class="field-label">By </div><div class="field-items"><div class="field-item even">Rachel Thomas</div></div></div><div class="field field-name-body field-type-text-with-summary field-label-hidden"><div class="field-items"><div class="field-item even"><p>It may just be a matter of time before the next influenza pandemic strikes but you don't have to live your life in fear says <a href="https://www.queens.cam.ac.uk/mr-stephen-kissler">Stephen Kissler</a>, from the <a href="https://www.infectiousdisease.cam.ac.uk">Cambridge Infectious Diseases</a> group in DAMTP. "There have been quite a few [pandemics] since the 1918 Spanish flu, and none have come close [to its terrible death toll]." And Kissler has another reason to be cheerful: he is part of a group of Cambridge mathematicians who have just worked with the BBC on a programme, <a href="https://www.bbc.co.uk/programmes/p059y0p1">Contagion! The BBC Four Pandemic</a>, and together they have run a ground-breaking citizen science experiment that will help fight future pandemics.</p>
<p>There were two parallel aims for the project. One was producing the documentary with the BBC, describing the science and mathematics behind epidemiology, and the work that is being done on modelling and preparing for influenza epidemics and pandemics. "The second objective was more scientific," says Kissler. "This was to conduct a massive citizen science experiment which collected (with permission) data on people's movement, their reported contacts, and some personal information."</p>
<p>People participated (and can continue to participate, see below) by downloading the BBC Pandemic app on their smartphone (via the <a href="https://itunes.apple.com/us/app/bbc-pandemic/id1274960535?mt=8">App Store</a> or <a href="https://play.google.com/store/apps/details?id=com.threesixtyproduction.pandemic">Google Play</a>). The app asked for their age and gender, and then recorded their location every hour for 24 hours. At the end of that period the participant then recorded how many people they had contact with over that period, and some details about the interactions (eg. conversational versus physical contact, age of contact).</p>
<p>The result has been a "state of the art data set which will change how we develop infectious disease models," says Kissler. The original aim of the project was for around 10,000 people to participate. The project far surpassed that aim with nearly 30,000 people around the UK took part, making it the biggest citizen science experiment of its type, and the biggest such data set ever created. "There are no datasets on interpersonal contact that are that big," says Kissler. "The really crucial thing is this data links reported contacts with movement data, with how these people moved about in space. This has never been done before."</p>
<h3>Modelling gravity</h3>
<p>One of the models used by epidemiologists like Kissler is called a <em>gravity model</em>, named because of its similarity to Isaac Newton's law of gravitation. Newton's law says that the gravitational attraction between two bodies (of masses <img src="/MI/a21021deda01bce21e8bef1c58412383/images/img-0001.png" alt="$m_1$" style="vertical-align:-2px;
width:21px;
height:9px" class="math gen" /> and <img src="/MI/a21021deda01bce21e8bef1c58412383/images/img-0002.png" alt="$m_2$" style="vertical-align:-2px;
width:21px;
height:9px" class="math gen" />) is proportional to <table id="a0000000002" class="equation" width="100%" cellspacing="0" cellpadding="7">
<tr>
<td style="width:40%"> </td>
<td><img src="/MI/a21021deda01bce21e8bef1c58412383/images/img-0003.png" alt="\[ \frac{m_1 m_2}{d^2} \]" style="width:45px;
height:30px" class="math gen" /></td>
<td style="width:40%"> </td>
<td class="eqnnum" style="width:20%"> </td>
</tr>
</table> where <img src="/MI/a21021deda01bce21e8bef1c58412383/images/img-0004.png" alt="$d$" style="vertical-align:0px;
width:9px;
height:11px" class="math gen" /> is the distance between them. Researchers believe a similar rule is true for how people move between two locations.</p>
<p>"A gravity model describes how the frequency of human movement decays with distance, just like the force of gravity decays with distance," says Kissler. This model of movement then forms part of a model of how a disease is spread, as the infection passes from person to person. In particular, it is used to estimate the likelihood that one city or region will become infected at a certain time, depending on the infectious status of the neighbouring cities and regions, their sizes and distance away.</p>
<p>"The new data means we can test this model for its accuracy for predicting how people will move," says Kissler. The data will give them more accurate parameters for the model, in particular the power to which you raise the distance (the power of <img src="/MI/ef776e22c33c34a25416373dc5939e16/images/img-0001.png" alt="$d$" style="vertical-align:0px;
width:9px;
height:11px" class="math gen" /> is 2 in Newton's law). And because of the fantastic detail available in the new dataset, the researchers can see how this varies for different ages.</p>
<p>For the first time they now have detailed insight into the differences in movement patterns between age groups – a key thing they are interested in as epidemiologists. "A certain amount is known about how adults move around, how they commute to work and so on," says Kissler. "But we have no idea how people under 20 move around. And this is very important to the spread of lots of diseases, such as influenza, which is believed to be spread, particularly, by school-age children." The new data will allow researchers to test this theory of school-age children spreading influenza and see whether it is accurate.</p>
<h3>Planning for the future</h3>
<p>Although the simulations for the programme were bleak (predicting 43 million people infected in the UK, and nearly 900,000 dead, before a vaccine could realistically be produced), Kissler emphasises these simulations weren't a robust prediction of the potential impact of a pandemic: "We do this quantitative analysis, but we are interested in [using these] to compare qualitative outcomes."</p>
<p>In particularly, these simulations allow researchers to assess the impact of interventions on the spread of a disease. A simulation in the programme showed how a pandemic could be drastically slowed down by everyone in the country rigorously washing their hands.</p>
<p>Such interventions are introduced into the models by changing the value of the <em>reproductive ratio</em>, <img src="/MI/8dedb022d0b7349e822d8c7beea253e7/images/img-0001.png" alt="$R_0$" style="vertical-align:-2px;
width:19px;
height:13px" class="math gen" /> , which is the average number of people an infected person will pass the disease onto. (You can read more in <a href="/content/mathematics-diseases"><em>The mathematics of diseases</em></a>.) "For a disease to spread <img src="/MI/4158b7f0d41b3021fb06b2f437fad68a/images/img-0001.png" alt="$R_0$" style="vertical-align:-2px;
width:19px;
height:13px" class="math gen" /> needs to be greater than 1," says Kissler. In their first simulation of the pandemic for the programme, where nearly 900,000 died, <img src="/MI/4158b7f0d41b3021fb06b2f437fad68a/images/img-0001.png" alt="$R_0$" style="vertical-align:-2px;
width:19px;
height:13px" class="math gen" /> was set to 1.8. In the hand-washing scenario, <img src="/MI/4158b7f0d41b3021fb06b2f437fad68a/images/img-0001.png" alt="$R_0$" style="vertical-align:-2px;
width:19px;
height:13px" class="math gen" /> was only slightly lower, at 1.5, but reduced the number of cases and deaths of the disease by a quarter.</p>
<div class="centreimage" style="max-width:600px"><img alt="The effect of hand washing" src="/content/sites/plus.maths.org/files/news/2018/bbcpandemic/handwashing-map.jpg" style="width: 600px;" /> <p>The geographic spread of the disease for the uncontrolled pandemic on the left. (Note that the area of the disks are related to the geographic area of the regions in the model, not the population density.) The map on the right shows the spread of the disease when extra hand washing is introduced. (Image from <A href="https://www.sciencedirect.com/science/article/pii/S1755436518300306#fig0030">paper</a> by Klepac, Kissler and Gog, <A href="https://creativecommons.org/licenses/by-nc-nd/4.0/">CC BY-NC-ND 4.0</a>)</p></div>
<p>The team, <a href="http://www.damtp.cam.ac.uk/people/j.r.gog/">Professor Julia Gog</a>, <a href="http://www.damtp.cam.ac.uk/people/pk392/">Dr Petra Klepac</a> and Kissler, are now busy completing their initial data analysis, which they will publish along with the whole data set in early 2019. Then, as well as continuing with their own research, they are looking forward to seeing what the rest of the scientific community, including those outside of epidemiology, do with the data set.</p>
<p>Mathematical models of pandemic disease play an important role in policy decisions and government planning for future pandemics. "The clearest example is the foot and mouth outbreak in the UK," says Kissler. "Several modelling teams tested interventions using different models," agreeing on the best interventions to implement. "This data set will hopefully make that link between [mathematics and public policy] stronger."</p>
<p>You can also still contribute to this dataset by downloading the app and becoming part of this groundbreaking citizen science experiment. The researchers are particularly interested in more teenagers and people over the age of 60 taking part. And you can run the app more than once, contributing data on say, a week day, and then on a weekend, which would give researchers information on how our movement patterns change.</p>
<p>And in case you are still worried about a future pandemic, what can we as individuals do to prepare? Kissler has some practical advice: wash your hands, and cover you mouth when you sneeze!</p>
<p><em>You can find out more and watch the programme in full on the <a href="https://www.bbc.co.uk/programmes/p059y0p1">BBC website</a> until 21 April 2018. And you can read more about the mathematics behind the programme in the researchers' paper: <a href="https://www.sciencedirect.com/science/article/pii/S1755436518300306">Contagion! The BBC Four Pandemic – The model behind the documentary</a>.</em></p></div></div></div>Fri, 13 Apr 2018 13:20:42 +0000Rachel7028 at https://plus.maths.org/contenthttps://plus.maths.org/content/very-useful-pandemic#commentsBritain in love
https://plus.maths.org/content/brits-love
<div class="field field-name-field-abs-img field-type-image field-label-hidden"><div class="field-items"><div class="field-item even"><img class="img-responsive" src="https://plus.maths.org/content/sites/plus.maths.org/files/abstractpics/%5Buid%5D/%5Bsite-date%5D/heart_icon.jpg" width="100" height="100" alt="" /></div></div></div><div class="field field-name-field-author field-type-text field-label-inlinec clearfix field-label-inline"><div class="field-label">By </div><div class="field-items"><div class="field-item even">Marianne Freiberger</div></div></div><div class="field field-name-body field-type-text-with-summary field-label-hidden"><div class="field-items"><div class="field-item even"><p><em>The Guardian</em> is currently running the
<a href="https://www.theguardian.com/the-relationship-project">relationship project</a>, a "state of the nation report on Brits in
love". The project
is run in partnership with <a href="https://www.tsb.co.uk/personal/">TSB</a> with the
research being done by <a href="https://www.ipsos.com/ipsos-mori/en-uk">Ipsos MORI</a>.</p>
<p>In one of the project's <a href="https://www.theguardian.com/the-relationship-project/2018/feb/21/how-many-break-ups-does-it-take-to-find-the-one">articles</a> we came across the following
sentence:</p>
<p><em>"The average Brit will have had three long-term romantic
relationships in their lifetime, instigating 2.29 break-ups
themselves."</em></p>
<div class="rightimage" style="max-width: 350px;"><img src="/content/sites/plus.maths.org/files/news/2018/Guardian/flamingoes.jpg" alt="Flamingos" width="350px" height="234" /><p>Not all relationships last forever, but the numbers need to balance.</p></div>
<!-- Image from fotolia.com -->
<p>This, we thought, seems mathematically impossible. For every person
who is instigating a break-up there's a person who is being broken up
with, so the numbers should balance with every Brit instigating, on average, 1.5 break-ups. </p>
<p> It’s actually not too hard to prove this. Imagine a population of <img src="/MI/42f49232c88c826782e3508b8629071a/images/img-0001.png" alt="$N$" style="vertical-align:0px;
width:15px;
height:11px" class="math gen" /> people in which there have been <img src="/MI/42f49232c88c826782e3508b8629071a/images/img-0002.png" alt="$x$" style="vertical-align:0px;
width:9px;
height:7px" class="math gen" /> long-term relationships in total. This means that on <img src="/MI/42f49232c88c826782e3508b8629071a/images/img-0002.png" alt="$x$" style="vertical-align:0px;
width:9px;
height:7px" class="math gen" /> occasions someone has done the breaking up and someone has been broken up with. The average number of times a person instigates a break-up is therefore <img src="/MI/42f49232c88c826782e3508b8629071a/images/img-0003.png" alt="$x/N$" style="vertical-align:-4px;
width:32px;
height:16px" class="math gen" /> and equals the average number of times a person has been broken up with. Adding those two together gives the average number of relationships per person, regardless of who did the breaking up: <img src="/MI/42f49232c88c826782e3508b8629071a/images/img-0004.png" alt="$2x/N$" style="vertical-align:-4px;
width:40px;
height:16px" class="math gen" />. Since <img src="/MI/42f49232c88c826782e3508b8629071a/images/img-0005.png" alt="$2x/N=3$" style="vertical-align:-4px;
width:70px;
height:16px" class="math gen" /> it follows that <img src="/MI/42f49232c88c826782e3508b8629071a/images/img-0003.png" alt="$x/N$" style="vertical-align:-4px;
width:32px;
height:16px" class="math gen" />, the average number of times a person instigates a break-up, is 1.5. </p>
<p>This calculation assumes that all the relationships have finished, which of course isn’t the case in reality. However, the average number of <em>finished</em> relationships per person is less than or equal to the average number of relationships per person. So if we take account of the fact that some relationships might still be going on, but still write <img src="/MI/c960d79dbd8286e9114b2bffeaa59838/images/img-0001.png" alt="$x$" style="vertical-align:0px;
width:9px;
height:7px" class="math gen" /> for the number of finished relationships, we get that <img src="/MI/c960d79dbd8286e9114b2bffeaa59838/images/img-0002.png" alt="$2x/N \leq 3$" style="vertical-align:-4px;
width:70px;
height:16px" class="math gen" />, which means that <img src="/MI/c960d79dbd8286e9114b2bffeaa59838/images/img-0003.png" alt="$x \leq 1.5.$" style="vertical-align:-2px;
width:56px;
height:15px" class="math gen" /> It definitely can’t be 2.29. </p>
<p>So what is behind the <em>Guardian's</em> statement? One possibility is that it was clumsily phrased, and that the figure of 2.29 was
calculated with <em>all</em> broken-up relationships in mind, not just the
long-term ones. Indeed, in other articles belonging to the
relationship project the figure is quoted without any reference to
long-termism. If that is the case, then all is well mathematically,
and the problem down to fuzzy writing. </p>
<p>We couldn't resist, however, to see if there are other explanations. For example, could it be that the statement refers, not to the <em>mean</em> average, but to the <em>median</em>? The mean average of a list of numbers is the sum of the numbers divided by how many numbers there are in total. It's the kind of average we considered above. To get the median, you list all your values in numerical order, including repeated ones, and find the number that's right in the middle of your list (if there isn't a middle because there are an even number of values, then the median is the value that lies half-way between the two middle values). Thus, the median of the list 1, 2, 3, 4, 5 is 3, and the median of the list 1, 2, 3, 4 is 2.5. </p>
<p>The median is often used to define the average person with respect to some activity or characteristic, such as long-term relationships: of you lined all Brits up in order of how many long-term relationships they have had, the median would be marked by the person right in the middle, which is a good reason for calling them an average person. The mean, on the other hand, tells us how many long-term relationships there would be per person if the relationships were distributed evenly in the population. </p>
<div class="leftimage" style="max-width: 283px;"><img src="/content/sites/plus.maths.org/files/news/2018/Guardian/graph.png" alt="Example" width="283px" height="294" /><p>Relationships between a population of five people. An arrow between two nodes means that they two corresponding people have had a relationship. The direction of the arrow indicates who broke up with whom: an arrow pointing from node x to a node y means that node x ended the relationship. The median number of relationships is 2, the median number of break-ups instigated is 1, and the median number of break-ups "received" is 0.</p></div>
<!-- Image made by MF -->
<p>In theory, it is perfectly possible for the median number of instigated break-ups and the median number of break-ups "received" to not be equal, and to not add up to the median number of long-term relationships. We have created a toy example where this is the case (see left). However,
the number of break-ups instigated by a person is a whole number (we assume). A median that lies between two and three means that half the population instigated at most two break-ups and the other half at least three. The median should therefore be 2.5. Quoting it as 2.29 is non-sensical (and technically wrong).</p>
<p>Without more detail about the survey and how it was analysed, it's hard to tell what exactly is going on here. If we are talking means, then the discrepancy could in theory be down to a bias in the sample of people who took part in the survey. In our calculation above we assumed a <em>closed population</em>, that is, a population in which individuals only have relationships with individuals who are also part of the population. While the entire population of British adults is probably more or less closed in that sense, a smaller sample (1,932 British adults aged 18+ for this study) obviously isn't. In this case more break-ups could have been instigated by people in the survey than received by people in the survey, with the "missing" received break-ups involving people outside the survey. However, the whole point of choosing a large, and random, sample is to avoid such accidental biases. </p>
<p>In theory the discrepancy could also be down to subjectivity. Few break-ups are clear cut, and there must be situations in which both ex partners think that they ended the relationship. This would inflate the average number of break-ups instigated per person, and could thus explain the statement. It would perhaps also tell us something interesting about how people break up and what they feel about it. </p>
<p>Perhaps a future <em>Guardian</em> article will shed some light on the issue. The whole thing reminds us of the third <a href="http://www.natsal.ac.uk/home.aspx">National Survey of Sexual Attitudes and Lifestyles</a> in which men reported having had twice as many sexual partners, on average, than women. In a closed population with roughly as many males as females (which there are) this is also mathematically impossible (see <a href="/content/average-number-sexual-partners">here</a> for a proof). In this case, the results of the survey are clearly presented and we know that the average is the mean average.
Scientists are still arguing how the discrepancy might arise. Explanations range from men inflating their numbers and women deflating them, men and women differing as to what constitutes a sexual partner, and men's visits to prostitutes (who were not part of the survey) skewing the numbers. You can find more about this, and other, statistics about our sex lives in David Spiegelhalter's excellent book <a href="http://sexbynumbers.wellcomecollection.org/"><em>Sex by numbers</em></a>.</p>
</div></div></div>Thu, 05 Apr 2018 16:13:09 +0000Marianne7022 at https://plus.maths.org/contenthttps://plus.maths.org/content/brits-love#comments