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 09/25/2018
Successfully downloaded the scratch-off report

Game #1828 - Texas Loteria ($3) => 31.15% chance of winnning something.
Total prizes: 10,478,102 of 33,529,926 tickets
Total claimed: 47,704

Game #2083 - $250,000 50X Cashword ($10) => 30.69% chance of winnning something.
Total prizes: 3,395,401 of 10,865,283 tickets
Total claimed: 87,233

Game #2056 - $200 Million Cash Explosion ($10) => 30.26% chance of winnning something.
Total prizes: 7,288,122 of 23,321,990 tickets
Total claimed: 330,120

Game #2022 - Hunting For Hundred$ ($2) => 30.02% chance of winnning something.
Total prizes: 1,580,386 of 5,057,235 tickets
Total claimed: 88,559

Game #2090 - Diamond Mine 9X ($5) => 29.69% chance of winnning something.
Total prizes: 1,986,426 of 6,356,563 tickets
Total claimed: 141,005

Game #2068 - Weekly Half Grand ($1) => 29.43% chance of winnning something.
Total prizes: 6,597,733 of 21,112,746 tickets
Total claimed: 544,243

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

Game #2079 - Blackout Bingo ($2) => 28.29% chance of winnning something.
Total prizes: 8,066,552 of 25,812,966 tickets
Total claimed: 1,065,394

Game #2070 - Houston Texans ($5) => 27.99% chance of winnning something.
Total prizes: 1,402,132 of 4,486,822 tickets
Total claimed: 202,942

Game #2069 - Cowboys ($5) => 27.93% chance of winnning something.
Total prizes: 2,481,870 of 7,941,984 tickets
Total claimed: 365,847

Game #2080 - Break the Bank ($2) => 27.92% chance of winnning something.
Total prizes: 8,454,170 of 27,053,344 tickets
Total claimed: 1,248,862

Game #2087 - $25,000,000 Payout ($5) => 26.48% chance of winnning something.
Total prizes: 1,985,217 of 6,352,694 tickets
Total claimed: 412,472

Game #2086 - 10 Grand ($1) => 26.33% chance of winnning something.
Total prizes: 1,938,087 of 6,201,878 tickets
Total claimed: 414,434

Game #2067 - Stacks of Cash ($20) => 25.40% chance of winnning something.
Total prizes: 2,111,530 of 6,756,896 tickets
Total claimed: 530,084

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

Game #2076 - Casino Action Super Ticket ($10) => 24.62% chance of winnning something.
Total prizes: 2,610,732 of 8,354,342 tickets
Total claimed: 734,984

Game #2057 - 200X The Cash ($50) => 24.06% chance of winnning something.
Total prizes: 1,082,989 of 3,465,565 tickets
Total claimed: 328,014

Game #2041 - Aces and 8s ($2) => 22.70% chance of winnning something.
Total prizes: 1,626,794 of 5,205,741 tickets
Total claimed: 575,552

Game #2078 - Weekly Grand ($2) => 22.06% chance of winnning something.
Total prizes: 9,110,315 of 29,153,008 tickets
Total claimed: 3,438,581

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

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

Game #2075 - The Glitter Is Gold ($10) => 19.07% chance of winnning something.
Total prizes: 1,769,639 of 5,662,845 tickets
Total claimed: 852,069

Game #2063 - 50X Fast Cash ($5) => 18.56% chance of winnning something.
Total prizes: 1,729,844 of 5,535,501 tickets
Total claimed: 862,359

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

Game #2081 - Double Bonus Crossword ($3) => 18.20% chance of winnning something.
Total prizes: 9,881,008 of 31,619,226 tickets
Total claimed: 5,043,326

Game #2048 - Double Match ($2) => 18.02% chance of winnning something.
Total prizes: 1,612,763 of 5,160,842 tickets
Total claimed: 832,602

Game #2049 - Frogger ($5) => 17.71% chance of winnning something.
Total prizes: 1,861,362 of 5,956,358 tickets
Total claimed: 979,996

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

Game #2064 - Double Doubler ($1) => 16.87% chance of winnning something.
Total prizes: 1,960,290 of 6,272,928 tickets
Total claimed: 1,085,305

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

Game #2015 - 2X Cash ($2) => 16.69% chance of winnning something.
Total prizes: 1,649,861 of 5,279,555 tickets
Total claimed: 922,573

Game #2061 - Lion's Share ($5) => 16.58% chance of winnning something.
Total prizes: 1,846,606 of 5,909,139 tickets
Total claimed: 1,039,430

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

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

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

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

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

Game #1877 - Super Loteria ($5) => 14.06% chance of winnning something.
Total prizes: 10,742,914 of 34,377,325 tickets
Total claimed: 6,875,830

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

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

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

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

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

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

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

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

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

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

Game #1759 - $200 Million Payout ($10) => 10.57% chance of winnning something.
Total prizes: 8,733,858 of 27,948,346 tickets
Total claimed: 6,463,464

Game #2013 - Lucky 7's ($5) => 10.54% chance of winnning something.
Total prizes: 5,202,404 of 16,647,693 tickets
Total claimed: 3,853,266

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

Game #1837 - $100,000 Jackpot ($5) => 10.31% chance of winnning something.
Total prizes: 1,664,569 of 5,326,621 tickets
Total claimed: 1,243,792

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

Game #1848 - 25X the Money ($5) => 9.69% chance of winnning something.
Total prizes: 2,054,474 of 6,574,317 tickets
Total claimed: 1,569,459

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

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

Game #1859 - Crossword Connect ($5) => 8.86% chance of winnning something.
Total prizes: 5,886,374 of 18,836,397 tickets
Total claimed: 4,626,878

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

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

Game #2050 - Super 9s ($1) => 8.00% chance of winnning something.
Total prizes: 1,910,287 of 6,112,918 tickets
Total claimed: 1,544,646

Game #2058 - Blackjack ($1) => 7.86% chance of winnning something.
Total prizes: 1,881,024 of 6,019,277 tickets
Total claimed: 1,527,884

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

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

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

Game #1885 - Mega Loteria ($10) => 6.49% chance of winnning something.
Total prizes: 7,493,175 of 23,978,160 tickets
Total claimed: 6,349,453

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

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

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

Game #1806 - Texas Loteria ($3) => 6.26% chance of winnning something.
Total prizes: 10,477,516 of 33,528,051 tickets
Total claimed: 8,939,352

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

Game #1861 - Instant Bingo ($2) => 4.55% chance of winnning something.
Total prizes: 8,232,223 of 26,343,114 tickets
Total claimed: 7,368,833

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


* 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.