TX Lottery

Problem:

Before a single Texas Lottery Scratch-off ticket is sold, the probability of a winning ticket is known.  Unfortunately, as the game progresses and tickets are purchased (winning and losing), the probability of a customer purchasing a winning ticket changes.  Using openly published information from the TX lottery commission, we are possibly able to gain a better idea of the current probability of a winning ticket for all Texas lottery scratch off games.

Background:

For this analysis we will be using some basic probability properties.  In general, the number of  winning tickets, divided by the total number of available tickets, is the probability of a ticket being a winner.  But, unless we are the first person to buy a scratch-off, we don't want to know the overall probability at the start of the game.  For the vast majority of players, they want/need/should know the probability of the ticket they are about to purchase.  We will  denote this as P(T), where T is the ticket number they are purchasing.  So, if we have N tickets at the start of the game, and W winning tickets, the probability of the first customer who purchases 1 ticket, winning is:

When T=1, P(1) = W / N

Now we have N-1 tickets in play, and our analysis must take into account the previous results:

1) If the first ticket was a winner, we now have N-1 tickets in play, as well as W-1 winning tickets in play.  We can compute P(2) as:

P(2) = (W - 1) / (N - 1)

2) If the first ticket was a losing ticket, we now have N-1 tickets in play, but we still have W winning tickets so we can compute P(2) as:

P(2) = W / (N - 1)

Regardless of the 1 ticket's outcome,

If you run a few more examples by hand, you'll see that, in general:

P(T) = (W - # of winning tickets played) / (N - # of losing tickets played - # of winning tickets played)

Now that we have a general formula for the probability of purchasing a winning texas scratch-off ticket, let's try to optimize our playing strategy.

Winning Strategies

First off, we want to win.  It's intuitive to see that the more winning tickets we buy, the more money we will win.  The more losing tickets we buy, the more money we will lose.  For this game, we want to buy more winning tickets than losing tickets.  Knowing the probability of a winning ticket allows us to theoretically pick a 'better' ticket.  Therefore, without any other information, we will want to purchase tickets with a higher probability of winning.

Assumptions

When we talk about the probability of purchasing a winning lottery ticket, we make a few dangerous assumptions.  We first have to define that there are two types of tickets: winning and losing.  Since the lowest prize is generally (there are definitely exceptions to this rule) the face value of a ticket, any ticket that wins will get us our money back.  I would consider this a win, even though we haven't gained any money; but we haven't lost anything either.

We then have to assume that there is an even distribution of those tickets throughout the state of texas.  To prove this point we would have to empirically know where all winning scratch-off tickets were purchased.  Since we don't have the funds, or the ability to purchase all scratch-offs from all vendors in the state of TX, we'll have to just assume that winning and losing tickets are evenly geographically distributed, thus making our local testing, relevant.

We also have to assume that all tickets are purchased at the same rate.  This one is hard to really gauge since it effectively removes any of the marketing and design work that goes into tickets.  The price point and the layout/prize/design all have to be ignored for now.  For now, based on the data we can collect, we have to say that a ticket, is a ticket, is a ticket.

Real-time Data
Downloading report from txlottery.org
Already downloaded odds from txlottery.org on 05/25/2018
Successfully downloaded the scratch-off report

Game #2044 - The Cash Wheel ($3) => 30.95% chance of winnning something.
Total prizes: 1,455,123 of 4,656,394 tickets
Total claimed: 20,251

Game #2028 - Cinco 5 Spot ($2) => 30.92% chance of winnning something.
Total prizes: 1,695,569 of 5,425,821 tickets
Total claimed: 25,925

Game #2032 - Pharaoh's Gold ($5) => 30.84% chance of winnning something.
Total prizes: 1,936,890 of 6,198,048 tickets
Total claimed: 36,574

Game #2053 - $750 Million Winner's Circle ($30) => 30.03% chance of winnning something.
Total prizes: 11,843,772 of 37,900,070 tickets
Total claimed: 661,821

Game #2043 - 5X The Cash ($1) => 29.00% chance of winnning something.
Total prizes: 3,566,953 of 11,414,250 tickets
Total claimed: 362,270

Game #2046 - 50X The Cash ($10) => 28.81% chance of winnning something.
Total prizes: 2,323,707 of 7,435,862 tickets
Total claimed: 255,127

Game #2081 - Double Bonus Crossword ($3) => 27.32% chance of winnning something.
Total prizes: 9,881,008 of 31,619,226 tickets
Total claimed: 1,710,366

Game #1844 - The Money Game ($5) => 26.89% chance of winnning something.
Total prizes: 1,735,923 of 5,554,954 tickets
Total claimed: 331,532

Game #2078 - Weekly Grand ($2) => 26.72% chance of winnning something.
Total prizes: 9,110,315 of 29,153,008 tickets
Total claimed: 1,802,907

Game #2047 - 100X The Cash ($20) => 26.52% chance of winnning something.
Total prizes: 2,802,992 of 8,969,574 tickets
Total claimed: 577,502

Game #1838 - Instant Millionaire ($20) => 26.12% chance of winnning something.
Total prizes: 10,851,488 of 34,724,762 tickets
Total claimed: 2,412,784

Game #2021 - $1,000,000 Big Money ($20) => 23.98% chance of winnning something.
Total prizes: 2,666,333 of 8,532,266 tickets
Total claimed: 816,089

Game #2030 - Ultimate 7's ($50) => 23.97% chance of winnning something.
Total prizes: 1,086,525 of 3,476,880 tickets
Total claimed: 332,911

Game #2054 - Crazy Cash Multiplier ($2) => 22.91% chance of winnning something.
Total prizes: 1,613,124 of 5,161,997 tickets
Total claimed: 558,460

Game #1877 - Super Loteria ($5) => 22.77% chance of winnning something.
Total prizes: 10,742,914 of 34,377,325 tickets
Total claimed: 3,775,358

Game #2026 - Super Hit Super Ticket ($10) => 22.69% chance of winnning something.
Total prizes: 2,123,894 of 6,796,461 tickets
Total claimed: 752,227

Game #2007 - $5 Holiday Gift Pack ($5) => 22.65% chance of winnning something.
Total prizes: 8,770,866 of 28,066,771 tickets
Total claimed: 3,122,112

Game #2038 - Cinco ($5) => 22.60% chance of winnning something.
Total prizes: 2,019,560 of 6,462,592 tickets
Total claimed: 722,377

Game #2045 - 20X The Cash ($5) => 22.47% chance of winnning something.
Total prizes: 2,899,643 of 9,278,858 tickets
Total claimed: 1,050,575

Game #1671 - $500,000,000 Cash ($20) => 22.24% chance of winnning something.
Total prizes: 12,362,471 of 39,559,907 tickets
Total claimed: 4,581,719

Game #1884 - $100 Million Texas Riches ($20) => 21.47% chance of winnning something.
Total prizes: 2,138,684 of 6,843,789 tickets
Total claimed: 852,625

Game #1847 - $250,000 Cash Winfall ($10) => 20.17% chance of winnning something.
Total prizes: 1,662,007 of 5,318,422 tickets
Total claimed: 737,955

Game #2012 - Hot 7's ($1) => 19.37% chance of winnning something.
Total prizes: 6,354,425 of 20,334,160 tickets
Total claimed: 2,995,668

Game #1891 - Strike It Rich ($5) => 19.16% chance of winnning something.
Total prizes: 2,139,218 of 6,845,498 tickets
Total claimed: 1,023,663

Game #1893 - A Cut Above ($2) => 18.56% chance of winnning something.
Total prizes: 1,518,993 of 4,860,778 tickets
Total claimed: 757,639

Game #1899 - Texas Lottery Platinum ($50) => 18.30% chance of winnning something.
Total prizes: 1,074,166 of 3,437,331 tickets
Total claimed: 544,875

Game #2018 - Super 7's ($10) => 18.11% chance of winnning something.
Total prizes: 4,235,890 of 13,554,848 tickets
Total claimed: 2,174,693

Game #2033 - High Roller ($5) => 18.09% chance of winnning something.
Total prizes: 1,882,455 of 6,023,856 tickets
Total claimed: 967,589

Game #1862 - Bonus Break the Bank ($5) => 17.77% chance of winnning something.
Total prizes: 4,202,529 of 13,448,093 tickets
Total claimed: 2,205,181

Game #2037 - Some Like It Hot ($1) => 17.23% chance of winnning something.
Total prizes: 1,976,584 of 6,325,069 tickets
Total claimed: 1,071,527

Game #2014 - Mega 7's ($20) => 17.19% chance of winnning something.
Total prizes: 3,004,643 of 9,614,858 tickets
Total claimed: 1,632,413

Game #2020 - Money ($5) => 16.96% chance of winnning something.
Total prizes: 2,353,637 of 7,531,638 tickets
Total claimed: 1,295,832

Game #1885 - Mega Loteria ($10) => 16.95% chance of winnning something.
Total prizes: 7,493,175 of 23,978,160 tickets
Total claimed: 4,127,884

Game #2013 - Lucky 7's ($5) => 16.94% chance of winnning something.
Total prizes: 5,202,404 of 16,647,693 tickets
Total claimed: 2,867,390

Game #2009 - Bling ($2) => 16.75% chance of winnning something.
Total prizes: 1,521,346 of 4,868,307 tickets
Total claimed: 848,062

Game #2036 - Power 5's ($5) => 16.11% chance of winnning something.
Total prizes: 2,126,413 of 6,804,522 tickets
Total claimed: 1,227,732

Game #1845 - $100 Million Golden Treasures ($20) => 16.06% chance of winnning something.
Total prizes: 2,281,260 of 7,300,032 tickets
Total claimed: 1,321,293

Game #2029 - Numbers Game ($5) => 15.92% chance of winnning something.
Total prizes: 1,878,776 of 6,012,083 tickets
Total claimed: 1,096,064

Game #1871 - $100,000 Bing-O-Rama ($5) => 15.82% chance of winnning something.
Total prizes: 3,920,066 of 12,544,211 tickets
Total claimed: 2,299,168

Game #1622 - Pick 3 ($1) => 15.78% chance of winnning something.
Total prizes: 4,005,583 of 12,817,866 tickets
Total claimed: 2,354,180

Game #1896 - Texas Lottery Silver ($5) => 15.78% chance of winnning something.
Total prizes: 3,482,980 of 11,145,536 tickets
Total claimed: 2,046,795

Game #1859 - Crossword Connect ($5) => 15.57% chance of winnning something.
Total prizes: 5,886,374 of 18,836,397 tickets
Total claimed: 3,498,787

Game #2025 - Game of Luck ($5) => 15.14% chance of winnning something.
Total prizes: 1,965,214 of 6,288,685 tickets
Total claimed: 1,193,619

Game #2016 - Wild 7's ($3) => 15.10% chance of winnning something.
Total prizes: 3,600,786 of 11,522,515 tickets
Total claimed: 2,192,312

Game #1894 - Texas Lottery Red ($1) => 14.71% chance of winnning something.
Total prizes: 4,120,126 of 13,184,403 tickets
Total claimed: 2,557,171

Game #2002 - Ultimate Crossword/ Ultimate Bingo ($20) => 14.60% chance of winnning something.
Total prizes: 1,756,247 of 5,619,990 tickets
Total claimed: 1,095,764

Game #1860 - Big Play Cashword ($10) => 14.49% chance of winnning something.
Total prizes: 3,616,428 of 11,572,570 tickets
Total claimed: 2,268,035

Game #1759 - $200 Million Payout ($10) => 13.49% chance of winnning something.
Total prizes: 8,733,858 of 27,948,346 tickets
Total claimed: 5,736,685

Game #1794 - $5 Set For Life ($5) => 13.44% chance of winnning something.
Total prizes: 6,657,371 of 21,303,587 tickets
Total claimed: 4,382,944

Game #1806 - Texas Loteria ($3) => 12.93% chance of winnning something.
Total prizes: 10,477,516 of 33,528,051 tickets
Total claimed: 7,054,952

Game #1857 - Weekly Half Grand ($1) => 12.42% chance of winnning something.
Total prizes: 6,579,900 of 21,055,680 tickets
Total claimed: 4,527,943

Game #1832 - $7,500,000 Ultimate Cash ($50) => 11.94% chance of winnning something.
Total prizes: 1,456,383 of 4,660,426 tickets
Total claimed: 1,022,068

Game #1852 - Wheel of Fortune ($10) => 11.24% chance of winnning something.
Total prizes: 2,382,975 of 7,625,520 tickets
Total claimed: 1,719,402

Game #1861 - Instant Bingo ($2) => 9.88% chance of winnning something.
Total prizes: 8,232,223 of 26,343,114 tickets
Total claimed: 6,246,400

Game #1874 - Big Money ($2) => 9.53% chance of winnning something.
Total prizes: 1,637,735 of 5,240,752 tickets
Total claimed: 1,258,266

Game #2003 - Veterans Cash ($2) => 9.46% chance of winnning something.
Total prizes: 1,666,614 of 5,333,165 tickets
Total claimed: 1,283,514

Game #2024 - Wild 9's ($1) => 8.26% chance of winnning something.
Total prizes: 1,877,099 of 6,006,717 tickets
Total claimed: 1,505,262

Game #1858 - Break the Bank ($2) => 8.02% chance of winnning something.
Total prizes: 8,305,016 of 26,576,051 tickets
Total claimed: 6,711,472

Game #1879 - Money Time ($2) => 6.65% chance of winnning something.
Total prizes: 1,498,753 of 4,796,010 tickets
Total claimed: 1,263,834

Game #2019 - Fast 50'S ($1) => 6.47% chance of winnning something.
Total prizes: 1,970,453 of 6,305,450 tickets
Total claimed: 1,670,425

Game #1830 - 50X Super Ticket ($10) => 6.13% chance of winnning something.
Total prizes: 2,976,332 of 9,524,262 tickets
Total claimed: 2,548,981

Game #1870 - Ultimate Millions ($50) => 5.84% chance of winnning something.
Total prizes: 1,134,499 of 3,630,397 tickets
Total claimed: 979,794

Game #1897 - Texas Lottery Black ($10) => 5.33% chance of winnning something.
Total prizes: 2,762,001 of 8,838,403 tickets
Total claimed: 2,420,175

Game #1898 - Texas Lottery Gold ($20) => 5.15% chance of winnning something.
Total prizes: 1,623,768 of 5,196,058 tickets
Total claimed: 1,429,760

Game #2023 - Dazzling Dollars X9 ($5) => 3.94% chance of winnning something.
Total prizes: 1,771,727 of 5,669,526 tickets
Total claimed: 1,611,859

Game #2010 - $500 Frenzy ($5) => 3.47% chance of winnning something.
Total prizes: 1,881,084 of 6,019,469 tickets
Total claimed: 1,732,197

Game #1868 - Bonus Cashword ($3) => 2.83% chance of winnning something.
Total prizes: 9,792,010 of 31,334,432 tickets
Total claimed: 9,165,612

Game #1853 - Money ($20) => 2.76% chance of winnning something.
Total prizes: 2,358,730 of 7,547,936 tickets
Total claimed: 2,211,266

Game #2011 - $50 or $100 ($10) => 1.41% chance of winnning something.
Total prizes: 729,912 of 2,335,718 tickets
Total claimed: 706,966


* This data and its analysis are not intended to provide advice and should not be construed as a recommendation to buy lottery/scratch-off tickets.  Remember, it's still a gamble, and the odds are against you.

Analysis

The csv file includes one line for each game/prize combination.  For each, it tells us the number of winning tickets already collected since those are reported back to the TX lottery commission.  Unfortunately, we do not receive the number of losing tickets purchased, since the trash can doesn't report back to the TX lottery commission.

Using our earlier assumptions, and based on the information we can collect, we compute the number of total winning tickets minus the number of cashed winning tickets, divided by the total number of tickets minus the number of cached winning tickets.  This calculation is missing the subtraction of the total number of losing tickets in the denominator, but if we assume that all game tickets are purchased at the same rate, we can effectively ignore this.  Alternatively, we could assume a number of tickets purchased daily, and based on the game's start date, guess how many tickets have been played.

Flaws

This strategy may be easy to rely on, but it's definitely has it's flaws.  As of now, we are unable to count losing tickets effectively.  We also don't know the rate of play for each game or prize level/ticket price.  It's possible that the cheaper tickets are sold at a much more rapid rate than the $20 tickets.  That actually might be a safe assumption, but one that we'll have to table for the moment.

Expansion

Later on, I'd like to figure out a way to charting the # of winning tickets which could indicate the rate of ticket sales, maybe.  This again is a flawed assumption but perhaps looking at all this data together could prove to be useful.

If users reported when they played losing tickets for each game, our stats would be much better.  Consider a mobile app that users scanned the ticket's barcode, and reported on losers.  For their time and energy, they'd be given access to charts and graphs helping them pick better scratch-off games.

Based on previously stored data, try to see a trend in game length vs winning ticket redemptions.

And after compiling all the data, the best game might not be the one with the best probability but a combination of probability and trends.