<?xml version="1.0" encoding="UTF-8" standalone="yes"?><oembed><version><![CDATA[1.0]]></version><provider_name><![CDATA[Azimuth]]></provider_name><provider_url><![CDATA[https://johncarlosbaez.wordpress.com]]></provider_url><author_name><![CDATA[John Baez]]></author_name><author_url><![CDATA[https://johncarlosbaez.wordpress.com/author/johncarlosbaez/]]></author_url><title><![CDATA[Game Theory (Part&nbsp;7)]]></title><type><![CDATA[link]]></type><html><![CDATA[<p>We need to learn a little probability theory to go further in our work on game theory.  </p>
<p>We&#8217;ll start with some finite set <img src='https://s0.wp.com/latex.php?latex=X&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='X' title='X' class='latex' /> of &#8216;events&#8217;.  The idea is that these are things that can happen&#8212;for example, choices you could make while playing a game.  A &#8216;probability distribution&#8217; on this set assigns to each event a number called a &#8216;probability&#8217;&#8212;which says, roughly speaking, how likely that event is.  If we&#8217;ve got some event <img src='https://s0.wp.com/latex.php?latex=i%2C&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='i,' title='i,' class='latex' /> we&#8217;ll call its probability <img src='https://s0.wp.com/latex.php?latex=p_i.&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='p_i.' title='p_i.' class='latex' /></p>
<p>For example, suppose we&#8217;re interested in whether it will rain today or not.  Then we might look at a set of two events:</p>
<div align="center">
<img src='https://s0.wp.com/latex.php?latex=X+%3D+%5C%7B%5Ctextrm%7Brain%7D%2C+%5Ctextrm%7Bno+rain%7D+%5C%7D&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='X = &#92;{&#92;textrm{rain}, &#92;textrm{no rain} &#92;}' title='X = &#92;{&#92;textrm{rain}, &#92;textrm{no rain} &#92;}' class='latex' />
</div>
<p>If the weatherman says the chance of rain is 20%, then  </p>
<div align="center">
<img src='https://s0.wp.com/latex.php?latex=p_%7B%5Ctextrm%7Brain%7D+%7D+%3D+0.2+&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='p_{&#92;textrm{rain} } = 0.2 ' title='p_{&#92;textrm{rain} } = 0.2 ' class='latex' />
</div>
<p>since 20% is just a fancy way of saying 0.2.  The chance of no rain will then be 80%, or 0.8, since the probabilities should add up to 1:</p>
<div align="center">
<img src='https://s0.wp.com/latex.php?latex=p_%7B%5Ctextrm%7Bno+rain%7D%7D+%3D+0.8+&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='p_{&#92;textrm{no rain}} = 0.8 ' title='p_{&#92;textrm{no rain}} = 0.8 ' class='latex' />
</div>
<p>Let&#8217;s make this precise with an official definition:</p>
<p><b>Definition.</b> Given a finite set <img src='https://s0.wp.com/latex.php?latex=X&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='X' title='X' class='latex' /> of <b>events</b>, a <b>probability distribution</b> <img src='https://s0.wp.com/latex.php?latex=p&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='p' title='p' class='latex' /> assigns a real number <img src='https://s0.wp.com/latex.php?latex=p_i&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='p_i' title='p_i' class='latex' /> called a <b>probability</b> to each event <img src='https://s0.wp.com/latex.php?latex=i+%5Cin+X%2C&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='i &#92;in X,' title='i &#92;in X,' class='latex' /> such that:</p>
<p>1) <img src='https://s0.wp.com/latex.php?latex=0+%5Cle+p_i+%5Cle+1+&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='0 &#92;le p_i &#92;le 1 ' title='0 &#92;le p_i &#92;le 1 ' class='latex' /></p>
<p>and</p>
<p>2) <img src='https://s0.wp.com/latex.php?latex=%5Cdisplaystyle%7B+%5Csum_%7Bi+%5Cin+X%7D+p_i+%3D+1%7D+&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='&#92;displaystyle{ &#92;sum_{i &#92;in X} p_i = 1} ' title='&#92;displaystyle{ &#92;sum_{i &#92;in X} p_i = 1} ' class='latex' /> </p>
<p>Note that this official definition doesn&#8217;t say what an event <i>really is</i>, and it doesn&#8217;t say what probabilities <i>really mean</i>.  But that&#8217;s how it should be!  As usual with math definitions, the words in boldface could be replaced by <i>any other words</i> and the definition would still do its main job, which is to let us prove theorems involving these words.  If we wanted, we could call an event a <b>doohickey</b>, and call a probability a <b>schnoofus</b>.  All our theorems would still be true.</p>
<p>Of course we hope our theorems will be useful in real world applications.  And in these applications, the probabilities <img src='https://s0.wp.com/latex.php?latex=p_i&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='p_i' title='p_i' class='latex' /> will be some way of measuring &#8216;how likely&#8217; events are.  But it&#8217;s actually quite hard to say precisely what probabilities really mean!   People have been arguing about this for centuries.  So it&#8217;s good that we separate this hard task from our definition above, which is quite simple and 100% precise.</p>
<p>Why is it hard to say what probabilities really are?  Well, what does it mean to say &#8220;the probability of rain is 20%&#8221;?  Suppose you see a weather report and read this.  What does it mean?</p>
<p>A student suggests: &#8220;it means that if you looked at a lot of similar days, it would rain on 20% of them.&#8221;</p>
<p>Yes, that&#8217;s pretty good.  But what counts as a &#8220;similar day&#8221;?  How similar does it have to be?  Does everyone have to wear the same clothes?  No, that probably doesn&#8217;t matter, because presumably doesn&#8217;t affect the weather.   But what <i>does</i> affect the weather?  A lot of things!  Do <i>all</i> those things have to be exactly the same for it count as similar day.</p>
<p>And what counts as a &#8220;lot&#8221; of days?  How many do we need?  </p>
<p>And it won&#8217;t rain on <i>exactly</i> 20% of those days.  How close do we need to get?  </p>
<p>Imagine I have a coin and I claim it lands heads up 50% of the time.  Say I flip it 10 times and it lands heads up every time.  Does that mean I was wrong?  Not necessarily.  It&#8217;s <i>possible</i> that the coin will do this.  It&#8217;s just not very <i>probable</i>.  </p>
<p>But look: now we&#8217;re using the word &#8216;probable&#8217;, which is the word we&#8217;re trying to understand!  It&#8217;s getting sort of circular: we&#8217;re saying a coin has a 50% probability of landing heads up if when you flip it a lot of times, it <i>probably</i> lands head up close to 50% of the time.  That&#8217;s not very helpful if you don&#8217;t already have some idea what &#8216;probability&#8217; means.</p>
<p>For all these reasons, and many more, it&#8217;s tricky to say exactly what probabilities really mean.  People have made a lot of progress on this question, but we will sidestep it and focus on learning to calculate with probabilities.</p>
<p>If you want to dig in a bit deeper, try this:</p>
<p>&bull; <a href="http://en.wikipedia.org/wiki/Probability_interpretations">Probability interpretations</a>, Wikipedia.</p>
<h3> Equally likely events </h3>
<p>As I&#8217;ve tried to convince you, it can be hard to figure out the probabilities of events.  But it&#8217;s easy if we assume all the events are equally likely.  </p>
<p>Suppose we have a set <img src='https://s0.wp.com/latex.php?latex=X&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='X' title='X' class='latex' /> consisting of <img src='https://s0.wp.com/latex.php?latex=n&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='n' title='n' class='latex' /> events.  And suppose that all the probabilities <img src='https://s0.wp.com/latex.php?latex=p_i&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='p_i' title='p_i' class='latex' /> are equal: say for some constant <img src='https://s0.wp.com/latex.php?latex=c&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='c' title='c' class='latex' /> we have</p>
<div align="center">
<img src='https://s0.wp.com/latex.php?latex=p_i+%3D+c+&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='p_i = c ' title='p_i = c ' class='latex' />
</div>
<p>for all <img src='https://s0.wp.com/latex.php?latex=i+%5Cin+X.&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='i &#92;in X.' title='i &#92;in X.' class='latex' />  Then by rule 1) above,</p>
<div align="center">
<img src='https://s0.wp.com/latex.php?latex=%5Cdisplaystyle%7B+1+%3D+%5Csum_%7Bi+%5Cin+X%7D+p_i+%3D+%5Csum_%7Bi+%5Cin+X%7D+c+%3D+n+c+%7D+&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='&#92;displaystyle{ 1 = &#92;sum_{i &#92;in X} p_i = &#92;sum_{i &#92;in X} c = n c } ' title='&#92;displaystyle{ 1 = &#92;sum_{i &#92;in X} p_i = &#92;sum_{i &#92;in X} c = n c } ' class='latex' />
</div>
<p>since we&#8217;re just adding the number <img src='https://s0.wp.com/latex.php?latex=c&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='c' title='c' class='latex' /> to itself <img src='https://s0.wp.com/latex.php?latex=n&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='n' title='n' class='latex' /> times.  So,</p>
<div align="center">
<img src='https://s0.wp.com/latex.php?latex=%5Cdisplaystyle%7B++c+%3D+%5Cfrac%7B1%7D%7Bn%7D+%7D+&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='&#92;displaystyle{  c = &#92;frac{1}{n} } ' title='&#92;displaystyle{  c = &#92;frac{1}{n} } ' class='latex' />
</div>
<p>and thus</p>
<div align="center">
<img src='https://s0.wp.com/latex.php?latex=%5Cdisplaystyle%7B+p_i+%3D+%5Cfrac%7B1%7D%7Bn%7D+%7D+&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='&#92;displaystyle{ p_i = &#92;frac{1}{n} } ' title='&#92;displaystyle{ p_i = &#92;frac{1}{n} } ' class='latex' />
</div>
<p>for all <img src='https://s0.wp.com/latex.php?latex=i+%5Cin+X&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='i &#92;in X' title='i &#92;in X' class='latex' />.  </p>
<p>I made this look harder than it really is. I was just trying to show you that it follows from the definitions, not any intuition.  But it&#8217;s obvious: if you have <img src='https://s0.wp.com/latex.php?latex=n&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='n' title='n' class='latex' /> events that are equally likely, each one has probability <img src='https://s0.wp.com/latex.php?latex=1%2Fn.&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='1/n.' title='1/n.' class='latex' /></p>
<p><b>Example 1.</b>  Suppose we have a coin that can land either heads up or tails up&#8212;let&#8217;s ignore the possibility that it lands on its edge!  Then </p>
<div align="center">
<img src='https://s0.wp.com/latex.php?latex=X+%3D+%5C%7B+H%2C+T%5C%7D&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='X = &#92;{ H, T&#92;}' title='X = &#92;{ H, T&#92;}' class='latex' />
</div>
<p>If we assume these two events are equally probable, we must have </p>
<div align="center">
<img src='https://s0.wp.com/latex.php?latex=%5Cdisplaystyle%7B+p_H+%3D+p_T+%3D++%5Cfrac%7B1%7D%7B2%7D+%7D+&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='&#92;displaystyle{ p_H = p_T =  &#92;frac{1}{2} } ' title='&#92;displaystyle{ p_H = p_T =  &#92;frac{1}{2} } ' class='latex' />
</div>
<p>Note I said <i>&#8220;if we assume&#8221;</i> these two events are equally probable.  I didn&#8217;t say they actually are!  Are they?  Suppose we take a penny and flip it a zillion times.  Will it land heads up almost exactly half a zillion times?  </p>
<p>Probably not!  The treasury isn&#8217;t interested in making pennies that do this.  They&#8217;re interested in making the head look like Lincoln, and the tail look like the Lincoln national monument:</p>
<div align="center"><a href="http://en.wikipedia.org/wiki/Penny_%28United_States_coin%29"><img src="https://i1.wp.com/upload.wikimedia.org/wikipedia/commons/thumb/0/0c/2010_cent_obverse.png/250px-2010_cent_obverse.png" /></a></div>
<div align="center"><a href="http://en.wikipedia.org/wiki/Penny_%28United_States_coin%29"><img src="https://i1.wp.com/upload.wikimedia.org/wikipedia/commons/thumb/e/e5/2005_Penny_Rev_Unc_D.png/250px-2005_Penny_Rev_Unc_D.png" /></a></div>
<p>Or at least they used to.  Since the two sides are different, there&#8217;s no reason they should have the exact same probability of landing on top.  </p>
<p>In fact nobody seems to have measured the difference between heads and tails in probabilities for <i>flipping</i> pennies.  For hand-flipped pennies, it seems whatever side that starts on top has a roughly 51% chance of landing on top!  But if you <i>spin</i> a penny, it&#8217;s much more likely to land tails up:</p>
<p>&bull; <a href="http://www.codingthewheel.com/archives/the-coin-flip-a-fundamentally-unfair-proposition">The coin flip: a fundamentally unfair proposition?</a>, <i>Coding the Wheel</i>.</p>
<p><b>Example 2.</b>  Suppose we have a standard deck of cards, well-shuffled, and assume that when I draw a card from this deck, each card is equally likely to be chosen. What is the probability that I draw the ace of spades?</p>
<p>If there&#8217;s no joker in the deck, there are 52 cards, so the answer is 1/52.  </p>
<p>Let me remind you how a deck of cards works: I wouldn&#8217;t want someone to fail the course because they didn&#8217;t ever play cards!   Here are the 52 cards in a standard deck.  Here&#8217;s what they all look like (click to enlarge):</p>
<div align="center"><a href="http://math.ucr.edu/home/baez/mathematical/cards.png"><img width="450" src="https://i2.wp.com/math.ucr.edu/home/baez/mathematical/cards.png" /></a></div>
<p>As you can see, they come in 4 kinds, called <b><a href="http://en.wikipedia.org/wiki/Suit_%28cards%29">suits</a></b>.  The suits are:</p>
<p>&bull; clubs: ♣</p>
<p>&bull; spades: ♠</p>
<p>&bull; <font color="red">diamonds: ♦</font></p>
<p>&bull; <font color="red">hearts: ♥</font></p>
<p>Two suits are black and two are red.  Each suit has 13 cards in it, for a total of 4 &times; 13 = 52. The cards in each suit are numbered from 1 to 13, except for four exceptions.  They go like this:</p>
<div align="center">
A, 2, 3, 4, 5, 6, 7, 8, 9, 10, J, Q, K
</div>
<p>A stands for &#8216;ace&#8217;, J for &#8216;jack&#8217;, Q for &#8216;queen&#8217; and K for &#8216;king&#8217;.</p>
<h3> Probabilities of subsets </h3>
<p>If we know a probability distribution on a finite set <img src='https://s0.wp.com/latex.php?latex=X&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='X' title='X' class='latex' />, we can define the probability that an event in some subset <img src='https://s0.wp.com/latex.php?latex=S+%5Csubseteq+X&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='S &#92;subseteq X' title='S &#92;subseteq X' class='latex' /> will occur.  We define this to be</p>
<div align="center">
<img src='https://s0.wp.com/latex.php?latex=%5Cdisplaystyle%7Bp%28S%29+%3D+%5Csum_%7Bi+%5Cin+S%7D+p_i+%7D+&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='&#92;displaystyle{p(S) = &#92;sum_{i &#92;in S} p_i } ' title='&#92;displaystyle{p(S) = &#92;sum_{i &#92;in S} p_i } ' class='latex' />
</div>
<p>For example, I usually have one of three things for breakfast:</p>
<div align="center">
<img src='https://s0.wp.com/latex.php?latex=X+%3D+%5C%7B+%5Ctextrm%7Boatmeal%7D%2C+%5Ctextrm%7Bwaffles%7D%2C+%5Ctextrm%7Beggs%7D+%5C%7D+&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='X = &#92;{ &#92;textrm{oatmeal}, &#92;textrm{waffles}, &#92;textrm{eggs} &#92;} ' title='X = &#92;{ &#92;textrm{oatmeal}, &#92;textrm{waffles}, &#92;textrm{eggs} &#92;} ' class='latex' />
</div>
<p>I have an 86% chance of eating oatmeal for breakfast, a 10% chance of eating waffles, and a 4% chance of eating eggs and toast.  What&#8217;s the probability that I will eat oatmeal <i>or</i> waffles?  These choices form the subset</p>
<div align="center">
<img src='https://s0.wp.com/latex.php?latex=S+%3D+%5C%7B+%5Ctextrm%7Boatmeal%7D%2C+%5Ctextrm%7Bwaffles%7D+%5C%7D+&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='S = &#92;{ &#92;textrm{oatmeal}, &#92;textrm{waffles} &#92;} ' title='S = &#92;{ &#92;textrm{oatmeal}, &#92;textrm{waffles} &#92;} ' class='latex' />
</div>
<p>and the probability for this subset is</p>
<div align="center">
<img src='https://s0.wp.com/latex.php?latex=p%28S%29+%3D+p_%7B%5Ctextrm%7Boatmeal%7D%7D+%2B+p_%7B%5Ctextrm%7Bwaffles%7D%7D+%3D+0.86+%2B+0.1+%3D+0.96+&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='p(S) = p_{&#92;textrm{oatmeal}} + p_{&#92;textrm{waffles}} = 0.86 + 0.1 = 0.96 ' title='p(S) = p_{&#92;textrm{oatmeal}} + p_{&#92;textrm{waffles}} = 0.86 + 0.1 = 0.96 ' class='latex' />
</div>
<p>Here&#8217;s an example from cards:</p>
<p><b>Example 2.</b>  Suppose we have a standard deck of cards, well-shuffled, and assume that when I draw a card from this deck, each card is equally likely to be chosen. What is the probability that I draw a card in the suit of hearts?</p>
<p>Since there are 13 cards in the suit of hearts, each with probability 1/52, we add up their probabilities and get</p>
<div align="center">
<img src='https://s0.wp.com/latex.php?latex=%5Cdisplaystyle%7B+13+%5Ctimes+%5Cfrac%7B1%7D%7B52%7D+%3D+%5Cfrac%7B1%7D%7B4%7D+%7D&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='&#92;displaystyle{ 13 &#92;times &#92;frac{1}{52} = &#92;frac{1}{4} }' title='&#92;displaystyle{ 13 &#92;times &#92;frac{1}{52} = &#92;frac{1}{4} }' class='latex' />
</div>
<p>This should make sense, since there are 4 suits, and as many cards in each suit.</p>
<h3> Card tricks </h3>
<p>This is just a fun digression.  The deck of cards involves some weird numerology.  For starters, it has 52 cards.  That&#8217;s a strange number!  Where else have you seen this number?</p>
<p>A student says: &#8220;It&#8217;s the number of weeks in a year.&#8221;</p>
<p>Right!  And these 52 cards are grouped in 4 suits.  What does the year have 4 of?</p>
<p>A student says: &#8220;Seasons!&#8221;</p>
<p>Right!  And we have 52 = 4 &times; 13.  So what are there 13 of?  </p>
<p>A student says: &#8220;Weeks in a season!&#8221;</p>
<p>Right!  I have no idea if this is a coincidence or not.  And have you ever added up the values of all the cards in a suit, where we count the ace as 1, and so on?  We get </p>
<div align="center">
1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13
</div>
<p>And what&#8217;s that equal to?</p>
<p>After a long pause, a student says &#8220;91.&#8221;</p>
<p>Yes, that&#8217;s a <i>really</i> strange number.  But let&#8217;s say we total up the values of all the cards in the deck, not just one suit.  What do we get?</p>
<p>A student says &#8220;We get 4 &times; 91&#8230; or 364.&#8221;</p>
<p>Right.  Three-hundred and sixty-<i>four</i>.  <i>Almost</i> the number of days in year.  </p>
<p>&#8220;So add one more: the joker!  Then you get 365!&#8221;</p>
<p>Right, maybe that&#8217;s why they put an extra card called the <a href="http://en.wikipedia.org/wiki/Joker_%28playing_card%29"><b>joker</b></a> in the deck:</p>
<div align="center"><a href="http://en.wikipedia.org/wiki/Joker_%28playing_card%29"><img src="https://i2.wp.com/upload.wikimedia.org/wikipedia/commons/thumb/d/d0/Joker_black_02.svg/200px-Joker_black_02.svg.png" /></a></div>
<p>One extra card for one extra day, joker-day&#8230; April Fool&#8217;s Day!  That brings the total up to 365.</p>
<p>Again, I have no idea if this is a coincidence or not. But the people who invented the Tarot deck were pretty weird&mdash;they packed it with symbolism&mdash;so maybe the ordinary cards were designed this way on purpose too.</p>
<p><b>Puzzle.</b>  What are the prime factors of the number 91?  You should know by now&#8230; and you should know what they have to do with the calendar!</p>
]]></html><thumbnail_url><![CDATA[https://i1.wp.com/upload.wikimedia.org/wikipedia/commons/thumb/0/0c/2010_cent_obverse.png/250px-2010_cent_obverse.png?fit=440%2C330]]></thumbnail_url><thumbnail_height><![CDATA[250]]></thumbnail_height><thumbnail_width><![CDATA[250]]></thumbnail_width></oembed>