Tuesday, January 12, 2016

Calculate the odd of winning Powerball in R

This Wednesday’s Powerball grand prize already climbed up to $1.5 BILLION. If you choose to cash out, it would be $930 million. And it keeps increasing…
So, what’s the odd of winning the jackpot prize?
Here is the game rule according to Powerball.com:

…we draw five white balls out of a drum with 69 balls and one red ball
out of a drum with 26 red balls.

We can calculate the total number of different combinations in R:

> choose(69,5)*26
[1] 292201338

If we are super super lucky to win the Jackpot of $930 million cash value, given that we have to pay 39.6% as federal tax, how much we expect to return for a $2 investment? (Of course, everyone expect to win the $1.5 billion jackpot)

> 930e6*(1-0.396)/(choose(69,5)*26)
[1] 1.92

Actually it’s not a good investment. (Thanks for the comment below. I made a mistake; 930million should be 930e6, not 930e9).
If we want to be 100% guaranteed, we have to buy all 292 million combinations. In that case, can we earn?
enter image description here

# this is what we pay
> choose(69,5)*26*2
[1] 584,402,676

# this is what we earn in total, before tax
> 930000000 + 1000000*choose(25,1) + 50000*choose(5,4)*choose(69-5,1) + 100*choose(5,4)*choose(69-5,1)*choose(25,1) + 100*choose(5,3)*choose(69-5,2) + 7*choose(5,3)*choose(69-5,2)*choose(25,1) + 7*choose(5,2)*choose(69-5,3) + 4*choose(5,1)*choose(69-5,4) + 4*choose(69-5,5)
[1] 1,023,466,048

# Nearly $5 billion!!! Then we need to pay 40% of tax. Maybe not for the minor prize, let's simplify it for all.
> 1023466048 * (1-0.396)
[1] 618,173,493

That’s still more than what we paid. Why don’t we do that?
Remember, people share the prize if multiple persons got the same winning number, which we don’t know. :D

Just some fun! :)

1. Fascinating Math Behind Why You Won’t Win Powerball
2. Tax for lottery (http://classroom.synonym.com/much-federal-taxes-held-lottery-winnings-20644.html)


  1. Thanks! Jackpot payoff is off by a few digits though. I think you want 9.3e8 instead of 930e9. The expected value of the jackpot payoff is 1.92x the price of the ticket assuming only one winner.

    1. Thanks. I don;t get the part "jackpot payoff is 1.92x the price of the ticket". Could you please describe with more details?

  2. 930e9 should be 930e6.

    It would be clearer if you outlined the math behind the total winnings combinations;

    totwin <- 930e6*1 +
    1e6*choose(5,5)*choose(25,1) + ## match 5 out of 5 white, don't match powerball
    5e4*choose(5,4)*choose(69-5,1)*choose(1,1) + ## match 4 out of 5 white, match powerball
    1e2*choose(5,4)*choose(69-5,1)*choose(25,1) + ## match 4 out of 5 white, don't match powerball
    1e2*choose(5,3)*choose(69-5,2)*choose(1,1) + ## match 3 out of 5 white, match powerball
    7*choose(5,3)*choose(69-5,2)*choose(25,1) + ## match 3 out of 5 white, don't match powerball
    7*choose(5,2)*choose(69-5,3)*choose(1,1) + ## match 2 out of 5 white, match powerball
    4*choose(5,1)*choose(69-5,4)*choose(1,1) + ## match 1 out of 5 white, match powerball
    4*choose(5,0)*choose(69-5,5)*choose(1,1) ## match 0 out of 5 white, match powerball
    prettyNum(totwin, big.mark=",")
    [1] "1,023,466,048"

    You've also missed a couple of combination factors, probably because you've dropped terms.

    1. Thanks. This looks much better. If you don't mind, I take it for the update :)

    2. Fine by me. I've just done a similar write-up myself. Mind giving a shout-out?


    3. Of course not. Actually it's fun to read your website. Nice to know you.

  3. This was fun! Is it possible to deduct the gambling losses on the losing tickets on your tax return, thus lowering the final tax bill?

    1. I guess you can if you loss a lot and keep the evidence. But don't take my words as I'm not an expert on tax. Better ask someone knowing tax things better.

    2. That's a really interesting point! I would say that buying 292 million tickets (of which only a few win) would definitely incur a lot of expense (i.e. loss) in my book.
      I wonder if there's a hedge fund buying all the numbers right now. I hope they sent the intern to wait in line.... which makes me think that perhaps your analysis doesn't account for the acquisition cost of each ticket.

    3. you are right. It's not practical at all, as this following article states: http://www.businessinsider.com/buying-every-powerball-ticket-2016-1 "According to Statista, JPMorgan Chase Bank has about 189,000 employees. That means that there are about 1,546 possible Powerball tickets for each employee. If each employee spent 10 hours a day buying and filling out Powerball tickets for three days, this would mean each employee would need to fill out about 50 tickets per hour."

  4. Very comprehensible analyses, an eye-opener for many I would say. Thanks for the tip it was rather timely. People should understand what they are getting into be it Powerball or other lottery.

  5. Buying more ticket will be a practical decision only in case of the lotteries with the capped jackpot which is broken down in the lower categories if there is no winners after a number of roll-overs like Massachusetts Lottery (the story of MIT syndicate) still it won't work for Powerball and other huge games at WinTrillions review for instance.

  6. Anyway, your post and the lively discussion in the comments gave my mind much to chew over. I hope you haven't abandoned your posting here; your thoughts on fantasy are illuminating.
    thank you so much for your working hard.


  7. Dr Aziba. has make me believe that voodoo is real and it works. I seek a lottery spell (voodoo) from him and he gave me the right numbers to hit the lottery, It was easy, fast, and i was doubting every bit of it that i might not win the lottery because i have already spend a lot on the online tips and software which turns out to be a waste .but Dr Aziba.proved me wrong and delivered to me the numbers to win the lottery after casting the spell and i won $11.000.000 I settled my debt immediately and i must tell you this is the secret behind winning the lottery. contact Dr Aziba via Email: Priestazibasolutioncenter@gmail.com or call/WhatsApp him on: +2348100368288

  8. Powerball is HUGE this week, you MUST see this

    This week the Powerball jackpot is HUGE..

    To have more chances of winning then any player combined you need to check this video presentation by 7 time lottery winner Richard Lustig

    >>> He reveals a lot of tips and secrets on how to win the Powerball in this video <<<

    The jackpots for Powerball are getting higher and higher each month and it's because more people are playing the lotto and are just playing quick picks with no method.

    Richard was able to win the lotto 7 different times.. and I can tell you.. his method works awesome for Powerball.

    >>> Check out his brand new free video presentation <<>> Check Out His Free Video Presentation on How to Win the Powerball Here <<<

    If you don’t want it then let me know and I can give it to someone else.

    All the best, Ana

  9. Anonymous4:57 PM

    I came across many testimonies on net testifying of Dr Duck a voodoo spell caster that will help you cast a LOTTERY spell and give you the rightful numbers to win the lottery, i didn’t believe it, at first but as life got harder i decided to take a try, now my try has made me a millionaire, i have been playing all types of lottery since 7 years now but i have not win up to $1000,after contacting him he cast the spell and give me the hot figures behold i won( FIFTY MILLIONS DOLLARS) now i am a living testimony of the good works of Dr Duck A gifted man with a great powers, it is my secret but i decided to make the world known too. It might be a help to any one who is interested, this happens last week ago you are free to contact him or email him greatoracletemplesolution@live.com
    website https://greatoracletemplesolution.wordpress.com