one name it's not on my slides and I'm like suddenly okay I know but just like suddenly God the reception field okay so maybe we'll start hello hi everybody I would like to welcome you all to this evening's lecture my name is Elaine E&L and I am the chair of the math department here at Stanford this lecture is one in a series of public lectures that it was organized by the Stanford mathematics department and is sponsored by the Stanford mathematics Research Center and the friends of Stanford mathematics and if you would like to be notified of events like this and you are not on a waiting list on our mailing list please send me an email at chair at math dot stanford.edu this evening were very fortunate to have as our speaker professor Jordan Alan Berg before we begin I would like to tell you a couple of things about our speaker this evening Professor Alan Berg grew up in Potomac Maryland a son of two statisticians he got interested in mathematics at a young age he went on to Harvard for college where he got a degree in mathematics in 1993 then he got a master's in fiction writing from John Hopkins well it is and then he returned to Harvard to get a PhD in mathematics in 1998 under the guidance of Professor Barry Mazur after spending a few years at Princeton as a postdoc he joined the faculty of University of wisconsin-madison in 2004 where he is now the John T MacArthur professor of mathematics professor elenberg won several awards and honors let me just mention a few here in 2001 he won the Young Investigator award from NSA in 2005 he got the Sloan fellowship and also the Career Award from the National Science Foundation in 2012 he was part of the inaugural class of the fellows of the American Mathematical Society and just recently in 2015 he became a Guggenheim Fellow professors elenberg research is centered around numbers theory in arithmetic algebraic geometry and more broadly across several other areas of mathematics on the more algebraic side it also includes work on a variety of counting problems in number theory using symmetries and ideas from topology and also part of a long-term collaboration with two other colleagues here at Stanford in Stanford math departments professor Akshay batten cottage and Tom Church just earlier this year professor Allen bird made a breakthrough in community oryx with his solution to a pattern matching question called the capsid problem which was featured in May issues of quanta magazine in addition to his research professor Alan Berg has been writing numerous expository articles on mathematical topics for a variety of publications including the New York Times Slate The Wall Street Journal Wired in The Washington Post he is also the author of two books the first one are novel the grasshopper King was published in 2003 and more recently the book how not to be wrong the power of mathematical thinking that was published in 2014 which was on the New York Times and The Sunday Times bestseller and a winner of the 2016 or allure book prize the world so we are really delighted to have Jordan tonight speak about how to use math to get rich in the lottery I should say there is a catch that most likely this will not help you get rich in the lottery but instead Jordan will use this topic as an excuse to take us on a tour some interesting mathematics so please join me in welcoming professor Alan Berg tonight well thank you guys so much I'm just checking everyone's still here after I only revealed that I'm not gonna tell you how to get rich okay it's always a great pleasure to be here and that amidst the incredible mathematical atmosphere of Stanford I should say I have been doing math of these people non-stop since like nine o'clock this morning so but I think I still have like this much energy left I tell you all this story because you know telling stories about math is like really what I do in this book and like what I do when I'm writing articles in the newspaper on mathematical topics so let me tell you a story about lottery so what you're looking at here it's a drawing for the Massachusetts state lottery a game called cash windfall actually for reasons I don't fully understand you can go to youtube and see a record of every single drawing that was ever held in this game what you are looking at although to be honest it looks like all the others is a picture of the last ever drawing of cash windfall and the point of this story is to explain why it was the last ever drawing of cash windfall so in order to explain that I've got to start by telling you a little bit about how lotteries work which maybe some of you know but maybe it will be a review so first of all you know in math if this thing it's kind of complicated like a lottery we like to make it simpler to explain it so let's here discuss a version of the lottery where well if so I was thinking realistic tickets cost two dollars which is about how much a real lottery ticket usually costs but here let's not have this kind of complicated structure let's just say there's one big prize the jackpot which is three hundred dollars and one in every two hundred tickets is gonna win so when we think about playing the lottery we usually think about it sort of in the long term we say what happens if you play the lottery a lot and people who play the lottery by the way do play the lottery a lot so this is not an unrealistic assumption we say what if you play this claw turi a thousand times well if you win one if one out of every 200 tickets is a winner you'll probably win about five times and so at all you're gonna come away with $1,500 or a dollar fifty per ticket which sounds I mean that sounds pretty good like fifteen hundred dollars is not a trivial amount of money until you remember that you actually spent two thousand dollars in order to get those 1000 tickets to win that $1,500 in some sense now you already understand what lotteries are about um let me let me just sort of start by telling you about the piece of mathematical terminology we use to describe this I'm gonna introduce it only in order to criticize it so usually what we would say is that the expected value of the ticket is a dollar and fifty cents and you remember that was like that was like how much per ticket you were likely gonna win and this is one of those mathematical terms that you know everybody kind of wishes we could go back in history and take it back and change it and call it something else because after all this expected value one thing it is definitely not is the value you expect the ticket to have it's exactly the opposite it's like literally a value that the ticket cannot possibly have the ticket is either worth nothing or it's worth $200 it's definitely not worth a buck 50 and yeah we call it dollar fifty the expected value so maybe a better name if we could go back in time and change it it would be something more like the average value because that's really what it represents and that's somehow the first step in our analysis the lottery is to compute expected values or average values and say if we play this game a long time how much per ticket are we likely to win or lose and on average in this game i just showed you this sort of toy version of the lottery you would expect to lose about 50 cents per play so i said this was sort of not a very realistic lottery and actually one respect in which it was it's not realistic is that it's actually incredibly generous to the player compared to a real lottery so what you're looking at here is the payoffs from an actual Massachusetts lottery game from around 2005 I don't know the exact date here's how this looks I'm sure you remember I'm sure you counted how many balls there were in the cage and the very first slide but in case you didn't there was 48 balls when the cage spins you pull out six of them and of course you at home pick your six numbers and try to match as many as you can of the ones the come out of the cage so if you match all six that's great you win the jackpot and that's some incredibly large number all the money goes in the jackpot pool but the chance of that happening is very low about one in nine point three million so but of course that very rarely happens and you want people to want to play you want people to feel that they have a chance to win something and so a real jackpot has all these lower tier prizes right if you match five out of six that's still a very handsome prize of $4,000 if you match four out of six now that's starting to be not so unlikely right one in eight hundred times if you buy ten tickets a day you're probably gonna see that happen from time to time and you add 150 bucks that sort of feels pretty good actually one clever thing about this game I like is that if you match two out of the six they don't give you two dollars they just give you another ticket so you can keep playing that's very clever um anyway when you add all this up you can figure out that for example the one let's say the black pot is 1 million dollars the 1 million you're gonna win only about one every ten million times so probably people really don't play that long but if you did it could mean in math you like to sort of like extrapolate things out to infinity if you played 10 million times you would win 1 million dollars on average which is about 10 cents of play not very much and if you actually add up the values of all these prizes you get a truly measly number just under 80 cents of expected value for your $2 ticket so that's much worse than the baby game I showed you and most state lotteries look something like this so here's the thing in the time period I'm showing you Massachusetts had a problem with its lottery and the problem was that people were not playing it and it's probably not because people like made a complicated table like this it's more psychological than that running a state lottery is in some sense an exercise in a both applied math and applied psychology what happened was that nobody won the jackpot for a long time and you know the jackpot pool just kind of piled up and up more and more money in it and on one sense that makes the lottery more enticing when the jackpot is very large but people started to get a little dispirited and people start to feel like they're not gonna win and people stop playing and when people when fewer people are playing it's even less likely that somebody will hit the jackpot and you can see that there's sort of like a downward death spiral of this of this lottery so the people at the Massachusetts lottery had an idea they they borrowed an idea from from a game in Michigan which is also called windfall a recently discontinued game called the roll down this is how the roll down worked they said well if nobody wins the jackpot we don't want it to just keep on getting bigger and bigger and bigger and nobody wins it let's say if it goes over a certain threshold it was 2 million that they picked if it goes over 2 million if that week nobody wins the jackpot we're not just gonna let the money pile into the pot we're gonna roll that money down we're gonna take that money and put it into all the lower prizes and make them work and make them worth more so we're not gonna have this thing where nobody where nobody wins that money is gonna get paid out so their goal was to have a lottery system that was more enticing that seemed to the players like a better deal and they did a good job and they did get a lot more people to play in fact um they sort of did too good of a job it's always the great accomplishment of my life if I can get a laugh with the table that's awesome edition that's what you really want so what you're looking at here is the payoffs for cash windfall in February 7th 2005 which was the first roll down drawing on the new game so if you compare this I mean it's quite startling right this hitting four out of six which before was worth four hundred dollars on this day because nobody would won the jackpot was worth almost $2,400 hitting three out of six I forgot how much I was worth before which is a mere $5.00 prize before was now a six dollar prize that's something that is $60 prize you know paying attention that's good and this isn't it is really not at all unlikely so in this case the expected value of a $2.00 ticket even though you're not going to win the jackpot it's actually five dollars and 53 cents so that is a pretty good deal by the way you might ask why do I happen to know the exact payoffs for February 7th 2005 of all days well the reason I know it is because I read it in this document you're not really supposed to be able to read this from where you're sitting but what you are looking at is a letter from the Inspector General of the Commonwealth of Massachusetts to the state treasurer of Massachusetts this is the first page of a 25 page PDF document we just tried to explain what had happened to the Massachusetts State Lottery and it's a very interesting story i well I in fact I would venture to say that this is the only municipal fiscal oversight document you will ever read that makes you wonder if somebody has the movie rights to it so the reason I know that February is the exact payoffs on February 7th 25 20 2005 the first day of the the first roll down of the new game was that on that day the state lottery got a call a cashier in a star market in Cambridge Massachusetts sort of saying like so some college kids just came in and bought $5,000 of lottery tickets is that strange like should we allow that cashiers are supposed to call in if there's sort of an unexpectedly large lottery purchase so what had happened let me back up a little bit so as it happened in January of 2005 which is sort of the inter semester period at MIT they have um a tradition of having sort of short-term three-week independent studies in between the semester and a student named Brian Harvey he was a senior at MIT at the time he had what in retrospect is now seen to be the incredible good luck of doing an independent study about the expected value of state lotteries so we can presume that he made a table pretty much like the one I just showed you and as you can imagine the next thing he did was sort of like go around to everybody in his dorm and say like if it's okay you should really give me like all the money you have right now so I can go to the star market and buy lottery tickets and that is exactly what you did and this group of people did indeed about triple their money on that first drawing make they call themselves random strategies that was the name of their that was the name of their group actually interestingly nothing you may say this is something how very not random what they chose to do but um but random was the name of their dorm MIT being MIT they all lived in a place called a random hall actually and by the way let me just tell a little more of the story that was not the only high volume purchase of lottery tickets on that day so there was also a huge purchase in a drugstore in Quincy Massachusetts on the Southshore which turned out to be from a large group of biomedical scientists at North who were known as the who were known as the dr. John lottery Club I feel like that's the best name that anyone had and there was also a big purchase in Williamsburg Massachusetts and that purchase was made by jerry selbee who was a retired engineer from michigan and now for listening comprehension who remembers why else I have mentioned Michigan in this tie exactly so Jerry Selby was a guy who for many years had been making a lot of money playing Michigan windfall until Michigan closed down that game and he absolutely could not believe his eyes when he saw that a year later Massachusetts opened the same game so if you look on your map you will see that Williamsburg which is in the northwest corner of the state is in fact the geographically closest point in Massachusetts to the state of Michigan so he immediately drove there to lists of until he crossed the border and got to the first convenience store he could find and he started buying tickets so the whole story it's like many amazing twists and turns and let's just say I mean because this kept on happening in the lottery kept on rolling down and this group of people kept on buying tickets with the money they made they sort of you know you roll your investments back into your plan and you buy more tickets until it came to the point where on a given roll down day approximately 80% of all tickets sold to anyone in the state of Massachusetts in this game were being sold to either random strategies the dr. Jahn lottery club or jerry selbee so this is it so this is what happened and how does the story end it's like a bit anticlimactic but here what you're seeing is the front page story of the Boston Globe from July 31st 2011 and this is when the globe ran the story of like that something had gone awry with Massachusetts cash windfall that this game was essentially being used as a piggy bank by a very large by several groups of high-volume betters and at this point the game is up once this story comes out because you as I said lotteries are about math but they're also about psychology so when people felt that the game was rigged then people stopped playing and then the money dries up right then it doesn't work anymore so in some sense I've told you the whole story but if you look at the story from a mathematical lens I mean when you read a story like this you start to sort of have some puzzles and it's really those puzzles that I want to talk about tonight there's two one easy one hard let's start with the easy one the first puzzle is how could you actually get away with this I mean may I remind you that the state knows who wins the lottery because I have to give you the money right it's not a secret so the state certainly knew that the winning tickets were being sold in the measure of 80% to the same three convenience stores so you have to wonder like how could no one catch on to what was happening and and and this this one is easy the answer is that the state totally figured it out and totally knew what was going on in fact now I'll sort of pull aside the criminal but I told you that the first thing that Brian Harvey did when he realized the structure of cash windfall and this loophole that allowed it to be used as a piggy bank I told you that the first thing he did was go and round up all of his friends take all their money and go buy a lottery tickets but that was actually the second thing he did um the first thing he did being the kind of like good honest young man who goes to MIT was he took the tea out to Braintree Massachusetts where the state lottery headquarters was and if it sort of like went in um and he showed them his table like something like this and he said like I'm planning to buy as many lottery tickets think I can afford this week and make a lot of money is that legal and the inspector general's report does not record what he was told but it must have been something like sure go knock yourself out because because we know what happened we know that he bought tickets and kept on buying tickets and by the way I didn't emphasize this but if you looked at the date of that news story that was 2011 okay so six years okay so that's in some sense the answer to the puzzle but it instantly spawns a sub puzzle which is why did the state not care that this was happening okay I shall explain so here's how here's my this is now you're seeing the limit of my powerpoint skills so here's a diagram of what happens in this lottery game in a lottery the state is gonna take two dollars from every ticket okay and when it takes that two dollars a dollar and 20 cents goes back into the prize pool and 80 per day 2 cents has taken his revenue right to like build roads and pay schoolteachers and put up streetlights and all the things that state revenue does so for the sort of the value proposition for the state is actually incredibly simple 80 cents of revenue per ticket that's it no more computation needs to be done what that means is that the state doesn't care who wins that is absolutely irrelevant the state cares about one thing and one thing only and that is how many tickets are sold and these guys were buying a lot of tickets so I think this is something that when the story was initially reported it was being reported as that these guys had somehow were stealing money or maybe not quite stealing but sort of somehow funneling money from the state but the inspector general reports that actually over the life of this scheme the state actually came out almost ten million dollars ahead of where they would have been without these high volume betters and it ends a state of confusion because it is sort of hard to claim that you got scanned if you made ten million dollars maybe Trump could do it I don't know so I mean this diagram should show you if the money wasn't coming from the state where was it coming from and the answer of course is that it was coming from the other people who were playing the lottery because remember these guys were only playing on the roll down day only when the table looked like the good table I showed you not what they would look like the bad table I showed you but everybody else in Massachusetts was playing every day just like people do when they play the lottery and so the way to think of it is that this was basically a big cash transfer from regular lottery players to random strategies and the other high-volume betters with Massachusetts taking 80 cents each time it went by so for this point of view you can see why Massachusetts does not halt this practice because Massachusetts was making Bank from this practice in fact I think the right way to think of it you know a lot of people may be influenced by this sort of similar story about MIT kids who were like winning a blackjack sort of said these guys figured out a way to beat the house and what I want to say is that that metaphor is completely wrong because what random strategist were doing was they were making a huge number of bets each one of which has positive expected value maybe sometimes they were gonna win sometimes they were gonna lose but because the bests were weighted towards them if they made a lot of bets in the long run they were gonna come out of the house they were gonna come out ahead and if that is your model you are not beating the house you are the house and that I think in the end is the right quantitative way to see what was going on here but random strategies had in some sense created a kind of virtual casino which was them at which the other players would play and what was the state well the state was the state so it sort of looks a lot like this right I mean they are the casino people happily line up to kind of sort of lose money at a fairly steady rate occasionally win but mostly lose and each time that happens Nevada kind of comes in and reaches in at an and takes a little bit of the money oh no what happened I need a tech guy to come save me if I get cancelled like go back to the way it was did that guy leave yeah okay I mean if I had canceled and I couldn't just cancel the entire talk I don't know what was gonna happen okay okay so right so Massachusetts had no more incentive to shut down random strategies but Nevada has to shut down all the casinos in Las Vegas would make no sense for them to do that um so that's one puzzle solved but I want to kind of talk about a slightly deeper one so I've sort of been presenting this story with all three of these groups the same but they were not the same there was one difference the dr. John lottery Club and jerry selbee used what's called the Quick Pick machine do you guys know what the Quick Pick is how many of you got a lot of liars here tonight okay I'm okay the Quick Pick machine is that when you buy a lot of lottery tickets you just have the machine spit out random numbers because you know it doesn't really matter what numbers you have the machine doesn't you know the lot the balls in the case don't actually know like what your birthday is or like what your cat's birthday is or anything like that their numbers are random and so it doesn't really matter what numbers you get so to save time you just have the computer pick numbers for you and if you're buying 200,000 tickets as random strategies were doing at the high point of their scheme it would definitely save you a lot of time to use the quick pick but they did not do this they had their 200,000 tickets that they liked they were filled out by hand and those are the ones that they used this I found extremely puzzling it's mentioned in the expected general's report but they don't sort of comment on how strange it is maybe I'll just take I'm doing well with time so let me just a little excursus this is like for the kids to give good life advice this may sound like awesome like Wow like you can just like play lottery and like make money if you sort of happen to be smart and see a loophole okay so first of all there's a lot of extremely boring work involved if you actually sort of read about what these guys did filling out 200,000 lottery tickets by hand extremely boring even if you even if you don't do that it turns out that if your income for the year is is made of lottery tickets you have to fill out a tax form probably each win and loss to like verify that you uh you know your net income so this is like incredibly time consuming and you have to save them all in case you get audited and if your main source of income is lottery tickets you do get audited so so I so I talked to Jerry Selby who was sort of that I mean he had been doing and remember for like six years in Michigan and then an years in Massachusetts he actually had to build a barn behind his house in order to hold his hundreds of plastic tubs have used losing lottery tickets and altogether these guys in random strategies they made three and a half million dollars which sounds awesome but that took six years and there was ten people now ask yourself if you graduated from MIT and you just like wedding got a job so I'm just saying kids like I don't recommend this as like your life plan I think I mean I think they probably could have made more money and somehow maybe did something more fulfilling but for some people the joy of beating the system is its own reward right so I think that's the way that's the way to say okay that's like I had to top step away from mathematics and give like a life lessons interlude so anyway the question is why would you fill out the tickets by hand so in math again we're trying to understand a problem let's try to make it simpler and hope that we don't and hope that we don't lose the main features of what we're trying to study so what you're looking at here is a game for some reason people often call it the Transylvanian lottery and it's much simpler than the real lottery because instead of 48 numbers there's only seven and the cage instead of giving you six balls with numbers on them it only gives you three and what I like about this is it it's simple enough that I can literally write down all of the possible jackpots on a single slide all the way of choosing three numbers out of seven which for the combinatorics fan is a number called seven choose three which is 35 and and I encourage you to sort of check whether you believe that I've got them all so let's imagine that you are a high-volume better in this game but in this game there's only 35 tickets so it's sort of I mean the high-volume better is maybe not that high let's say for us a high-volume better is somebody you buy seven of these tickets okay that's pretty much that's like one fifth of all possible tickets and the question is how should you do this well first of all I got to tell you what the rules are of this lottery so again let's make this simpler we can't have like is that many tiers of prizes when there's only three numbers I'm just gonna sorry I'm just gonna quickly when we have that little glitch it changed my view and I want to see it sorry let me just bring this back to where you are I like this view better okay so in this lottery there's only three things that can happen if you get the jackpot that's great you win six dollars if you get two out of three so let's it's a if the jot the jackpot was 137 and you have one two seven you get a smaller prize called a deuce you only win two dollars and if you only get one out of the three or zero out of the three you get nothing okay do this sort of mimics the features of a real lottery the more the more numbers you get right the more money the more money you win so what I want to look at is what would happen if you played this game with a quick pick so you're over again you're a big better and you get oh I didn't expect that to happen okay okay so what happens is something like this as you can imagine I mean you might get very lucky and win a lot of money you might win very little money if you're unlucky this kind of a spread a nice sort of smooth curve and you can check that your expected winnings in this game is six dollars on average you're gonna get two point four of these deuces that's four dollars and 80 cents and you're gonna get zero point two jackpots as you could actually check by the way right because you have one fifth of the tickets so the chance that you have the jackpot is one in five so about every time every five times you're going to hit the jackpot so let's do this cuz I think I've got plenty of time we're gonna kind of actually play this game a little bit now if you um sometimes when I have like a smaller room and people are desks we do this as in an interactive way I think we can actually there's so many kids here that I sort of want to do it is that okay okay let's do it it's decide I heard some Rando yeah guy yell yes and I've decided that's my cue okay so what you're gonna do and I'm gonna use this time to try to get my view that I like back by the way um I have picked seven tickets that I like why don't you guys pick seven tickets that you like but before you do I'm gonna tell you the rules of the game this is gonna be an elimination game the rules of the game are though somebody one of you guys whoever feels the most random is gonna pick random numbers for us if if you win six dollars or more you get to stay in and if you in less than six dollars you're out well I asked you Sparrow because we solve it the expected value of this game was six dollars so probably some of you guys are gonna get more some of you guys are gonna get less well play ap rounds let's see who stays in okay so if you are here especially if you're a kid if you maybe if you can memorize seven tickets that's great but maybe if you have like a piece of paper or something - JA something down right down right down seven tickets choose ones that you like and I'll give you guys a minute to pick out ones that you like I mean as a thought by the way while you're doing this you might want to kind of think about a bad strategy would be to pick seven copies of the same ticket you could do that but that would be bad for this game because then it's very feast or famine right you might get seven jackpots but very likely you're gonna get nothing and be out so that's something to think about in terms of okay now while people are finishing up I need somebody who the very important job maybe Brian will do it Brian will you be my ball cage and like sort of randomly yell out numbers do you feel random enough to do it I'm talking to you okay okay so people got there uh yes Robbie that was not the reason okay I have some have several people got their tickets all right let's do it okay Brian Brian is gonna oh and let me emphasize order doesn't count in case it wasn't clear order does not count doesn't matter what order the numbers are in okay so now Brian Conrad director of the American Institute of mathematics I've given him a mathematically menial task to do you're gonna yell out three numbers between one and seven okay three five four otherwise known as three four or five all right let's see how we do now open it so everybody's counting I'll put up mine and we'll see how I did okay so I first of all check if I the jackpot but I don't I don't have three four or five I have one four five so I get two dollars for that right I have um I have three four six and I have and I have three five seven I get two dollars for that so I've got six I'm still alive okay everybody's everybody three four five our people confused what's the question what oh it's so six dollars for a jackpot two dollars have you got two out of three so I add I have three of those juices I have three tickets than one two out of three the one for five the three four six and the three five seven are you guys adding up your winnings who's got a lot anybody get like ten or twelve a lot okay I wanted to who got the most anybody got 14 okay no I don't see any so I got some 12s was that the top score we got twelve okay a small set of people like pretty good but I definitely I'll get them out of tens and twelve whose out who got totally hosed on this one I got less than six okay good number of people on but who's still in okay good let's do it again but remember if you're out you're out okay this is elimination okay Brian if one two five let's look okay I am once again Jack Paulus but but I have one two three that's two when one four five that's so - I have that again that's good let's uh one two five and I have two five six so I'm up to six so I'm in the clear and then and then I'm out so I've got six again okay um who's still in okay that's a theater group but a lot of people still it okay let's do it again Brian two four seven oh I've got jackpot okay so I already see it I've already got six but nonetheless I'm gonna see how much more I want let's see two four seven cube bye and that's it I got nothing else okay now who's still in okay still smoking let's do let's do one more on what do you say what do one more and then I'll be it okay three five six okay I'm jackpot list three five six I have two five six oh look I'm saved at the end because I have two five six three four six I've got two of those and then three five seven so I'm still in okay who else is still in okay all right this is good about Lake looks might even be like 15 people around there okay we could keep doing this but then you wouldn't him okay there's always one guy doesn't want to hear the end of my talk I was like this just got good let's just do this is that okay I think for those who want to keep playing I think I have explained the rules well enough that you can play at home okay so uh what did you just out of curiosity what did you guys notice about my awesome numbers yes I see so it's not that I'm guaranteed a jackpot right cuz las no we didn't get a jackpot but somebody back there said I get $6 each time you might have noticed that I got $6 every time you know one thing about games is usually definitely it's good to decide your strategy first and then set the rules that's a basic principle of game playing and that's exactly what I did so my my set of cards has a very special feature which is that its payoff matrix as many of you observed looks very different from what you get with a quick pick so my set of cards has 2% of tickets as the property but no matter what the jackpot is I will win $6 never more never less so this is that rare case when the expected value is indeed exactly the value that I expect I will always get $6 with my cards every time now you might ask why is this good why would I want to do this besides that I made up this cockamamie rule that was exactly designed to privilege my set of tickets well in life right if you're if you think of yourself as an investor and this game is a kind of investment for the people playing it um usually when you're investing if you can get the same return with less risk you're happy right if you can get the same on average amount of profits but not risk mut losing money um that's very good that's especially true if you're in what's called leverage right if you've borrowed the money that you're playing with so again step with me back to 2005 if you have asked all the kids in your dorm for a lot of money until you have $5,000 and then you buy lottery tickets with it and you lose and then you go back to all your friends and say well according to my calculations in the long run if you keep on giving me more of your money will eventually win even at MIT that is a very tough sell so you do ideally you want to build a strategy what's called in finance a hedge that somehow keeps all your return without having any risk and I think the reason that they were so careful about their tickets was something very much like this so let me say I want to say a little bit about how did I come up with this crazy set of tickets let me draw show you a picture of it this is a diagram of my tickets and well you can sort of see that this diagram has seven lines on it well one of the lines looks like a circle but I'm going to call it a line each of these lines have has three points on it and the three points on the line are my tickets right you see one two three along the bottom one six seven along the side that circle is two five six which is one of my tickets this is a beautiful object of geometry called the Fano plane and the thing I want to say to you tonight about it I mean I think you may have the right to object when I call that circle a line why because the circle is not aligned okay that's pretty solid objection nonetheless I'm going to tell you that it is a line and the reason is that it because in mathematics at least mathematics the way we do it in 2016 and maybe even the way we've did it done it you know since about the late 19th century is that we don't really like to say like what a line is we like to say what is a line defined to be and the way we approach it is we say well a line is the kind of thing that behaves the way a line is supposed to behave and how do we know how lines are supposed to behave well Euclid told us so right we know we took geometry we know the rules for line so let me sort of put a little slogan underneath this picture what's our sort of acid test for whether these are lines well should they they should obey Euclid's axioms then every two lines intersect in a single point and every two points are contained in a single line and it's kind of fun to do this you can sort of look and see if that's true I pick two points like one in five okay there's the line one four five if I pick two points four and six okay there's the line like three four six I've drawn the line through them two and five okay the line between them is the circle and it's sort of fun to like sort of let your eyes roam over this diagram and see that it um then actually Abbes eastward by the way so if there are people in the audience who are actually like taking high school geometry right now or like recently did yes okay so there's something I sort of slightly lied because I said okay the lines and the points behave the way that Euclid told you they're supposed to behave but there's something actually different about this that it's not the same as Euclid's axioms anybody see it okay what ah so that is a mere cosmetic artifact of the fact that I've had to project this onto a two-dimensional screen for you but really the only points in this diagram were where the numbers are so it may look to you like there's an intersecting I get to use my laser okay I'm gonna use it it may look to you like there's an intersection there but that is only an illusion because that's not a point okay so that's a good objection but it's not the objection I have in mind I'm saying that these rules are actually not Euclid's the rules in one minor respect that's my job man so the difference is merely this that and you put in geometry not every two lines intersect in a single point two lines can also be parallel and that I think all right-thinking people see is a defect in Euclidian geometry it's things when rules have exceptions they shouldn't have exceptions this is what's called a projective geometry which is much nicer where it's very simple like any two distinct lines intersect in a single point there's no exception for parallel line so in this kind of geometry no lines are parallel and if we have like another hour together I would tell you a whole beautiful long story about the development to perspective painting in 16th century Italy where they sort of understood that when you look at like a road from like far away like the two edges of the road even though they're parallel in the three-dimensional world like seem to meet at a single point called the vanishing point and it's exactly because they were sort of instinctively learning how to do projective geometry like on a flat canvas another time I'll come back and we'll talk about that the point I want to make is that somehow this abstract discussion we're having about the rules of Euclidean geometry are exactly what make this set of tickets have the property that I wanted to have because if you remember when my my menial slave Brian Conway like yelled out the numbers one to five how did I know I was gonna get exactly six dollar as well because I know there's a line through one and two so I had a ticket that had those two there's my two dollars I know there's a line through two and five so I have a ticket that has two and five and there's two more dollars and there's a line that has one in five and so I have a ticket but as those two dollars of course the other option is that when Brian picks three points that are actually all aligned then I win the jackpot and I win nothing else but either way I went exactly six so it's exactly the sort of geometric feature of of these points that make it have this magical property now we've gotten a bit away from the actual situation of cash windfall so I have to say like once I understood sort of what they were trying to do I became obsessed with trying to figure out what configuration of actual lottery tickets and cash went ball they might have used this is an example of a object in math called a combinatorial design and so I just went hunting through the literature and combinatorial designs and eventually after a lot of work and a lot of digging through references I found the following a paper of rhf Denniston from 1976 which exactly gives you a configuration of about 200,000 tickets which you can't quite guarantee you're gonna win a lot of those very valuable five out of six prizes but you can almost guarantee it you can guarantee that you have like a 98 percent chance of getting at least five of those five out of six prizes if you buy these particular 200,000 tickets and if you bought a random 200,000 tickets you would take a substantially larger risk of losing money and just in to show them how far mathematics can come I have to sort of show you a very interesting comment the denistoun writes his paper just just to show how far the culture of mathematics has come he's clearly quite embarrassed but he used a computer in order to sort of like he sort of season feel like a real mathematician would have worked this all out with a pencil and so he would soon he'll he makes it clear but okay like yes I checked it on a computer but I certainly didn't use the computer to figure it out that was on me we don't really have that attitude anymore I think nowadays in any kind of large-scale operation like this the computer is seen as our partner and there's no shame in the using a computer to help us discover so well okay I've left one question unanswered I have now I've shown you what they could have been doing is that what they actually did I wish I could tell you that I knew I never was really able to get these folks to talk to me directly about what about what they did I think they're happy to have that chapter of their life behind them so I'll just say this I I was able to get them say roughly this sort of some version of this risk minimizing strategy was what they had in mind but I wasn't able to sort of get them to speak up to the actual configuration they use so we'll only say this I don't know if they used this this paper I found but if they didn't I think they should have um so I'll stop there and take questions thank you guys so much [Applause] if you have questions please line up in front of these two microphones there is one on this side and one on the other side so that they can pick up any questions can you walk walk walk to one of the microphones please no I have a quick question which is you know about your thing about that what they actually did I mean do you know the amounts of money they won and how many times and so forth because obviously knowing that they won a relatively even amount of money each time would tell you that maybe they were trying to guarantee that so III know the total amount but I don't know the sort of week by week which is what I would have to know for that and sometimes noted knowing the total amount they won over this over the six years it's kind of like knowing the expected value and it's whether or not they were sort of like winning and losing big week to week my expectation is they were not my expectation was at least the random strategies guy had like heads that risk away but I don't have any direct way of looking at their Ledger's and knowing that here's whatever here I just read and I can't remember where but there are these people around the world that have won the jackpot like three or four times over the course of their did you read that article I don't know if it was in time or I don't know where I read it but it's a group of people and it's five to six of them that have won the big huge lottery jackpots multiple times more than twice any I don't know I mean is that just completely random that these single people have it could be I mean I think what they I think with stuff like this it's always sort of fun to think about let me put it this way if somebody like won Powerball like three times you'd be sure to hear about it right so most people are not going to but you have to ask you out of all the people in the world who play and now in your store you're saying they want lotteries in different places so you sort of have to say out of all the people in the world who play all the lotteries would you expect someone or some two people or some five people to have won multiple times thinking that just the way news spreads news of the unusual spreads more rapidly than news of the usual like you wouldn't divide a story like Time magazine some schmuck lost again like I mean so I mean I think it's really a matter of like the individual case you sort of have to sort of say like how unlikely is that someone somewhere in the world would have this happen to them and then that I would hear about so in some cases you still can be quite amazed and in other cases you realize that it's not so unlikely after all yeah I'm yeah my question is since the the table was published in advance I assume and the three major betters knew what that was going to be one could imagine that if they bet enough did the the state would lose money on that date and then have to recoup it later is that something that happened regularly or do you know no one it can't happen by design because the state is always putting a certain amount of money I mean I mean this the state is just the only amount of money that goes into the prize pool is that so okay so let me explain and you may say like wait if everybody you got those five numbers got $40,000 so that's not the way it works and any lot in any lottery if a bunch of people will hit the same number they have to share the winnings oh I see so what happened is I mean I didn't really go into it in the talk but it was not always tripling your money that was at the very beginning but what happened is the more these guys bet the more ticket splitting there was and the more the profit went down so for most of the time they were doing this their profit was running about fifteen percent so that also explains why were there no more than three groups because they were sort of in an equilibrium worth another big group joining would have meant that everybody would have lost money so they sort of found an equilibrium and sort of stayed there I see so so the the expected you actually was dependent upon how much how many tickets were purchased for the for the players yes yeah okay thank you yeah you kind of just answered my question but I was wondering how did it go on for seven years like it seems like eventually you know the the expected value would be like two dollars and one cent right because more people would keep like did they have some agreement so maintain this 15% premium or like I think this is like sort of the in some sense is like what the basic question of economics if you're like a true believer in classical economics you know you're like oh is that a $20 bill on the ground like no it can't be because someone would have picked it up right right so instead of and so now in theory profits will eventually go to zero because if you can buy more I mean but that's that doesn't happen in real life I don't think it's because there was an explicit agreement but I think somehow that often happens in real markets that I mean like in real markets like companies do make substantial profits even without explicit collusion my sense is you know I don't even have any way to verify with me but Selby told me that the random strategy is people had approached him about sort of maybe taking turns and alternating that he didn't want to do it he felt like I mean with it's very lots of interesting ethical questions on what they were doing so he felt like now that's not fair I don't really I don't really know exactly how the light is draw but that he was clearly like but yes I it's an interesting question I mean about markets like sort of how they arrive at that particularly equilibrium but that was where they sat for awhile so I don't understand why the state of Massachusetts didn't take a further advantage of tickets like why they themselves didn't immediately participate in the lottery or at least raise that raised the raise the ticket price and make a larger revenue because if the winnings were $5 53 cents couldn't they have raised the ticket price to like $4 and still get people to play so that's a great question and again I feel like this whole thing if I were like an economist instead of mathematician this whole thing would be about like the failure of what they teach you in equina want to actually be true so here's what what happened I mean people decide whether to buy things yes in part based on whether they think the value of the thing is worth more than they paid for it as they'll tell you in in classical economics but probably more than that they decide based on whether they think the price is fair so without even being a professional economist I can tell you what would happen if after lottery tickets costing $2 for 20 years the the math the state lottery said okay from now on lottery tickets are $4 people would like burn down the lottery office and and nobody would buy lottery tickets because you look like that's not fair a lottery tickets cost $2 I mean I think I think that's what I think that's actually the answer I think that's what happened that day that in that business that you sort of you can't do sudden price hikes because people will get angry and not if the state of Massachusetts only cared about the amount of tickets it's sold why didn't it do like better scheme than Michigan so that the they get even more than the amount they get like a really really good scheme that would get even more tickets so your question actually speaks to an interesting one was it I don't even really know how much Massachusetts knew about what had happened in Michigan I mean I I have to say this is where you see that I'm a math professor not a real journalist because I I tried to like penetrate the sort of public relations wall of both the Massachusetts Lottery and the Michigan Lottery and I got nowhere so the Michigan lottery would not confirm that they knew that jerry selbee had been making like millions of dollars in their lottery even though obviously they knew but they would not tell me that the Massachusetts lottery would not tell me whether they did this on purpose or not and I and there I actually truly don't know I don't know if they just like read about it and thought it was a cool idea and didn't sort of anticipate what would happen and once it started happening they knew for sure but I'm not sure they planned it and I and I can't figure out how to figure it out if anything if there's any real journalists who know how I should have pursued this in the room please tell me I have to okay the first one how many tickets does a mission Michigan guy really buy in that corner store so I don't know the exact number I think he was comparable to the random strategies guys so I think he maybe he and his he had family members too we're doing like a sort of 200k ticket buy and who actually won that lottery on that day on that particular day I know that the random strategies folks about triple their money I don't because it's not recording the inspector general's report I don't know exactly how much the other groups won I know that the brand strategies guy I think took away about fifteen thousand on there five thousand of bats no kids are always first did Massachusetts change to a different lottery system at the end or yes so they went back to a more traditional lottery and of course what you should do right after you hear this talk is you should like run home and like look up the state lotteries to see if anyone's running this game I do this from time to time I think so that the Michigan thing really got no publicity I mean they shut down their game but as far as I know it was there was never any reporting about jerry selbee in the context of michigan this game I think I'm not saying this was like a huge national story or anything but I think like among people who run state lotteries they probably all read this story so I think it probably got enough publicity that um that nobody is that nobody's doing it right there are other there are other states that roll then run role down games but there there's a they're a much less generous role down you can close my computer at the close my computer you just close it yeah about that hard okay this is what I like to use their computer okay hi so I have a question but first I want to say I read your book while I was hiking mountain Kilimanjaro I actually wrote you an email about that and you you're the guy yeah I'm the guy there's a picture of this guy my Facebook page so highest your book is ever been I think that's graduated but my question is so with fanos plane you that works with seven points mm-hmm can you do a similar trick like if you had more numbers then exist in the Transylvanian lottery can you do that so yes but it's only for very specific numbers that it exists so as I said this is very beautiful theory of like finite projective geometries and combinatorial designs and in some sense this is this is actually a very active research topic where there was a big breakthrough not like maybe like two years ago I don't know when was key Bosch's theory okay there we go so it's showing that in some sense there are designs that have some of these features of every size once the size is big enough and that was quite I mean I think it wasn't surprising it was true but we didn't know it was so close to being proved and I was just so mean it's an active topic people are thinking about even today okay let's take one more question if there is or otherwise let's think Jordan again last question okay last question tonight okay so you're talking about your draw diagram and how it covers everything is there a faster way to do it without drawing things out because when you get into the bigger scale as you'd probably have a lot more lines and it would probably be a lot harder to understand when you look at it yes if you were good at doing like modular arithmetic like addition to multiplication modulo some number do they keep that at the Palo Alto schools I didn't read it so it's sort of nice to do it in the new math back in the old days so yes there are there are sort of like there are ways for instance that I could have taken those seven points and identified when with the seven strings of three bits other than zeroes zero and there would be a sort of a very clear relation telling me like which sets of three I had and you could do a similar thing for for larger configurations and that would be the way in practice if you needed to remember it you could do it without drawing a picture okay so let's think Jordan [Applause]