hypersoniq's Blog

Halfway through the first pick 3 attempt

Not sure about the week long play, but it fits the observation so I will give it an honest attempt...

On one hand, the disappointment isn't going to be complete until the 7th draw, but on the other hand, a bad pick means you lose 7 times on the mid day draws and 7 times on the evening draws.

Upside is no need to crunch numbers every draw.

Of course, that means on a complete fail, I picked the wrong numbers (corresponding to the distribution percents). I will have to make some documentation of a few weeks in a row to see where I may have gone wrong. 

There are still 3 draws for each game remaining, so the first shot is not even done yet... a hit on draw 7 is just as valid as a hit on draw 1.

Tried one thing this week, will try a different approach when I make picks next week. Since it still costs exactly the same, I like the free time of only rerunning scripts one day a week.

Entry #433

Parts of the PA Cash4Life that did NOT require overthinking

I originally thought that I would need to change the ranges per column... i did not! Instead I just run the report for the whole column from 1 to 60.

I knew I would need to change the threshold on each side of the expectancy, but I only needed to introduce a scalar variable and set it to 1.5, so 1.5 standard deviations on both sides define the Hots and Colds properly. This was as simple as passing in the scalar value to the function... which means it can easily be modified.

I thought that I would need some fancy calculation to determine how many draws to use to train the model... it was simply 600, this gives every number the equal chance of appearing 10 times. (I used 15 times in the pick N variant)

I thought I might have to deal with the 0 drawn numbers differently, but they go right to the cold pile!

The expectancy was also a straight division... you would think 1/60 * 100 to get an expectancy of 1.666%... but remember, the columns hold the data in sorted order... the expectancy is actually 1/57 * 100 for 1.754%

Why?

Because in sorted order, the first column cannot have a 57, 58, 59 or 60 and the last cannot have a 1, 2, 3 or 4! Each column is restricted to 56 possible numbers because of the sort constraint!

Just by using the readily available sorted order draw history, the odds of 5/60 already dropped from 1:7,282,016 to the odds of 5/56 which is 1:5,093,088 doing nothing at all!

Within a 26 draw window, there were multiple NNNNN draws. The "safe" reduction shows the remaining numbers to pick are down to as low as 150,000 combos...

I will have to set up a back test to see what trends are there, and though still a near impossible task, I was glad to see how the observation carries forward into the non replacement draws... these numbers still come from the middle of the frequency distribution! Not at as high a rate as the pick N games, but it is there!

Now for the remaining coding tasks...

On the pick N, in order to maintain a single code base, I will list all of the pick 3 and pick 5 games, leaving the functions for each commented out until needed.

On the jackpot script, I will be looking at something similar, where I can pass the range and expectancy into the function so one program can handle C4L, MM and PB...

The range part will be an easy test script where I pass in a range and see if it counts the proper number sequence.

I have plenty of time, since any play on pick5 and cash4life must wait to be funded by a pick 3 win.

The effort will have to be bankrolled by the pick 3 because that is the strategy.

A Cash4Life attempt for a 26 draw window, brute forcing the bonus "cashball" by playing the same white balls with all 4, comes in at $208, not in my play budget, but easily covered by a 50 cent straight hit on the pick 3.

A pick 5 attempt will only cost $14, so a 50 cent box hit on the pick 3 would cover rolling that out for a week with another pick 3 shot.

The harder part will be the MM, which to brute force those bonus balls would cost $3,120... needing 13 50 cent straight hits on the pick 3, or the powerball, which would require $2,028 (with the multiplier)... needing 9 straight 50 cent hits on the pick 3.

The rest is just as much fantasy as a jackpot win, but the need is to master the pick 3, because those techniques will directly apply to a pick 5 attempt.

And the goal this year is to catch a straight pick 5 win... hard to do when not playing it!

If I do catch that straight pick 5 hit, I will keep the promise to myself that any win of $50,000 (pre tax) and I will reward myself with an LP Platinum membership... been unable to make that happen in over 20 years of playing... maybe this year will be different...

Entry #432

First of the draws (mid and eve) pass without matching

The first crack at the new system. Was not expecting much of anything yet. There are 6 mid draws left and 6 eve draws left... I am interested most in draws 2, 4 and 7... where the neutrals usually show up together.

The cash4life script is working and now just awaiting funding... just like the pick 5 attempt... and the mega millions attempt... patience is key, it is still trying to pick one combo of a little over 300 combos... will take some time to cement an actual play algorithm.

The first look at the cash4life neutrals indicates that the combos can be reduced from over 7 million to about 150,000 or so. Still gonna be a guess, but a better guess.

Entry #431

PA Cash4Life history file generation went fast!

I have never even looked at this game before. Needed to create a history file from April, 2016 to last night.

On the PA website, you can view one year at a time. The output is in a table, so it is a simple copy/paste special operation to start.

Once I did the paste operations from all years into the spreadsheet, there was an extra row below each draw that had the "cash ball".

Since I was not interested in the cash ball (1 to 4) I selected the first cell (A1), went to data/filters/standard filter

I created a filter where it would select all rows that contained "Cash", select all of the resultant rows, and right click in the row number and chose "delete rows".

Back to data/filters and chose "remove filter"

Then I was left with the draws only. From this, I deleted blank columns between the results.

Then, after converting the textdate format to date, I selected the date column contents and clicked the A to Z sort, and replied yes when it wanted to extend the selection to all 5 number columns, and I had my history with the newest draw at the bottom. I also saved a copy as .csv for later use in Python.

The python coding for the production pick N script went well also... added variance to the column statistics. Now it displays the last 3 classification 7 draw windows PLUS the data for the last 150 draws.

I am no further on the actual pick for the pick 3, so that will have to wait for tomorrow to go live.

The things you pick up in spreadsheets... time on that cash4life sheet from start to finish was around 30 minutes. Most of that due to the dates on the PA website... it lists newest on top, but I use them with the newest on the bottom so updating is easier. That is why I needed to sort the dates, the years were correct, but they were sorted descending.

It is important to make sure the date column is actually DATE format and not textdate, as it pastes from the website... that was as easy as using the text to column feature under the data tab and choosing type date m/d/y... i did this BEFORE sorting.

The Cash4Life script will need to be a major rewrite of the pickN script... i want the same output, but everything changes... ranges per column, expectancy, draw window... taking time with this to get it right.

All in all, a productive day!

Entry #430

The coding for today

1. Start out by working up the final production code for the pick-n script.

2. Update the draw history files

3. Run the script and use a "from the middle" approach at a phase 2 pick. (One for mid day PA Pick 3, one for evening PA Pick 3

If I get this done in time, I will go play each resulting combo for a week @ $1 straight and $0.50 boxed... if not, I will update today's results after the evening draw and play tomorrow.

4. Create a PA Cash 4 Life history file

5. Begin a version of the script with the new expectancy values and 5/60 format.

That should be more than enough for a day of coding... I will eventually need to plug the new formula for Cash 4 Life into the back test framework, may require some heavy tweaking, but that is for another day.

Progress wise, phase 1 is tested and complete. The resulting Neutral numbers will appear in 85% of the pick 3 game's 7 draw windows. Resulting in a relatively safe reduction of combos by about 70%. Phase 2 is the important part, as it attempts to reduce the remaining 30% of all combos down to ONE best guess.

Should the current plan for phase 2 not pan out (and it probably will not), I only need to go back to the phase 2 drawing board... it took months to even get to this point... going all in on the classification of frequency distribution!

The goal was always one best guess, and many previous systems pulled in a win within a few weeks only to go flat after... that is the nature of coincidental systems... if I won, it was coincidence that the number from my guess came up. Same for this approach. The goal is to capture something that happens 85% of the time, rather than maybe 30 times in tens of thousands of draws.

The odds are still 1:1,000

Any combo can come up at any draw

The past draws have no real weight in the next draw... but really, why are we here then? We are ONLY given the game setup and the past draws.

I am a firm believer in playing for fun, and that means as cheaply as possible, but catching the occasional win to keep it interesting.

I am certainly too dumb to solve an unsolvable problem, but just smart enough to enjoy the attempts. Without this hobby there would be no need for me to study statistics and programming.

Whether today or tomorrow, I am going to at least try... I have not donated to the cause of "older Pennsylvanians" in months, time to get back in the game!

Entry #429

Possibly running a P3 live test this week...

Did not find any "magic" answers in the stats. DID manage to notice that the most popular percent in each neutral draw was 10%... the expectancy...

BUT that only accounts for 800 or so of all 16,800 draws.

Here is the thing... not every neutral distribution HAS a 10% count in each column, BUT mostly has one where all 3 columns are NEAR 10%... same with the pick 5.

So, the initial strategy will be to look at the last 150 draw distribution and pick the number CLOSEST to 10% (over or under) in each column and try that combo for a week.

Since I decided to add the box, the normal budget will be $14. The FIRST try, however will be for $21.00 ($1 straight and 0.50 boxed both day and night)

Will probably pick the day and evening pick 3 combos on my next day off (Tuesday) and get the ball rolling.

Not giving up on the next phase of accuracy in selection, just getting bored of riding the bench and looking forward to getting into the game again for awhile.

Entry #428

Going to also include box play in the pick 3 strategy

I have noticed in the back test data, that it might be a good idea to include boxed play in the next pick 3 attempt. The neutral counts describe straights, but sometimes the box of a combo would NOT be comprised of all neutrals.

At a cost of $14 per week, a box hit of $40 or $80 would fund the system going forward. Even if the straight happens, the box would be the bankroll and the straights taken as all profit.

There is still a huge number of combos comprised of neutrals, so a box ticket would offer an extra incentive to watch the week if I miss the NNN combo (which is highly likely).

Entry #427

Jackpot number selection using range reduction

Regardless of the system used to pick numbers (except for quick picks), you can craft a pick using range reduction, working from both ends... (using a 5 of whatever format)

Step 1, pick the low number. In a non replacement draw, picking the column 1 number first gets you a lower bound. No numbers can be the same or less than this number.

Step 2, pick the high number... this gives an upper bound. No number can be the same or higher than this number.

Now that you have your range, time to reduce it...

Step 3, pick your next lowest number. This must be 1 higher than the lowest, and no more than 3 lower than the highest. This sets the next low bound.

Step 4, pick your next to last highest number. This must be at least 1 lower than the high bound, and at least 2 higher than your new low bound from step 3.

Step 5, your new bounds set you up to pick from what remains in the center section.

Sounds like unhelpful obvious info, but when you are selecting numbers based on some metric, it can help. The simple setup is in a spreadsheet, using cell formatting to black out the numbers no longer in play at each step. It can also be easily reset when looking at other possibilities.

Entry #426

Pennsylvania Cash 4 Life, the first non replacement draw target!

After doing some quick research, this nightly 5/60 + 1/4 game has used the same matrix since it's introduction on April 7th, 2015... 10 years = NOT data starved!

Why this game? 

Because the bonus ball can be brute forced... unlike the other jackpot games with a bonus ball, covering the bonus balls requires only 4 tickets for a draw. At $2 per ticket, that's only 8 bucks... compared to the prohibitive cost of doing the same with something like the Mega Millions, where the elimination of the bonus ball by brute force would cost $120 per draw.

Since the initial window would be possibly 26 drawings, $208 for the Cash 4 Life is definitely cheaper than $3,120 to do the same with the Mega Millions...

Of course a single $250 straight on the pick 3 covers the $208 attempt... and would be the only scenario by which it goes live.

Thinking about it, even at my age of 56, a win would also capture 3 2nd tier prizes...

1 grand prize, taken as a lump sum is $7 million before taxes

3 2nd tier prizes would be taken as annuities, and depending on the taxes, would be worth somewhere between $25,000 to $36,000 per year AFTER taxes!

Pretty sure with a minimum $75,000 guaranteed annual post tax income and at least $3,500,000 clear in the bank... early retirement is an option!

The best part is, the pick 3 win (if any) would pay for the chance!

Also provides a bit of motivation for development... I need to make a csv with all 10 years of data, then make a working copy where the bonus balls are stripped, totally focusing on the 5/60 part.

But reality sets back in and I must still clash with 20 years of failed attempts at a simple 1:1000 game...

Bottom line, you don't know if you don't try...

Entry #425

New summer project, recreate all data files

After running the code for the pick 5, I realize that I am missing 17 draws between the two, they have been drawn an equal number of times! Most (70%) was entered by hand, and therefore prone to transcription or other human error...

So, since I want to start a data file for the PA Cash 4 Life, I may as well keep going and redo the P3, the P5, the Match 6 and also spot check the PB and MM data for accuracy.

That is boring busy work, but accuracy cannot be let to suffer... if I notice it, I MUST fix it!

Same rules apply, the window of double draw promotions will be purged, and the evening 666 incident will also be wiped.

I hope that it doesn't set things back too much, but that is at least a day of importing data 1 year at a time per game, as PA does not have an API to use like some states.

Still working on reading their RSS news feed data, but that would require firing up the Raspberry PI and leaving it on so the update script can be run every day at the same time (with CRON scheduling). Then the scripts can just be run from the PI whenever needed... constant updates of accurate data being the goal.

While figuring out this new system, the roll out of live play may be delayed even further, but I am hoping since the sample size is only 150 draws with a 7 day window added, priority can remain here while the long term data is recollected and the updater is built.

The money saved by not playing anything for months at a time is nice!

BUT, with zero chances in the game, there is a zero chance of winning...

Entry #424

The fun part... operation names for each phase.

I like to use cheesy military style operation names for each phase, knowing full well that they will not be successful...

Phase one... Operation "Kickstart"

This is for the PA pick 3, the goal is to hit both the pick 3 eve and pick 3 mid in a predetermined time frame.

Failure is not hitting anything over 1 month of play.

Success is hitting day and eve pick 3s within the same month (never had that happen before)

Dream outcome, hitting mid day and eve pick 3 in the same week.

Phase 2... Operation "Bailout"

This is for the PA pick 5, which I have never hit straight...

Failure is hitting nothing.

Good is hitting either day or night in any time frame

Success is hitting both the day and evening in a 3 month period

Dream scenario is hitting the day and evening in the same month.

Phase 3... Operation "Break the Chains"

This is for the smaller jackpot games, including PA Cash 5, PA Match 6 and MUSL's "Cash 4 Life"

Failure being the status quo, no top tier prize.

Success is a top tier prize, no time frame. Only needs to work once... BUT the prize must clear 1M after taxes

And finally

Phase 4... Operation "Golden Parachute"

PB or MM jackpot, no time frame. Only needs to work once. This is the operation where success means there is not only plenty of money, but the real prize is getting what time remains back!

Of course, since the goal is to fund all other operations from the pick 3, so a non start on that trashes the chances of the others... back to the spreadsheets for me.

Entry #423

Most recent observations in the pick 3 data

The most common percentage is 10%... the actual middle! The majority of frequency percentages lie between 9% and 11%, again, the middle... the actual 10% value happened in 800 of the 4,500 NNN draws.

Though it would be tempting to start at 10% in each column, the number of NNN draws with exactly 10% in all columns is less common. They are usually a mix. Common numbers are 9.33% 10.67% etc.

Going to have to start working on the indicators of standard deviation and quartiles, and maybe add a few more... bottom line is this is not quite ready for prime time... but progress is being made!

Entry #422

Quick takeaways from the first look at the data

The pick 3 has the same roughly 1/4 of entire draw history classified as NNN. Slightly higher percentage for the evening ball drawn game.

Pick 5 has around 2/5 of all draws classified as NNNNN, and there are slightly more on the evening ball drawn game. Here is the kicker, in over 5,000 draws for each, a HHHHH draw happened only once and there are ZERO CCCCC draws in BOTH mid and eve. There are even a few 7 draw windows in both games where there are 2 NNNNN draws!

The next step is to get an idea of which percentages showed up most frequently, and this will be done on both the entire history, and the filtered copies that are made up of only NNNs or NNNNNs.

I may need to modify the back test script to include the standard deviation and quartiles for each row. Since they are the starting indicator candidates, they should be present in the data set.

I may also consider generating heat maps for the percentages of all neutrals.

It is looking difficult to gauge any set rules at this time, the next set of tests will hopefully shed some light. What I am hoping to see is a way to further reduce the valid play set. This seems important with the pick 5, since the percentages on the NNNNNs have more swings than on the pick 3.

If it does manage to yield anything, it will need to be documented, as will subsequent future live tests. This time when failure occurs, I am going to learn something from it!

On the plus side, high/low, even/odd, sums and replacement techniques like mirrors and vtracks have all been ignored, and the entire system is based on pure frequency... but not dependent on the highs and lows.

Trying to reverse solve the NNN matches will hopefully yield a step or set of steps that can be applied universally for each column to give the best possible guess for each game. The classifiers are chosen with a hard statistical threshold, and the model looks at the frequencies that happen rather than the actual digits... I am simply trying to choose the most likely frequency within that 150 draw training set and play the corresponding number in each column.

Entry #421

Sifting through the mountain of data to find the next step

Today I have a bit of time to begin looking at the data collected from the full history rolling back tests.

One quick observation is how indexing only 7 draws, which keeps 143 of the same draws in the training set, can drastically change things like the standard deviation and the quartiles.

The first step will be to look at what is there in the PA Pick 3 Evening game data, looking for an idea of any connection at all between sets. Perhaps going to the previous 2 or 3 sets.  This step is concerned with choosing indicators that may get a pick based on the most recent data

The next step will involve isolating only the NNN draws to look for the frequency of percentages within those draws. This step is for gathering the profile of all NNN draws in a game history.

Hopefully the third step will be to put together a plan to make an actual guess.

Then the above will be tested on the remaining data sets (pick 3 mid and both pick 5 (quinto) games.

Even if it ends up that I run offsets at 21, 14, 7 and 0 it will still leave 129 draws in common across the range... but 7 draws can really reshape the statistics!

From the standpoint of the games, all PA mid day draws are done with a computer, while all evening PA draws are done with ball machines. The data is so far consistent between methods... it does not matter how they pick them, they tend to fill from the middle. By interpolation we can guess that the appearance of NNNN draws in the pick 4 would be in the mid 60% of all draws, and the pick 2 would be in the high 90% range... but the pick 2 and pick 4 are being excluded because the pick 2 has a weak payout and a minimum $1 bet and the pick 4 is more of a nuisance when it comes to claiming and taxation.

Also, even though the data is all combos, the analysis will still be done per column, so anything found in the pick 3 data can be immediately applied to the pick 5.

Also, with new systems, I tend to make the first play a bit heavier than normal. The plan is $7 a week for 50 cent straight bets, but the first run will be for $1 straight. And the plan remains the same for the pick 5... ONLY to be played on winnings from the pick 3... so that may never be live tested... Gotta keep it real.

Time to fire up the laptop, break out the reading glasses and see what can be discovered.

Entry #420

The bet strategy for the system under development

Since the core of the initial observation is a 7 draw window, it would be the easiest yet.

With the pick 3 it would be super cheap. 0.50 bets on both mid day and evening draws for a total expense of $7

Since the pick 3 and pick 5 have a similar window, but the pick 5 has no 0.50 option, that cost would be $14 per week.

To play both would be $21 for a week.

However, I have a general idea of indicators highlighting when NOT to play (narrow neutral spread)... this could make it even cheaper.

Of course, the goal was to have the pick 3 pay for the rest, so between 0, $3.50 or $7 per week until a hit (straight play only).

The plan is also to increase the pick 3 to $1 while on their money. Also to take a profit from any hit rather than recycling all back into the games. On a $250 straight pick 3 hit... pocketing $150 would leave enough to play the 3s and 5s at $1 for 3 weeks AND be able to get another 2 weeks back at $7

So of course the overall design is one of cheapness.

The jackpot games are a distant target, but that strategy will involve one line over whatever the window works out to be... so still super cheap, and also restricted to play on "house" money.

Will probably fail like all others, but it is the cheapest one yet!

This time I will track hits and count the number of times I had to pony up the $7 for each week over a yet to be determined test window. Perhaps I look at expense over 10 weeks and then if out of pocket was $70, then yet another system can be abandoned to the scrap heap.

Entry #419