Gambling for Dummies

March 16, 2010

The short version: Gambling is for dummies.

The long version:

On a trip to Vegas recently while waiting to enjoy a delicious breakfast at Cafe Bellagio (I highly recommend) I read this flier:

For the uninitiated, in this version of Keno you select 20 number (between 1 to 80) with no repeats (can’t select 12 twice for example) and write them down. Then, after you have selected all your numbers, 20 numbers are randomly chosen by the house (again between 1 and 80 no repeats). On a $5 bet the payout is listed above. If 0 of the numbers you selected are the same as the computers you get $500, if 1 is the same $10, 2 are the same $5, and so on. If all 20 numbers you select are the same as the computer you get a jackpot of $250,000.

I wondered what the odds were of winning the jackpot. Every number the computer selects has to be one of your numbers. The first one has a good chance (as you have all 20 numbers still) so it has a 20/80 chance of selecting a number you have selected. In the next selection it is a little harder, 1 number is already matched so you only have 19 numbers left, and the house only has 79 left to choose from so the chance is 19/79. Next time it is 18/78 and so on. If you write this down the formula, the total chance for getting all 20 is:

You can write this as

where k=20 and n=80 in our case. Some quick work on the calculator tells you the odds are

This is a staggeringly small number. To put this is perspective the age of the known universe is only 4.3*1017 seconds! In other words you would have had to play Keno 10 times a second for the entire life of the universe up until now to have a decent chance of winning. Needless to say the measly $250,000 you win won’t exactly be profitable.

While I suppose it shouldn’t come as news that you won’t make money gambling in Vegas, I was a bit taken back by how bad the odds were. In fact the most confusing thing about this is why the jackpot isn’t bigger, much much bigger. It is effectively impossible to win, so why not go all out: $10 million, $100 Million, $1 Billion! Think of the headlines that would make. More realistically why not at least $1 million, is has a nice ring to it, everyone wants to win $1 million, what do they have to lose? The only thing I can conclude is the people in charge don’t trust their statisticians.

The astute student of combinatorics (combinatorian?) will have recognized the above formula, it is simply the inverse of the “choose function”.

It describes how many ways you can choose n numbers out of k, or “n choose k” (80 choose 20).

It is also interesting to note that when calculating this, the scientific calculator on the iPhone will frequently overflow and give an error message, round off your number half way though, or even flat out give you the wrong result. If you calculate 80! then divided by 60! it gives 8.946*1036. This is already incorrect, the correct answer is 8.601*1036. If you then hit the “1/x” button to invert it, it gives 1.1*10-37. This is actually correct (not overall but for the 8.946*1036 that we started with) even if it is rounded off dramatically. I realize that these are very large numbers and that they won’t fit into a float type (not sure why they didn’t use double, it is a scientific calculator after all) but it is a little disingenuous to report 13 significant digits on the first calculation (80!/60!) when there is really only 1 significant digit. The invert function is at least mostly honest with how (in)accurate it is (technically there should be some warning that your answer is rounded off).

So don’t play Keno, and don’t use your iPhone for rocket science.

The Stars Like Dust

September 18, 2009

In case anyone lives in a cave and mine is the only website you can somehow visit you should know the Hubble telescope is back online after its latest repair by NASA. As usual it is providing some truly amazing images.

Hubble Stephan's QuintetIn case you didn’t catch it the title is a reference to an Asimov book, a great read if you have the time.


July 31, 2009

With a tip of my hat to indexed I bring you a graph of my own

indexedI should probably also make one with days spent in Detroit and number of blog posts.  I’m on my way home though so maybe next time I’m in Detroit.

Particles Called Protons

September 10, 2008

The Large Hadron Collider (LHC) started up today and it was a success.  I saw the the story come up this morning and headed over to the BBC to read what was going on.  The article greeted me with this great sentence “They have now fired two beams of particles called protons around the 27km-long tunnel” (emphasis added).  Really?  Who doesn’t know a proton is some sort of particle?  Did they think someone would think, “protons, those are beach balls right?”

If you haven’t read about it, it is a really amazing project.  While the physicist in me thinks this is spectacular I can’t help wondering, how did they get someone to pay for this?  It cost £4.5bn, that is $8.9 billion with a B, US dollars.  Not exactly pocket change.

They still haven’t collided any particles called protons yet, so the predictions of creating a massive black hole that eats the earth still might come true.  I’m not to worried, mostly because I don’t think it would be that easy to destroy a planet.  Everyone knows that you need a moon sized machine to destroy a planet, not a measly 27km ring.

Victory for Zim!

July 14, 2008

The PhD qualifying exam for biomedical engineering at Wayne State is a five week long crucible of pain.  You are asked to write a grant proposal on a topic you are not familiar in four weeks without getting feedback from your peers or faculty, you are however allowed to interview experts in the field.  In short they are asking for the impossible: it is nearly impossible to write a grant in four weeks, practically impossible to write a grant on a topic you aren’t intimately familiar with, and completely impossible to write a good grant without having it reviewed by colleagues.  Putting all three together is a recipe for mediocrity.  It is extremely frustrating to know that something isn’t right but not having the time or expertise to do it right.  It is by far the hardest thing I have had to do so far and I would rather write another Master’s thesis than have to retake the qualifier.

Because of this it was with great relief that I recently found out I passed the qualifier.  I didn’t pass initially, I was asked to do a 10 page follow up report which took another week extending my time invested in this monster to six weeks.  This was followed by three weeks of nervous waiting as the slowest grading process in the history of the world took place.  The good news finally came through late Thursday night.

My emotions have run the gamut during this, from disappointment and anger when I found out I didn’t pass initially to elation on Thursday night.  Most of my friends have had to listen patiently on the phone while I railed about how the test was written, designed, and graded.  The reason I didn’t pass initially was simply that I thought I had clearly stated an idea in the proposal that was actually entirely absent.  Unfortunately the solution to this type of problem is to have colleagues read and comment on your grants which I was not allowed to do.

Most of what I have said over the last few weeks about the exam has been venting over my frustration and anger due to my inflated sense of entitlement and the possible wasted effort.  Now that I have calmed down my largest criticism of the test this year is also what I thought was good about it, the question was open ended.  This was great as it allowed us to choose a topic that is in our field of interest so the 200+ hours we spent on the exam won’t be completely wasted.  This was also terrible for two reasons, it allowed some of us to misinterpret the question (causing myself and others to almost or actually fail) and it setup a situation where members of the committee didn’t know much about a student’s chosen topic.  If the student misses a key technical concept in a paper they are relying on no one will catch it as they are not experts in that field.

It is over and I passed, what a relief.

Intelligent Design

April 22, 2008

The latest Russian Soyuz spacecraft just returned from the international space station, arriving via an emergency “ballistic descent”. No one knew where they were for a half hour, during which they were lying in a burning field where car loads of locals showing up to help them out of their craft; not exactly the homecoming most of them envisioned I’m sure. MSNBC has an article detailing the multiple system failures that must have occurred for the emergency descent (autopilot), losing them (ground based radar), and not being able to talk to them (radio beacons on Soyuz) until one of the Cosmonauts stumbled out and phoned home on a satellite phone. While these are all valid concerns to have if you are planning on riding in one of these things, it is hard to criticize a program for a few non-fatal glitches when your country is operating the most dangerous space craft to ever fly. It shows the robustness of the initial design that it can suffer all these problems and still have a perfectly safe landing.

When approaching a difficult problem sound design choices are paramount. Intelligent initial design choices will save untold work and problems later on, brute force solutions are almost never desirable. While many of the ideas for the space shuttle were innovative and good, they were apparently to ambitious and didn’t mesh with reality.

This is just as true for smaller projects, people waste a lot of time trying to following initial faulty decisions instead of figuring out a more intelligent approach that would dramatically improve reliability, functionality, amount of time to develop, or all three. Work smart not hard.

It’s easy being green

April 7, 2008

I just found out about a great program here in Detroit called green currents. Detroit Edison (DTE) has negotiated contracts with existing renewable energy producers, they buy green energy credits and then pass them on to customers who sign up for the program. The electricity provided to the customer is then effectively provided by the renewable power plant (wind, solar, hydro, biomass, geothermal). Better yet is that DTE has been able to sign contracts with new renewable projects enabling them to be built. This has allowed the construction of a large new wind farm in Michigan, a farm biomass digester, and a landfill generating station. The best part is this will only increase my power bill by about $2 a month, or roughly 10%. To my knowledge Michigan isn’t exactly a wellspring of renewable power, it doesn’t have tons of hydro or wind (yet), so if they can provide customers with renewable options for only 10% more what is the big hold up in other places.

I don’t understand the reluctance to sign Kyoto or some similar agreement. A 10% price bump (and it would almost definitely be less) isn’t going to grind the economy to a halt, and the extra money that is spent will just be reinvested in the country (infrastructures, jobs, etc). It seems to me a better economic stimulus would be to take whatever amount of tax money they are giving back to people and invest it in research and/or building of either renewable power (wind, solar, etc) or renewable transportation. I think a few billion would go a long way in making some progress there.