Problem: Is it better to choose your own lucky numbers or buy a quick pick ticket? Does it matter? (Thank you to Wayne L. for this question)
Solution: The first and obvious answer is that it doesn't matter! Assuming that the drawing is fair (and it's always good to list assumptions) - then pick whatever numbers you want
This seems like a reasonable answer. But, now let's challenge the assumptions and see exactly what we're optimizing for before declaring victory.
Ok, so first, we assume that the lottery is fair. That is to say that a truly random set of numbers is drawn. We assume that some numbers are not more common than others due to the weighting of the paint on a ping pong ball, or simply a not entirely accurate random number generator, whatever process happens to be used.
Let's say that this is true, that we are not going after the random number generator. So, this assumption seems to hold.
Are there any other assumptions?
Well, let's try a simple example. Assume that we have a simple lottery of the numbers 1-10. What would you choose?
7?
Well, what would most people choose?
You're probably aware that humans are very bad at picking random numbers. When asked to pick random numbers between 1-10, there is not an even distribution, but many people choose 2 and 7.
So, let's say you chose 7, is this good or bad?
Now, two things can happen. One, you can lose, in which case it didn't really matter. Or, you can win -- which seems good.
But, as 7 is very common, someone else, or many people likely chose 7. So, you'll end up splitting the winning with them.
Here's seems to another optimization, that you want to choose a number that no one else does, so if you win, your expected winnings are higher.
And, this assumption, strongly gives an answer to the original question. Since humans are bad at choosing random strings, you're more likely to have others choosing the same set of numbers if you choose, than if you get a quick pick. And, since the likelihood of winning doesn't change, but the expected amount does, quickpicks are the way to go if you're optimizing for expected value!
/* Please let me know if you find bugs or alternative solutions. Thx, Noah */
Code WorkOut of the Day -- Daily exercises for programmers looking for jobs, or just to keep sharp with skills and have fun. I give talks, like this: https://youtu.be/NpvTE7GlXSM for people looking for jobs, or groups of programmers preparing for M&A tech HR due diligence. Follow us on twitter: @codewod
How to
When solving these problems, learning by doing is much better than learning by reading. I encourage to you read only as far in the solution as you need, then trying to solve the problem. If you get stuck, try reading a little further. And of course, let me know if you find a better solution!
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment