Statistical Validation · Negative Result

Can You Beat
The Lottery?

I built an eighteen-feature model to predict Florida Lotto numbers, backtested it, and watched it report a 17% edge at p = 0.012. Then I tested that result properly and it evaporated. This is the write-up of a negative result: eighteen features, roughly forty statistical tests, twelve errors caught in my own work, and the one finding that turned out to be worth real money.

PythonNumPypandasSciPy hypothesis testingwalk-forward validationBonferroni correction power analysisMonte CarloCUSUMgame theory
The investigation01

Eighteen Features, Zero Signal

Hypothesis testingFeature validationNegative result
Model rejected
The question

Florida Lotto draws 6 numbers from 53, giving 22,957,480 possible combinations. The internet is full of systems built on hot numbers, overdue numbers and pattern analysis. This project asked whether historical draw data can predict future draws, and more importantly, how anyone would know if it could.

The data

4,009 draws under strict walk-forward validation. Every test draw was scored by an engine rebuilt from prior draws only, so no future information could leak backward. Eighteen features were engineered across three categories. Number-level signals covered frequency, exponential recency, number freshness and hot/cold z-scores. Structural signals covered positional distribution, pair and triplet co-occurrence, gap sequences, consecutive counts, odd/even and low/high balance, decade distribution, and sum and spread modelled with Gaussian kernels. Inter-draw signals measured how numbers and combinations repeat from one draw to the next.

The approach

The exact baseline comes first. A hypergeometric distribution gives 0.6792 expected matches per ticket, and any model has to beat that number to claim an edge. Each feature was then tested independently by scoring 400 candidate tickets per draw, splitting them into top and bottom quartiles, and comparing actual match counts between the halves. The final step is the one most analyses skip: the entire backtest was re-run across twelve independent datasets to check whether the edge survived resampling.

0 / 18
features surviving correction
0.6606
model average vs 0.6792 theory
p = 0.43
model vs random, 12 datasets
13 / 14
randomness tests clean
What it found

The first backtest reported 0.795 average matches against the 0.679 baseline, a 17% edge at p = 0.012, which looked like a real result. Across twelve independent datasets the same model averaged 0.6606 matches, below the theoretical baseline, with a paired p-value of 0.43. The apparent edge was sampling noise. A 150-draw backtest carries a standard error of 0.06, so a model with no skill at all lands anywhere between 0.56 and 0.80 about 95% of the time. A single backtest cannot establish an edge.

Why the features failed

Four of the eighteen features reached p below 0.05. None survived correction. Testing eighteen features at a 5% threshold produces roughly one false positive by chance, and the Bonferroni threshold for that many tests is p below 0.0028.

The mechanism, tested directly

The underlying reason appears in a direct test. Walking all 4,009 draws and recording every number's gap since its last appearance shows that a number drawn last time had an 11.38% chance of appearing again, while one cold for twenty or more draws had 11.16%. The expected rate under independence is 11.32%. Fisher's exact test returned p = 0.30, and a chi-squared test across twenty-six gap buckets returned p = 0.62. The gap carries no information about the next draw. The process has no memory.

Validating the method

A null result invites the objection that the tests were simply too weak to detect anything. To rule that out, the identical battery was run against three systems with known structure.

SystemLag-1 autocorrelationForecast vs baselineEdge persists
Lottery0.0142-0.3%0 of 10 runs
Weather-like0.8462+47.3%10 of 10 runs
Sales-like0.9824+47.3%yes
Churn-liken/ap = 2.6e-160yes
The distinction that matters

The same machinery that found nothing in the lottery fired instantly on every system with real structure, and held across every independent sample. There is a real difference between a model that failed and a question that has no answer. This was the second kind, and the tools were working correctly by telling me so.

What I got wrong02

Twelve Errors, Caught by Testing

Self-reviewVerificationMethodology
Error log
Why this section exists

Most portfolio pieces show only the finished result. This one includes the wreckage, because the error trail is the skill on display. Every item below was published with confidence and later retracted. Eleven of the twelve were caught by running a test rather than by re-reading the reasoning, which is itself the lesson about where review effort belongs.

  1. Reported a statistically significant edge from one backtest. The 17% edge at p = 0.012 was sampling noise, as twelve independent datasets later showed.
  2. Used the wrong prize table. Pulled prizes from a secondary site showing the retired $1 game while charging the current $2 ticket price, understating the game's value by 81%.
  3. Ignored the automatic multiplier. Every non-jackpot prize is multiplied by an average of 3.346 times. It was left out of the economics entirely.
  4. Filtered out consecutive pairs as structurally abnormal. Backwards. Players avoid consecutive numbers, so tickets containing them are under-played and under-shared. The filter was steering toward the crowd rather than away from it.
  5. Recommended all-high tickets without testing robustness. Modelling contrarian crowding showed the strategy inverts on itself once adoption passes roughly 35%.
  6. Built a fraud detector that flagged a provably fair lottery. A t-test run with 20,000 reference samples against the observed mean inverts the roles of the two groups and rejects on a trivial difference.
  7. Shipped a biased estimator with intervals that were too narrow. The calibration curve was non-monotonic from noise, and the bootstrap treated it as exact. Two of four confidence intervals missed the true value.
  8. Conflated the CUSUM alarm with the change point. Reported onset at draw 495 for a change that began at draw 400.
  9. Overstated a change-point estimator. Called it far better when it beat the alarm by five draws out of a ninety-five-draw error. A likelihood-ratio scan proved 8.9 times more accurate.
  10. Claimed coverage that the output contradicted. Printed the line "the interval covers the truth" in a table where two of four intervals visibly did not.
  11. Invented a ticket-sales curve and quoted it as measured. It implied 6.2 tickets per Florida resident at a billion-dollar jackpot, and it drove a break-even figure presented without that caveat.
  12. Concluded that Double Play should be skipped. Based on an assumption explicitly flagged as unverified. One fetch of the operator's own rules reversed the recommendation completely.
The pattern

Nearly every error came from computing an answer under an assumption and then letting the conclusion stand as though the assumption were settled. The fix is cheap and mechanical. When a single unverified fact can flip a recommendation, verify it before publishing rather than after.

What actually worked03

The Part That Was Worth Money

Game theoryExpected valueBehavioral modeling
Validated finding
The pivot

Once prediction was ruled out, the question changed. The probability of winning is fixed at one in 22,957,480 regardless of which numbers are chosen, but the jackpot is divided among winners, and that depends entirely on what other people play. That is a fact about human behavior rather than about the draw, and human behavior does have memory.

78.2%
Double Play return per dollar
27.0%
base game return per dollar
51%
reduction in expected sharing
46.5%
of draws hold a consecutive pair
The finding that mattered

Reading the operator's own rules document surfaced something no amount of draw analysis could. Florida's automatic multiplier applies to the Double Play add-on as well as the base game, and Double Play's prize floors are higher at half the price: $3,500 against $3,000 for five matches, $60 against $50 for four, $7 against $5 for three. Working the coupled free-ticket recursion through, the one-dollar add-on returns 78.2 cents against the base ticket's 27.0 cents per dollar. The crossover where base tickets become the better buy sits near a $65 million jackpot, a level this game does not reach.

Behavioral edges, quantified

Three patterns in player behavior proved measurable. Players cluster heavily on 1 through 31 because they use birthdays. They avoid consecutive pairs because those do not look random, even though 46.5% of actual draws contain one. And a few percent mark visual shapes on the playslip, such as lines, diagonals and blocks, which randomly chosen tickets form essentially never. Modelling all three produced a ticket selector whose expected number of co-winners is half that of a random ticket, and which stays below average popularity even if a third of self-pickers adopt the same contrarian approach.

The honest bottom line

A three-dollar full ticket returns about $1.32 in expected value. None of this makes the lottery a positive-value proposition, and nothing can. What it does is ensure that if the improbable happens the prize is split fewer ways, and that every dollar spent buys more than it otherwise would.

Skills demonstrated
hypothesis testingmultiple-comparison correctionwalk-forward validation power analysisMonte Carlo simulationhypergeometric modeling kernel density estimationCUSUM change detectionlikelihood-ratio scan adversarial modelingexpected-value analysisgame theory source verificationhonest reporting