hypersoniq's Blog

Going with a Python script QP for the power ball tonight...

I have not updated power ball (or mega) histories since last year... that is a project for another day.

But, it is a bigger jackpot so I have a short script to generate a QP (using all possible numbers) that will be getting a run tonight.

Going to use sorted(random.sample(range(1,70),5)) for the white balls and random.randint(1, 26) for the red ball.

Note how range(1,70) will exclude the top of the range,.. so picking from 69 numbers requires the 70 at the top, BUT randint() picks between the range bottom and top, inclusive. Gotta love the strange python stuff...

My wife wants a machine generated QP, so there is a bit of a competition potential...

Entry #471

Distributions and wondering if a pick 6 would be viable...

In the 1,000 pick 3 possible combinations are 720 combos with unique digits. Derived by 10x9x8 = 720. There are 10 triples, 000 through 999 which leaves 1,000 - 730 = 270 combos with a pair.

In the 10,000 pick 4 possible combinations, we use 10x9x8x7 to get 5,040 unique digit combinations, there are 10 quads, 342 triples, 270 two pairs and 4,338 combos with one pair.

In the 100,000 pick 5 possible combinations, using 10x9x8x7x6 yields 30,240 combinations with all unique digits, 10 all the same digits, 450 4 of a kinds, 900 full houses (3+2), 7,200 3 of a kinds, 10,800 having 2 pairs, and finally 61,200 combos with 1 pair.

So, at the pick 5, we cross over into having almost twice as many having one pair than having all 5 digits unique. It is truly amazing that the pick 5 ever gets hit at all...

What if there were a pick 6? NOT a replacement draw jackpot game, but a daily game where 6 machines are used to pick digits? Based on the lottery commission paying about 1/2 of the odds, a straight hit would be worth $500,000 !!!

I wonder if that would be a popular game?

Just for fun, the 6 digit all unique combinations would be 10x9x8x7x6x5 = 151,200...

Entry #470

Picls from today to 8/20

Let's try out posting the picks beforehand...

This week 50 cents straight and 50 cents boxed are my wager...

PA Pick 3 mid day = 113

PA Pick 3 evening = 749

Also posted in the prediction area.

These are good through 8/20 (Wednesday) next week.

The hots and colds were cut as outliers and my Python QP Generator made a QP from the neutrals in each column.

Could be way off, might catch a hit... always exciting at the start of the week... not so much at the end.

Let's see what happens!

In PA the straight return on 50 cents is $250

The box return on 50 cents is double for the pair on mid day, so $80 on the 113 and $40 on the 749.

Day straight = $330, Night straight = $290

Entry #469

Why I am still hooked on the neutrals...

While it is not a hit machine, it is the results from back testing that make the case for the neutrals at least being a viable hypothesis...

In both the PA pick 3 day and evening draws, the percentages were consistent, and these games are drawn differently, mid is a PRNG and evening is ball machines. Both histories were comprised of 25% all neutral draws, the next largest category were those draws containing 2 neutrals, and the next those containing one neutral. In fact, both histories were very skimpy on HHH or CCC draws... proving their identification as outliers. This hypothesis held for the pick 5 as well. The main difference being that there is an 85% chance of seeing at least 1 all neutral draw in each 7 draw window of the pick 3, and a 52% chance of seeing at least 1 all neutral draw in each 7 draw window of the pick 5. By interpolation, that is a 65% chance of the same thing happening in Pick 4 draws. It also holds for the Cash 4 Life, but I am still figuring out the back test script to see hard data.

I have always called this "Phase 1" because there is more needed. Trying to look at the resultant data output and pick one neutral per column has proven to introduce too much bias on my part in selection of a final combo, so I introduced an all neutral QP generator that ONLY picks from neutral numbers in each column.

Even if the combos are reduced from 1 in 1,000 to 1 in about 350, that is still a great deal to whittle away at making the final playable combo... and that is for an 85% chance of one combo being drawn from 350, not 100% that the one I pick will be drawn.

The straight shooter system was always going to be the lonely path fraught with more disappointment than success, but I chose it anyway.

I need to make a pick 3 selection for tomorrow, and have 3 weeks of house money left to catch a hit with that QP generator. Then I must choose to stay in on my own money again, or drop out until a better Phase 2 presents itself.

I have run with V-tracs back in the day...

I have run with mirrors...

I have run with workouts...

I have run with angles and line lengths on a grid...

I have run with followers...

I have back tested my way to giving up on just about every method...

Now I run with pure distribution frequency.

AND again I am running out of ideas.

Entry #468

Always on the lookout for new ideas, here is one such idea...

In the Cash 4 Life classifier, I have been using 1.5 standard deviations as an upper and lower cutoff for hot and cold.

As an alternative, I could apply an IQR (inter quartile range) where anything above or below the range given by Q3-Q1 would be the new outliers.

In the pick 3, one standard deviation above and below the expectancy does the trick. In the non replacement draw of the C4L, which has a moving expectancy and a wider range, the standard deviation may be too wild of a setpoint, where the IQR can provide a more consistent range.

I may have to plot out a comparison to visualize the difference. The problem is too many neutrals, this solution may be better than the current one. I need to get this part right before the long process of back testing.

3 draws remain on the initial Cash 4 Life 26 draw test... 3 of the numbers have appeared individually for a total of 6 matches. I did bad on the pick part of the neutrals... my phase 2 basically does not work.

In 6 weeks of pick 3 testing, there has only been 1 hit. I have 3 weeks remaining of "house money" for the pick 3 @$14/wk. That will be a 9 week run on the idea with a net zero out of pocket, including 2 shots at the pick 5 and the C4L experiment.

Though I have tested much worse systems, I need to do better than 1 hit in 6 weeks on that pick 3 to ever have another shot at the pick 5 and C4L... it is looking like those last 3 free weeks will be using the all neutral QP generator, as I have yet to identify any progress on a different phase 2 strategy.

Visualization did NOT help as much as I hoped it would. 3 more weeks of trying and then I am again faced with decision time... keep going or pull the plug and work on a different phase 2 process. I did get to keep a bit of profit as well, so if I stop in 3 weeks, I would end up ahead...

Entry #467

Finding the balance

I know what I must next do, run the big back test script on the Cash 4 Life to get hard data on the occurrence of all neutral draws in the window. I may have to adjust the Standard Deviation scalar to try and minimize the amount of digits in the neutral pool, while still holding a respectable NNNNN rate per window. It took an hour to run on the pick 3, but that was 16,800+ draws.... this one will be run, adjust the scalar, run again. May take days...

All of the calculations change in a non replacement draw scenario... variable expectancy per digit, number of training draws to allow 10 fair chance draws per ball, the hot line, the cold line, repeats across columns...

All to leave it to a QP generator in the end.

But I know it is an 85% chance per window in the pick 3, and a 52% chance per window in the pick 5... why? Because I ran the back test... the only way I will know for sure is to run the C4L back test... which is not quite 100% coded... I would say I am 85% there.

Plan remains the same... pick 3 needs to work to fund the rest... perhaps next week I try cutting the high and low neutrals to make a smaller set...

There is also the option of C4L getting a single pick per column... that would be the easiest modification.

Entry #466

Playing the last 6 draws in the Cash 4 Life test

Two groups of 10 draws, each hitting $6 on 3 separate 1+1 events. This last stretch brings the total number of draws to 26, matching the window, and the net loss to -$196

This exact scenario is why it HAD to be played on house money... out of pocket was $0

There are still 6 draws remaining, but noticing a trend here, I did not do very well at choosing from the neutrals. Given how the pick 3 is now using the all neutral QP generator, it may be some time before there is another shot at the Cash 4 Life. 

There is still the option of making the standard deviation spread tighter. The budget minded system is still worth continuing, it was just more fun to play on house money.

Here is hoping for another hit to keep it that way for awhile longer...

Entry #465

Python: Difference between sort() and sorted()

After a bit of a mix up while coding, I had discovered that I was using sort() where I should have used sorted(). Why? Because sort() will sort a list in place, but the return type is NONE, while sorted() will create a new list, leaving the original entities in tact, return type LIST.

Once I figured that out, the Cash 4 Life "all neutral" QP generator works great!

I have not updated the draw history in awhile, but just with the old data it managed to remove 7 outliers. The original script modification also worked out, now I just copy the 5 neutral lists (one per column) directly into the QP Generator where the big list is put together using set() to remove duplicates.

So that was a successful day as far as coding goes! All objectives met and tested. And a big thanks to the stack overflow community for helping to explain the difference between sort() and sorted(). As per usual, I did not need to post anything, just properly use the search there.

Entry #464

Busy coding day

Starting off with running the next "on the house" pick 3 combos and then going to play them.

The harder part is for fine tuning the Cash 4 Life classifier, as a deeper dive into the data shows too many draws that should be classified as cold are being given the Neutral classification.

The standard deviation ends up being too wide when using 1.5 as a scalar, this is most likely because it was set for 1 to 60, but the observed range is much tighter. Good thing I created the script with a scalar variable already in place!

It will be simply stepping back from 1.5 to 1.45 and moving down until the cold numbers go back to being cold. The lists are too big for each column. Even though the use of the set eliminates duplicates across lists, a number picked twice in 534 draws is cold by any definition...

This is not a burning priority, but I have the time today AND I am aware of the issue... so may as well fix it now.

The other thing is dropping in $7 a la carte to play a gut feeling on the PA pick 4... for a box play on 1177. I know that the last appearance of any of the 6 permutations the most recent appearance in the day game was 7/24/2021 and the last appearance in the evening was 2/9/2017, but gotta go with the "hunch" because I rarely have them. There was to be a surplus of $13 after playing the pick 3 for a few more weeks on them, so it will come from that... still no out of pocket expenses this month. Only playing box as the combo has only ever been drawn 14 times since it first appeared on the evening game back in 1983. $400 for a $0.50 box is good enough IF it shows up.

On Saturday the last 6 draws of the first attempt at the Cash 4 Life will be purchased. Not impressed with those results so far, but the next time house money becomes available, that will be the test of it's all neutral QP generator.

I may also factor in a revised odds calculator for the Cash 4 Life based on the number of entries in the neutral combined set just out of curiosity. As an example, if just 5 numbers are eliminated, the odds for the neutral white ball numbers drop from 1 in 7,282,016 down to 1 in 4,638,348. If 10 balls are eliminated, it drops to 1 in 2,825,013. Still a ton of combos, but then the QP generator will choose just 1 of those resultant combos.

It is kind of like the difference between a slot machine and video poker... both still favor the house, and both require some degree of luck, but at least you feel there was SOME attempt on your part to influence the outcome on a video poker machine instead of just letting the slot machine take your money.

Entry #463

Big win random considerations

Been awhile since I looked into what to do if there might ever be a big win.

Some things have stayed the same... top federal tax rate on a lottery win is 37%, but the IRS only requires your state lottery to withhold 24%. That means you will owe an additional 13%, but not on all winnings as the sliding tax rate applies until you hit that 37% THIS is a big reason they recommend a tax attorney to help with planning. You don't have what you think you have until the taxes are paid! Estimated tax payment is probably the best way to keep the success in a winner's story.

Pennsylvania also collects 3.07%, non sliding. Not sure if they withhold that before cutting the check or if you owe it later, like you do on a win over $600.01

CDARS, the system that allows you to hold a large amount in your bank account and have FDIC insurance on all of it still exists, only it now goes by the IntraFI Network.

No anonymous claims in PA, they still want to add to the chaos by painting a target on your back. Still first name, last initial, county of residence and amount won. This one always boggled the mind... the cash 5 is hit almost every night and I have lived in this state all 56 years of my life and NEVER met a winner, nor do I know anyone who has...

It is not looking good for needing to use any of the above info for this first run of the Cash 4 Life test (9 draws remain of 26), but it does only have to work once...

I still have yet to perfect the pick 3, so I will probably run out of time without a big win, but at least I can say I gave it my best shot and stayed within or under (periods of just not playing at all) budget while doing so. Of nothing else, I have proven to myself by constant exploration of ideas and rigorous back testing that random numbers can not be predicted, and learned a great deal about programming and statistics along the way. Still not throwing in the towel, but I DO have a realistic outlook... this will probably never work, but I will continue to try anyway because it is one of the cheapest hobbies I have.

Never hurts to dream a little though.

Entry #462

Making the Cash 4 Life QP generator even easier to use

Because the classifier runs individually on 5 columns, the easiest way to combine them AND eliminate duplicates is to use the properties of a Pyrhon set to concatenate them, then catch the result as a list to copy and paste into the QP Generator

list_A = [<numbers from list A>]

...

list_E = [<numbers from list E>]

neutrals = list(set(list_A + list_B + list_C + list_D + list_E))

print(neutrals)

Tested without updating the draws and it works exactly as imagined. There are other ways to do this, but the built in properties of the Python set make it the most efficient.

Entry #461

2 more $2 hits on the Cash 4 Life

So that brings the total won to $10

The net loss is now -$198

The second 10 draw ticket ends on Friday 8/8

The last ticket will be for 6 draws and will run from 8/9 to 8/14

So there are 12 more chances on the combo.

If the pick 3 hits again, the next C4L test will be using the custom all neutral QP generator. I can see where bias with regard to the gap stats probably made this not the best combo. QP will remove that bias. I will be writing a neutral export function for the Cash 4 Life classifier that will output only neutrals to a csv file to make the list easier to create. It is one big list of neutrals from 1 to 60 used to take 5 random samples. I may also just generate the list right in the program to make it even easier to copy it into the QP generator.

Entry #460

First week of pick 3 using the all neutral QP generator

Ran it exactly once after updating the draw histories. There are less than 20 lines of code, and some are comments left for forgetful future me...

Only 8 lines longer for the pick 5 version which is not going to see use without a pick 3 win.

The Cash 4 Life version is under 10 lines!

Easy pick, as yet to be determined effectiveness.

One observation while testing the C4L version, random.sample(population,5) presents the QP in descending order.

15 draws left on the current C4L attempt, and enough left over to cruise through august on the pick 3 house money.

I am NOT sold on distilling the neutral numbers through a QP, but I am temporarily out of new ideas for interpreting the data, so for now it will have to do. Maybe there is some luck to be had... time will tell.

Entry #459

All neutral QP scripts done

The script is simple, it has a function called machine() that can be called to return a random pick from a supplied list.

So the main section has a list of the neutrals for each position (random example numbers)

Group_A = [ 2, 3, 4, 7, 8, 9, 0]

Group_B = [1, 2, 4, 6, 7, 9, 0]

Group_C = [4, 5, 6, 8, 9]

Then they are called to store the pick in a variable

PickA = machine(Group_A)

PickB= machine(Group_B)

PickC = machine(Group_C)

print(f"Mid Day all neutral QP is {PickA} {PickB} {PickC}")

 

So, one script does both day and night for the pick 3, another does the pick 5 and yet another does Cash 4 Life, though that one is slightly different as it uses random.sample(5) in it's machine to emulate a non replacement draw.

There was no need to back test as it is a QP generator, just ran it in a loop to ensure it was only picking numbers from each list.

So that is where I am... Phase one classifies the drawn numbers based on frequency, hots and colds are dropped as outliers, and a random QP is generated from the all neutral sets. So far trying to make decisions based on the output has not worked too well, let's see if this new approach to phase 2 makes it any better... zero bias from me introduced in this new phase 2.

Maybe it is a step back from "best guess" to "guess", but I am confident in the concept of phase 1, as there still remains an 85% chance of an all neutral pick happening in a 7 draw window for the pick 3 (day or night) and a 52% chance of the same in pick 5. I am still working on a back test script to test the same for Cash 4 Life, though that has a bigger window. So far random spot back tests are showing at least 1 or 2 all neutral draws in EVERY 26 draw window...

It is interesting that this observation holds the same occurrence rate for both day and evening games, as PA uses computer draws for day and machine draws for night.

Tomorrow will start a new week for the Pick 3 live test and will be the first attempt using the all neutral QP generator. I will have to wait for another P3 straight hit to get another shot at Cash 4 Life or the Pick 5, my operating rule for this crazy system is to ONLY use house money on those games.

It was nice that after 5 weeks my out of pocket expenses were recovered and the next couple of weeks of pick 3 tests are also courtesy of the PA lottery. MANY tests of different systems never got off the ground from a budget standpoint. Some never got played at all.

So I think I have checked the boxes...

Analysis portion of draw frequency

Number elimination based on statistics

Dumb luck element of a QP

Now all I need to do is hit again...

Entry #458

First 10 of 26 Cash 4 Life drawings completed

Round 1 Cost... $80 for 10 draws

Wins... 3 1+1 @ $2 each

Net Loss... technically free because the entire test is on the house, but... -$74

Round 2 of 10 draws with the same combo starts tomorrow evening. That cost will also be $80

Final round will only have 6 plays, therefore $48.

The brute forcing of playing one combo with all 4 cash balls is what makes the expense, but on a hit it will definitely be all worth it.

So, total cost $208... wins thus far $6... current "state" is -$202

But remember, the only way I can take a shot at this is with a straight hit on the pick 3, so out of pocket cost is $0, plus I made back the money spent in the first few weeks of the pick 3 system... and a few bucks profit... and the next few weeks of pick 3 are also on the house. I shouldn't need to throw any money at the pick 3 out of pocket until late August. A box hit could keep that going longer... and a straight hit opens up another round of Cash 4 Life.

Next round for the pick 3 will employ the new QP generator I wrote that selects a random pick only using the neutral numbers from each column to generate a combo. It was definitely easy to write AND test with a loop to see if the picks were indeed constrained to the 3 separate neutral sets... they were. Also wrote a version for the Cash 4 Life should there be another round of that.

It is a best guess based on the tools at hand. The pick 3 neutral sets cut the choices from 1,000 possible combos down to about 300... the QP just makes selecting from the resultant sets easier. I do not know where else to turn to interpret the results any further... yet. The QP generator should buy some time for new ideas while still staying in the chase.

Entry #457