<?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;11)]]></title><type><![CDATA[link]]></type><html><![CDATA[<p>Here&#8217;s a game.  I flip a fair coin.  If it lands heads up, I give you $1. If it lands tails up, I give you nothing.  </p>
<p>How much should you pay to play this game?</p>
<p>This is not a mathematics question, because it asks what you &#8220;should&#8221; do.  This could depend on many things that aren&#8217;t stated in the question.</p>
<p>Nonetheless, mathematicians have a way they like to answer this question.  They do it by computing the so-called &#8216;expected value&#8217; of your payoff.  With probability 1/2 you get 1 dollar; with probability 1/2 you get 0 dollars.  So, the expected value is defined to be </p>
<div align="center">
<img src='https://s0.wp.com/latex.php?latex=%5Cdisplaystyle%7B+%5Cfrac%7B1%7D%7B2%7D+%5Ctimes+1+%2B+%5Cfrac%7B1%7D%7B2%7D+%5Ctimes+0+%3D+%5Cfrac%7B1%7D%7B2%7D+%7D&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='&#92;displaystyle{ &#92;frac{1}{2} &#92;times 1 + &#92;frac{1}{2} &#92;times 0 = &#92;frac{1}{2} }' title='&#92;displaystyle{ &#92;frac{1}{2} &#92;times 1 + &#92;frac{1}{2} &#92;times 0 = &#92;frac{1}{2} }' class='latex' />
</div>
<p>Don&#8217;t be fooled by the word &#8216;expected&#8217;: mathematicians use words in funny ways.  I&#8217;m not saying you should expect to get 1/2 a dollar each time you play this game: obviously you don&#8217;t!  It means that you get 1/2 a dollar &#8216;on average&#8217;.  More precisely: if you play the game lots of times, say a million times, there&#8217;s a high probability that you&#8217;ll get fairly close to 1/2 a million dollars.  (We could make this more precise and prove it, but that would be quite a digression right now.)</p>
<p>So, if you have lots of money and lots of time, you could pay up to 1/2 a dollar to play this game, over and over, and still make money on average.  If you pay <i>exactly</i> 1/2 a dollar you won&#8217;t make money on average, but you won&#8217;t lose it either&mdash;on average.</p>
<h3> Expected values </h3>
<p>Let&#8217;s make the idea precise:</p>
<p><b>Definition.</b>  Suppose <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' /> is a finite set and <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' /> is a probability distribution on that set.  Suppose</p>
<div align="center">
<img src='https://s0.wp.com/latex.php?latex=f%3A+X+%5Cto+%5Cmathbb%7BR%7D&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='f: X &#92;to &#92;mathbb{R}' title='f: X &#92;to &#92;mathbb{R}' class='latex' />
</div>
<p>is a function from <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' /> to <img src='https://s0.wp.com/latex.php?latex=%5Cmathbb%7BR%7D.&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='&#92;mathbb{R}.' title='&#92;mathbb{R}.' class='latex' />  Then the <b>expected value of <img src='https://s0.wp.com/latex.php?latex=f&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='f' title='f' class='latex' /> with respect to <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' /></b> is defined to be</p>
<div align="center">
<img src='https://s0.wp.com/latex.php?latex=%5Cdisplaystyle%7B+%5Clangle+f+%5Crangle+%3D+%5Csum_%7Bi+%5Cin+X%7D+p_i+f%28i%29+%7D&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='&#92;displaystyle{ &#92;langle f &#92;rangle = &#92;sum_{i &#92;in X} p_i f(i) }' title='&#92;displaystyle{ &#92;langle f &#92;rangle = &#92;sum_{i &#92;in X} p_i f(i) }' class='latex' />
</div>
<p>The idea here is that we are averaging the different values <img src='https://s0.wp.com/latex.php?latex=f%28i%29&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='f(i)' title='f(i)' class='latex' /> of the function <img src='https://s0.wp.com/latex.php?latex=f&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='f' title='f' class='latex' />, but we count <img src='https://s0.wp.com/latex.php?latex=f%28i%29&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='f(i)' title='f(i)' class='latex' /> more when the probability of the event <img src='https://s0.wp.com/latex.php?latex=i&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='i' title='i' class='latex' /> is bigger.  We pronounce <img src='https://s0.wp.com/latex.php?latex=%5Clangle+f+%5Crangle&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='&#92;langle f &#92;rangle' title='&#92;langle f &#92;rangle' class='latex' /> like this: &#8220;the expected value of <img src='https://s0.wp.com/latex.php?latex=f&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='f' title='f' class='latex' />&#8220;.</p>
<h3> Examples </h3>
<p><b>Example 1.</b>  Suppose you enter a lottery have a 0.01% chance of winning $100 and a 99.99% chance of winning nothing. What is the expected value of your payoff?</p>
<p>With probability 0.0001 you win $100.  With probability .9999 you win zero dollars.  So, your expected payoff is</p>
<div align="center">
<img src='https://s0.wp.com/latex.php?latex=%5Cdisplaystyle%7B+0.0001+%5Ctimes+100+%2B+.9999+%5Ctimes+0+%3D+0.01+%7D+&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='&#92;displaystyle{ 0.0001 &#92;times 100 + .9999 &#92;times 0 = 0.01 } ' title='&#92;displaystyle{ 0.0001 &#92;times 100 + .9999 &#92;times 0 = 0.01 } ' class='latex' />
</div>
<p>dollars.  So: if you play this game over and over, you expect that on average you will win a penny per game.   </p>
<p>But usually you have to pay to enter a lottery!  This changes everything.  Let&#8217;s see how:</p>
<p><b>Example 2.</b>  Suppose you pay $5 to enter a lottery.  Suppose you have a 0.01% chance of winning $100 and a 99.99% chance of winning nothing. What is the expected value of your payoff, including your winnings but also the money you paid?</p>
<p>With probability 0.0001 you win $100, but pay $5, so your payoff is $95 in this case.  With probability .9999 you win nothing, but pay $5, so your payoff is -$5 in this case.  So, your expected payoff is</p>
<div align="center">
<img src='https://s0.wp.com/latex.php?latex=%5Cdisplaystyle%7B+0.0001+%5Ctimes+95+-+.9999+%5Ctimes+5+%3D+-+4.99+%7D&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='&#92;displaystyle{ 0.0001 &#92;times 95 - .9999 &#92;times 5 = - 4.99 }' title='&#92;displaystyle{ 0.0001 &#92;times 95 - .9999 &#92;times 5 = - 4.99 }' class='latex' />
</div>
<p>dollars.  In simple terms: if we play this game over and over, we expect that on average we will lose $4.99 per play.</p>
<p><b>Example 3.</b>   Suppose you pay $5 to play a game where you<br />
flip a coin 5 times.  Suppose the coin is fair and the flips are independent.  If the coin lands heads up every time, you win $100.  Otherwise you win nothing.  What is the expected value of your payoff, including your winnings but also the money you paid?</p>
<p>Since the coin flips are fair and independent, the probability that it lands heads up every time is </p>
<div align="center">
<img src='https://s0.wp.com/latex.php?latex=%5Cdisplaystyle%7B+%5Cfrac%7B1%7D%7B2%5E5%7D+%3D+%5Cfrac%7B1%7D%7B32%7D+%7D&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='&#92;displaystyle{ &#92;frac{1}{2^5} = &#92;frac{1}{32} }' title='&#92;displaystyle{ &#92;frac{1}{2^5} = &#92;frac{1}{32} }' class='latex' />
</div>
<p>So, when we count the $5 you pay to play, with probability 1/32 your payoff is $95, and with probability (1 &#8211; 1/32) = 31/32 your payoff is -$5.  The expected value of your payoff is thus</p>
<div align="center">
<img src='https://s0.wp.com/latex.php?latex=%5Cdisplaystyle%7B+%5Cfrac%7B1%7D%7B32%7D+%5Ctimes+95+-+%5Cfrac%7B31%7D%7B32%7D+%5Ctimes+5+%3D+-1.875+%7D&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='&#92;displaystyle{ &#92;frac{1}{32} &#92;times 95 - &#92;frac{31}{32} &#92;times 5 = -1.875 }' title='&#92;displaystyle{ &#92;frac{1}{32} &#92;times 95 - &#92;frac{31}{32} &#92;times 5 = -1.875 }' class='latex' />
</div>
<p>dollars.  </p>
<h3> Risk aversion and risk tolerance </h3>
<p>Soon we&#8217;ll start talking about games where players used &#8216;mixed strategies&#8217;, meaning that they randomly make their choices according to some probability distribution.  <b>To keep the math simple, we will assume our &#8216;rational agents&#8217; want to maximize the expected value of their payoff.</b>  </p>
<p>But it&#8217;s important to remember that <b>life is not really so simple</b>, especially if payoffs are measured in dollars.  Rational agents may have good reasons to do something else!</p>
<p>For example, suppose some evil fiend says they&#8217;ve kidnapped my wife and they&#8217;ll kill her unless I give him a dollar.  Suppose I only have 99 cents.   But suppose they offer me a chance to play this game: I flip a fair coin, and if it lands heads up, I get $1. If it lands tails up, I get nothing.  </p>
<p>How much would I pay to play this game?  </p>
<p>Assuming I had no way to call the police, etcetera, I would pay all my 99 cents to play this game.  After all, if I don&#8217;t play it, my wife will die!  But if I <i>do</i> play it, I would at least have a 50% chance of saving her.</p>
<p>The point here is that my happiness, or utility, is not proportional to my amount of money.  If I have less than $1, I&#8217;m really miserable.   If I have $1 or more, I&#8217;m much better off.</p>
<p>There are many other reasons why people might be willing to pay more or less to play a game than the expected value of its monetary payoff.  Some people are <b>risk tolerant</b>: they are willing to accept higher risks to get a chance at a higher payoffs.  Others are <b>risk averse</b>: they would prefer to have a high probability of getting a payoff even if it&#8217;s not so big.  See:</p>
<p>&bull; <a href="http://en.wikipedia.org/wiki/Risk_aversion">Risk aversion</a>, Wikipedia.</p>
<p>In class I asked all the students: would you like to play the following game?   I&#8217;ll flip a fair coin.  Then I&#8217;ll double your quiz score for today if it comes heads, but give you a zero for your quiz score if it comes up tails.</p>
<p>Suppose your quiz score is <img src='https://s0.wp.com/latex.php?latex=Q.&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='Q.' title='Q.' class='latex' />  If you get heads, I&#8217;ll give you <img src='https://s0.wp.com/latex.php?latex=Q&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='Q' title='Q' class='latex' /> more points.  If you get tails, I&#8217;ll take away <img src='https://s0.wp.com/latex.php?latex=Q&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='Q' title='Q' class='latex' /> points.  So the expected value of the payoff for this game, measured in points, is</p>
<div align="center">
<img src='https://s0.wp.com/latex.php?latex=%5Cdisplaystyle%7B+%5Cfrac%7B1%7D%7B2%7D+%5Ctimes+Q+-+%5Cfrac%7B1%7D%7B2%7D+%5Ctimes+Q+%3D+0+%7D&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='&#92;displaystyle{ &#92;frac{1}{2} &#92;times Q - &#92;frac{1}{2} &#92;times Q = 0 }' title='&#92;displaystyle{ &#92;frac{1}{2} &#92;times Q - &#92;frac{1}{2} &#92;times Q = 0 }' class='latex' />
</div>
<p>So, if the expected value is what matters to you, you&#8217;ll be right on the brink of wanting to play this game: it doesn&#8217;t help you, and it doesn&#8217;t hurt you.</p>
<p>But in reality, different people will make different decisions.  I polled the students, using our electronic clicker system, and 46% said they wanted to play this game.  54% said they did not.</p>
<p>Then I changed the game.  I said that I would roll a fair 6-sided die.  If a 6 came up, I would multiply their quiz score by 6.  Otherwise I would set their quiz score to zero.</p>
<p>If your quiz score is <img src='https://s0.wp.com/latex.php?latex=Q&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='Q' title='Q' class='latex' />, your payoff if you win will be <img src='https://s0.wp.com/latex.php?latex=5+Q&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='5 Q' title='5 Q' class='latex' />, since I&#8217;m multiplying your score by 6.  If you lose, your payoff will be <img src='https://s0.wp.com/latex.php?latex=-Q.&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='-Q.' title='-Q.' class='latex' />  So, the expected value of your payoff is still zero:</p>
<div align="center">
<img src='https://s0.wp.com/latex.php?latex=%5Cdisplaystyle%7B+%5Cfrac%7B1%7D%7B6%7D+%5Ctimes+5Q+-+%5Cfrac%7B5%7D%7B6%7D+%5Ctimes+Q+%3D+0+%7D&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='&#92;displaystyle{ &#92;frac{1}{6} &#92;times 5Q - &#92;frac{5}{6} &#92;times Q = 0 }' title='&#92;displaystyle{ &#92;frac{1}{6} &#92;times 5Q - &#92;frac{5}{6} &#92;times Q = 0 }' class='latex' />
</div>
<p>But now the stakes are higher, in a certain sense.  You can win more, but it&#8217;s less likely. </p>
<p>Only 30% of students wanted to play this new game, while 70% said they would not.</p>
<p>I got the students who wanted to play to hand in slips of paper with their names on them.  I put them in a hat and had a student randomly choose one.  The winner got to play this game.  He rolled a 1.  So, his quiz score for the day went to zero.</p>
<p>Ouch!</p>
<p>Here is a famous beggar in San Francisco:</p>
<div align="center">
<img width="450" src="https://i0.wp.com/math.ucr.edu/home/baez/cultural/san_francisco_panhandler.jpg" /></div>
]]></html><thumbnail_url><![CDATA[https://i0.wp.com/math.ucr.edu/home/baez/cultural/san_francisco_panhandler.jpg?fit=440%2C330]]></thumbnail_url><thumbnail_height><![CDATA[330]]></thumbnail_height><thumbnail_width><![CDATA[393]]></thumbnail_width></oembed>