Skip to content

How BayanWin makes its picks

This page answers one question. How does BayanWin get its data and turn it into picks, and what can't those picks do? We cover where the PCSO draw results come from, how often we update them, the 6 models we run, and what our own data says about randomness.

By ZALEL LABS · Published · Updated

Printed tables of draw numbers beside a laptop chart, a calculator, and a pencil

Where the draw results come from

We start with official PCSO draw history for 5 games: Lotto 6/42, Mega Lotto 6/45, Super Lotto 6/49, Grand Lotto 6/55, and Ultra Lotto 6/58. Each game has more than a thousand past draws, with 6 numbers per draw.

We keep the history in structured spreadsheets. Two processes copy new draws from those records into our database:

  • Scheduled sync. A Cloud Scheduler job calls our backend every 20 to 30 minutes. It pulls any new draws added to the records. You don't have to do anything.
  • On-demand sync. When you pick a game on the homepage, the app runs a sync first. The dashboards then load with the latest draws we have.

The database is InstantDB. It supports live updates, so dashboards refresh without a full page reload.

BayanWin is independent and isn't an official PCSO source. To verify a draw, check a schedule, or claim a prize, go to pcso.gov.ph.

What we measure in each draw

A list of past numbers isn't something a model can read directly. So we turn each draw into measurements, called features. The models work from these:

  • Frequency. How often each number came up in the last 50 draws, the last 100 draws, and the full history. We compare each count to what equal chances would give.
  • Gaps. How many draws have passed since each number last came up. We label long gaps "overdue" for exploration only. A long gap doesn't change the next draw.
  • Pairs. How often 2 numbers appear in the same draw. The graph view shows the strongest pairs.
  • Sum and product. The total of the 6 numbers in each draw. This shows the usual range of results.
  • Transitions. Which numbers came up in the draw after a given number. The Markov chain model uses these.
  • Position. Whether a number shows up more often as the lowest, a middle, or the highest number once a draw is sorted.

The 6 models we run

Each model makes different assumptions about the draws. We don't treat any one of them as the right answer. Where they agree and where they differ is part of what we show you.

XGBoost (gradient boosted trees)

XGBoost trains many decision trees on the features above. Each new tree corrects the errors of the one before it. We retrain it from time to time as new draws come in.

It scores every number in the pool and returns the top 6. It has no sense of order between draws. Each pick is a separate scoring problem.

Decision tree

This is a single tree trained on the same features as XGBoost. It's less accurate, but you can follow every split that led to its pick. We keep it as a plain baseline next to the more complex models.

Markov chain

The Markov model looks at the draws as a sequence. It assumes the next draw depends partly on recent ones. We build a transition table from the full history. Each cell holds how often number B came up in the draw right after number A.

Over the long run, the table settles into a steady frequency for each number. We use that long-run figure along with recent transitions to rank numbers. The Markov graph shows the strongest links in both directions. Read more in the Markov chains lottery article.

NashHotFilter (game theory heuristic)

NashHotFilter borrows the idea of a Nash equilibrium from game theory. In that idea, a stable strategy is one nobody can improve by changing it alone. Here it means a balanced set of numbers. None of them are very hot lately, and none have been missing for very long.

The filter mixes frequency, gaps, and pair counts into one score. Then it picks the 6 numbers with the best balance. It's a rule of thumb for exploring the data. Read more in the NashHotFilter article.

Deep reinforcement learning (DRL)

The DRL model picks numbers one at a time, like moves in a game. After each draw, it gets a score based on how far its pick was from the result. We store that distance in the database. Over time, the model shifts toward choices that gave smaller distances.

Unlike XGBoost and the decision tree, it keeps updating as new results come in. It starts from saved weights, so it doesn't retrain from zero each time. Read more in the deep reinforcement learning article.

Miro (language model summary)

Miro is a large language model (LLM) that reads the output of the 5 models above. It gets each model's numbers, confidence scores, feature summaries, and distance history. It also gets the current state of the game: hot and cold numbers, top pairs, and strong transitions.

Miro works through where the models agree and flags outliers. It checks that there are no repeated numbers and that every number is in the game's pool. Then it returns 6 numbers with a short reason. We show Miro apart from the other models. It combines their views rather than acting as a separate model. Read more in the Miro article.

Comparing the models in the Council Panel

The Council Panel shows every model's pick side by side. We highlight numbers that more than one model chose. Agreement doesn't make a number more likely. It only shows where different assumptions land on the same answer.

We show all the picks on purpose. It keeps you from leaning on one model as if it were a system.

How we track each model after a draw

After each draw, we store how far each model's pick was from the result. We call this the error distance. It counts matching numbers, the difference in sums, and the offset by position. It isn't a simple win or loss.

The Error Distance Analysis dashboard shows this history for each model. You can see which models have been closer on average and which jump around more.

The same numbers feed the DRL model's score. So the DRL model can get better at lowering its distance. That doesn't change how random the draw is.

What our data shows about randomness

We tested one popular idea on our own draw history, Jan 2, 2015 to Dec 26, 2025. For every draw, we took the 6 numbers that came up most in the 50 draws before it. Then we counted how many of those 6 matched the actual draw.

PCSO draws in our data per game, with jackpot odds, average sums, and hot-number matches
GameDraws in our dataJackpot oddsAverage sum (math)Hot-six matches (chance)
6/42Lotto1,6391 in 5,245,786129.0 (129)0.85 (0.86)
6/45Mega Lotto1,6441 in 8,145,060138.7 (138)0.81 (0.80)
6/49Super Lotto1,6381 in 13,983,816150.6 (150)0.72 (0.73)
6/55Grand Lotto1,6461 in 28,989,675168.3 (168)0.67 (0.66)
6/58Ultra Lotto1,5141 in 40,475,358175.3 (177)0.63 (0.62)

In every game, the hottest 6 numbers matched about as many numbers as any 6 picked at random. The average sum of each draw sits within a few points of what the math predicts. For 6/42, the hot six matched 0 numbers in 38.7% of draws, against 37.1% for random picks. Past draws don't point to future ones, and none of our models change these odds.

How fresh the data is

PCSO draws each game on set days of the week. On draw days, our scheduler checks for new results every 20 to 30 minutes. A new result usually shows up within 1 or 2 checks after the official draw. On other days, the job runs less often.

Sometimes a sync is late, for example when a source feed stops. The dashboards then show the last data we have, with a timestamp of the last update. To force a sync, pick a game on the homepage.

What the picks can't do

Read this first. PCSO draws use certified random procedures. No model can predict a random draw. The patterns we show are facts about past draws. They don't carry over to future ones.

  • Every number has the same chance. Past counts, gaps, and transitions don't bind the next draw. Each number in the pool is equally likely every time.
  • Short histories are weaker. Some patterns only mean something over many draws. A game with fewer draws gives less reliable model output.
  • Models lag behind rule changes. XGBoost and DRL learn from past draws. If PCSO changes a game's number pool or draw schedule, they won't adjust right away.
  • The records can have errors. Our draw history may contain the odd typo. If you spot one, contact us with the game and draw date.
  • A past match means nothing next time. A pick that came close to an old draw won't be closer to the next one. Check the error distance history before you read anything into a pick.

If you play, set a budget you can afford to lose. Our Responsible Play page has more on this.

Questions people ask

How often do you retrain the models?

We retrain XGBoost and the decision tree from time to time as new draws come in. The DRL model updates after each new draw. We rebuild the Markov transition table whenever new data arrives.

Why do the models give different numbers?

Each model uses different assumptions, features, and ways of learning. So they disagree. That's expected, not a bug. We show all of them so you can see it.

Can these models predict the jackpot?

No. A jackpot needs all 6 numbers right. The odds for one ticket run from 1 in 5,245,786 for 6/42 to 1 in 40,475,358 for 6/58. No model changes those odds, because the draws are random.

What does error distance mean?

It counts how many of a model's numbers matched the draw. It also measures how far off the other numbers were. A lower average over many draws means the model was closer in the past. It says nothing about the next draw.

Is BayanWin part of PCSO?

No. BayanWin is independent. PCSO and other government agencies don't run, endorse, or partner with us. For official results and tickets, use PCSO's own channels.

For more on each method, read the BayanWin blog. To learn who builds BayanWin, see the About page. To report a data problem or ask a question, use the Contact page.