If you want to know whether a lottery is random, you don't squint at frequency charts and form an opinion. You run a chi-squared test. The test produces a number that tells you, with formal probability bounds, whether the data is consistent with a random process. State lotteries pass these tests routinely. Most "lottery systems" that claim to detect non-randomness fail elementary tests like this one.
What you'll learn
- What the chi-squared test does, in plain language.
- How to compute it for a Pick 3 frequency table by hand.
- How to interpret the result — what counts as "consistent with random," and what would count as evidence of non-randomness.
- Why state lottery data passes these tests across the board.
- The deeper lesson: hypothesis testing is the proper way to check claims about randomness, and most "system" pitches don't survive it.
The intuition
Suppose you flip a coin 1,000 times and get 480 heads, 520 tails. Is the coin fair? You expected 500 of each. The deviation is 20 in either direction. Is 20 a lot or a little?
The chi-squared test answers exactly this question. It compares observed counts to expected counts and produces a single statistic that summarizes how far off the observation is from expectation. Then it tells you the probability that a fair process would produce a deviation that large by chance.
For our coin: the chi-squared statistic for 480/520 is 1.6, well within the range a fair coin produces in 1,000 flips. The "p-value" — the probability of seeing a deviation at least this big from a truly fair coin — is about 0.20. We have no reason to suspect bias.
For a different coin: 600 heads, 400 tails. Chi-squared is 40. The p-value is about 2.5 × 10⁻¹⁰ — essentially zero. We have strong evidence the coin is biased.
The test gives you a principled way to decide which deviations matter and which are sample variance.
The formula
For a frequency table with k categories and N total observations:
χ² = Σ (Oᵢ - Eᵢ)² / Eᵢ
where Oᵢ is the observed count for category i and Eᵢ is the expected count under the null hypothesis (in our case, "the process is uniformly random"). Sum across all k categories.
The result follows a chi-squared distribution with (k-1) degrees of freedom. Look up the p-value in a table or compute it directly. If the p-value is small (typically < 0.05), reject the null. If it's large, the data is consistent with the null.
A worked example with real Pick 3 data
Let's run the test on California Daily 3 midday position-1 frequencies for a hypothetical 365-day window. Suppose we observe these counts for digits 0-9:
| Digit | Observed | Expected | (O-E)²/E |
|---|---|---|---|
| 0 | 32 | 36.5 | 0.555 |
| 1 | 40 | 36.5 | 0.336 |
| 2 | 38 | 36.5 | 0.062 |
| 3 | 34 | 36.5 | 0.171 |
| 4 | 41 | 36.5 | 0.555 |
| 5 | 35 | 36.5 | 0.062 |
| 6 | 33 | 36.5 | 0.336 |
| 7 | 39 | 36.5 | 0.171 |
| 8 | 37 | 36.5 | 0.007 |
| 9 | 36 | 36.5 | 0.007 |
Sum the last column: χ² ≈ 2.26. Degrees of freedom: 10 - 1 = 9.
Looking up the p-value for χ² = 2.26 with 9 df: p ≈ 0.99. There's a 99% chance a fair uniform process would produce a deviation at least this big. The data is overwhelmingly consistent with the null hypothesis of uniform randomness. We cannot reject randomness.
Now suppose we got dramatically different data: digit 7 appears 80 times, others compensate by appearing less. The chi-squared statistic would be much larger, the p-value much smaller, and we'd flag the result as inconsistent with randomness — and an investigation would follow.
What state lottery data actually shows
Run this test on the actual data from any state lottery on this site, over a long enough window, and you'll see results similar to the above: p-values mostly between 0.05 and 0.95, scattered uniformly. That's exactly what randomness produces — uniform p-values across many tests. There is no systematic deviation, no consistent bias, and no exploitable pattern.
Our Is This Normal? tool runs chi-squared and other tests on live state lottery data and shows the results. Spend ten minutes on it and you'll have done more rigorous statistical analysis of state lottery randomness than every "lottery system" seller combined.
Why systems pitches don't survive this
Any "system" that claims an edge implicitly claims the data is not uniformly random — that some digits or combinations have higher true probability than others. That claim is testable. Run a chi-squared on the data the system was trained on, after the fact. Run it on out-of-sample data. Run it on multiple states. The system would predict significant deviations from uniform; the test would flag them or not.
The tests don't flag deviations, because the deviations don't exist. The system's claimed edge is incompatible with the data the system claims to read. Every honest system seller, run through this exercise, would have to either retract the claim or fail to publish the math. Most don't publish the math, which is the meta-signal we already discussed in How to Spot a Lottery "System" Scam.
Limitations of the test
Chi-squared isn't a magic bullet:
- It needs reasonable sample sizes. Roughly: 5+ expected counts per category. With small samples, the test is unreliable.
- It tests against a specific null. "Uniformly random" is the usual null for digits. For ball-pool games, the null is more complex (which numbers can be drawn together depends on game rules).
- It catches first-order bias, not all dependence. A process where digits show the right frequencies but pairs have hidden correlations would pass the chi-squared on individual frequencies but fail tests like the runs test or autocorrelation. Real randomness audits use a battery of tests, not just one.
- One test, one result, one interpretation. A p-value of 0.04 is not strong evidence on its own; the test could happen to flag noise. Replicate across windows and games.
The deeper lesson
Hypothesis testing is the right way to evaluate any claim about randomness. The shape of the argument is always: state a null hypothesis ("the process is random / uniform / fair"), measure how far the data deviates from what the null predicts, and compute the probability that the null could have produced a deviation that large.
If the probability is small, you have evidence against the null. If it's not small, you don't. Either way, you've done principled work — not eyeballing, not opinion, not pattern apophenia.
Bring this discipline to any claim about lottery randomness, and most of the noise in this domain falls away. State lotteries pass the tests. "Systems" don't run the tests, because they wouldn't pass either.
Try it yourself
Use our Frequency Analysis page to pull a year of digit frequencies for any Pick 3 game. Compute the chi-squared statistic by hand using the formula above (it's just basic arithmetic — sum (O-E)²/E across all 10 digits). Look up the p-value. You'll get a result like the example above: high p-value, consistent with randomness. You've just done a real randomness audit on real data.
Now imagine doing the same on data from a "system" that claims to spot non-random patterns. The chi-squared would tell you whether the system's claim survives the most basic statistical scrutiny. Spoiler: it doesn't.
Common pitfalls
- Multiple comparisons. If you run 100 chi-squared tests, ~5 will produce p < 0.05 by chance alone. Don't cherry-pick the flagged ones.
- Confusing failure to reject with proof. A high p-value means "data is consistent with random." It doesn't prove random; it just doesn't disprove it. The proof comes from mechanism + audit + multiple tests.
- Applying the test to the wrong null. Some lottery games have non-uniform structures (e.g., bonus balls drawn from a different pool). Make sure the expected counts reflect the actual game structure.
- Ignoring degrees of freedom. The same chi-squared statistic means different things at 5 df vs. 50 df. Look up the right table.
Further reading
- The Law of Large Numbers (and Why Small Samples Lie) — sample size matters for any test, including this one.
- What "Random" Actually Means — the property we're testing.
- How to Spot a Lottery "System" Scam — apply the test to system pitches and watch them collapse.
- Wikipedia: Chi-squared test — formal references and multiple variants.
DrawAnalytics is an informational service. We do not sell predictions or guarantee outcomes. Lottery drawings are random — past results do not predict future drawings. Play responsibly. 1-800-GAMBLER.