Netherlands
Member #3,476
January 24, 2004
212 Posts
Offline
Hi,
Here a brief explanation about markov chains (source: http://techeffigy.wordpress.com/2014/06/30/markov-chains-explained)
"Markov Chains is a probabilistic process, that relies on the current state to predict the next state. For Markov chains to be effective the current state has to be dependent on the previous state in some way; For instance, from experience we know that if it looks cloudy outside, the next state we expect is rain. We can also say that when the rain starts to subside into cloudiness, the next state will most likely be sunny. Not every process has the Markov Property, such as the Lottery, this weeks winning numbers have no dependence to the previous weeks winning numbers."
I wrote an application to generate Markov chains for lottery games and tested some lottery games using this Markov algorithm.
Here some Markov chain statistics generated from Wisconsin Pick 3 game data ( input data: September 2011 - October 2014, 1131 draw results, latest draw result has index number 1131):
Number(Digit) 7 followed by number (digit)
Number
Occurrence (%)
Occurrence (#)
Draw #
8
12.43%
42
1123
5
11.24%
38
1127
1
10.65%
36
1131
0
10.06%
34
1105
9
9.76%
33
1130
6
9.47%
32
1069
7
9.47%
32
1095
2
9.47%
32
1091
3
9.17%
31
1113
4
8.28%
28
1120
As you can see here, digit 7 is more likely followed by digit 8 than for example digit 4 ( and 2,3,7, etc.) for the 1131 tested pick 3 draw results.
As you can see here, digit 3 is more likely followed by digit 6 than for example digit 2 ( and 4,1,5, etc.) for the 1131 tested pick 3 draw results.
Number 2 followed by
Number
Occurrence (%)
Occurrence (#)
Draw #
3
13.66%
44
1130
1
11.49%
37
1120
0
11.18%
36
1117
2
10.87%
35
1072
6
10.56%
34
1124
5
9.94%
32
1106
9
9.01%
29
1092
7
8.7%
28
1123
4
7.45%
24
971
8
7.14%
23
1099
As you can see here, digit 2 is more likely followed by digits 3 and 1 than for example digit 2 ( and 8,4,7, etc.) for the 1131 tested pick 3 draw results.
So, can the Markov chains algorithm be useful for lottery games predicting lottery numbers or be used to generate picks with a higher probability of having more winning numbers?
Netherlands
Member #3,476
January 24, 2004
212 Posts
Offline
As early stated, Markov chains don't depend on past history (for random process a lottery unless it's flawed )other than the current state of the system. For example, Markov modelling of a lottery would predict (with a certain probability) the next number based on the current number, but not looking any further back than that.
However I believe the Markov model can be used for analyzing a lottery game in which there is some dependence of a number and the the next number following this number in a combination.
Example Pick 6, New Jersey (input 1024 draw results).
Here you see (see table) the probabilities (in %) of the next (adjacent) numbers to 17.
The numbers 20,22,18,23,19 have a (much) higher probability to be the next number compared to the other numbers (24,28,25, etc.)
This can mainly be explained by the structure of the lottery game but it's always nice to have this information :)
Number 17 followed by
Number
Occurrence (%)
Occurrence (#)
Draw #
20
11.29%
14
1018
22
9.68%
12
1004
18
9.68%
12
997
23
8.87%
11
983
19
8.06%
10
1015
21
6.45%
8
858
24
5.65%
7
966
30
4.84%
6
762
28
4.84%
6
996
31
4.03%
5
979
25
4.03%
5
1008
26
3.23%
4
831
38
3.23%
4
1009
34
2.42%
3
658
27
2.42%
3
799
32
1.61%
2
477
29
1.61%
2
411
44
1.61%
2
810
39
1.61%
2
884
45
0.81%
1
86
33
0.81%
1
187
35
0.81%
1
286
42
0.81%
1
307
40
0.81%
1
807
41
0.81%
1
901
Example for number 47:
Here the highest probability number 47 is followed by number 48 and next by the numbers 3, 1, 5 ???
Number 47 followed by
Number
Occurrence (%)
Occurrence (#)
Draw #
48
16.98%
18
1012
3
13.21%
14
1015
1
11.32%
12
951
5
10.38%
11
827
6
8.49%
9
950
10
6.6%
7
971
4
5.66%
6
998
2
5.66%
6
1019
8
4.72%
5
961
49
3.77%
4
877
11
2.83%
3
800
7
2.83%
3
461
9
2.83%
3
904
19
0.94%
1
82
13
0.94%
1
91
21
0.94%
1
182
16
0.94%
1
326
12
0.94%
1
670
The input (so called corpus) for the Markov algorithm is generated as follows:
Oldest draw result on top ---> latest on bottom
structure of the input: 1 4 12 29 30 31 | 6 9 30 31 32 34 | 3 16 25 26 28 32 | 3 5 18 36 38 49 |
5 7 9 22 44 45 | etc., etc., 5 10 30 31 40 49 (latest (most recent) draw result is at the end of the corpus (string of numbers))
For each unique number in the lottery game (in this lottery example 49 numbers), the adjacent (the number it follows) number is counted and so the probability is calculated.
So first the algorithm starts with number 1 (see input example at point 2) to count the next numbers to it in the string of numbers(corpus); For every occurrence of number 1 in the number string, the adjacent number is counterd.
When finished it takes the next unique number, here number 4, to do the same calculations...etc. This explains why a number like 47 has a high probability to be followed by a number like 1,3,5 etc...the first numbers of the next draw result.
With this information a specific lottery number generator can be developed for your game using the number probabilities to create picks.
For example we start with number 8. Next randomly a number is picked from the list of numbers connected to 8; the number with a higher probability (e.g. number 10, 11.38%) has higher probability to be selected than a number with a lower probability like 11 (5.69%)
If for example number 12 is selected the same process is executed for this number. And so on...till a (hopefully a valid :) ) lottery combination is generated.
Netherlands
Member #3,476
January 24, 2004
212 Posts
Offline
Hi ALX,
"How do I input my state lottery game please?":
I copied the lottery results (raw data) from the website of the lottery to notepad and saved it as a text file.
First I imported the text file with the lottery results into Excel and removed the dates and other data from the draw results. Secondly I copied the results to a tool (topdown) to revert the results to get the oldest drawings at top and the most recent at the bottom of the list. Finally I saved the results to a text file and use this as input for the Markov Chains tool (copy & paste the results from this file into the tools input textbox).
I noticed you've got the Platinum membership so you've access viewing the games past drawings of your state without limitation
South Carolina United States
Member #18,321
July 9, 2005
1,836 Posts
Offline
Quote: Originally posted by stoopendaal on Oct 25, 2014
Hi,
Here a brief explanation about markov chains (source: http://techeffigy.wordpress.com/2014/06/30/markov-chains-explained)
"Markov Chains is a probabilistic process, that relies on the current state to predict the next state. For Markov chains to be effective the current state has to be dependent on the previous state in some way; For instance, from experience we know that if it looks cloudy outside, the next state we expect is rain. We can also say that when the rain starts to subside into cloudiness, the next state will most likely be sunny. Not every process has the Markov Property, such as the Lottery, this weeks winning numbers have no dependence to the previous weeks winning numbers."
I wrote an application to generate Markov chains for lottery games and tested some lottery games using this Markov algorithm.
Here some Markov chain statistics generated from Wisconsin Pick 3 game data ( input data: September 2011 - October 2014, 1131 draw results, latest draw result has index number 1131):
Number(Digit) 7 followed by number (digit)
Number
Occurrence (%)
Occurrence (#)
Draw #
8
12.43%
42
1123
5
11.24%
38
1127
1
10.65%
36
1131
0
10.06%
34
1105
9
9.76%
33
1130
6
9.47%
32
1069
7
9.47%
32
1095
2
9.47%
32
1091
3
9.17%
31
1113
4
8.28%
28
1120
As you can see here, digit 7 is more likely followed by digit 8 than for example digit 4 ( and 2,3,7, etc.) for the 1131 tested pick 3 draw results.
As you can see here, digit 3 is more likely followed by digit 6 than for example digit 2 ( and 4,1,5, etc.) for the 1131 tested pick 3 draw results.
Number 2 followed by
Number
Occurrence (%)
Occurrence (#)
Draw #
3
13.66%
44
1130
1
11.49%
37
1120
0
11.18%
36
1117
2
10.87%
35
1072
6
10.56%
34
1124
5
9.94%
32
1106
9
9.01%
29
1092
7
8.7%
28
1123
4
7.45%
24
971
8
7.14%
23
1099
As you can see here, digit 2 is more likely followed by digits 3 and 1 than for example digit 2 ( and 8,4,7, etc.) for the 1131 tested pick 3 draw results.
So, can the Markov chains algorithm be useful for lottery games predicting lottery numbers or be used to generate picks with a higher probability of having more winning numbers?
Also, I included the the draw results of Wisconsin Pick 3 and New Jersey pick 6 lotto to generate the Markov chains (statistics).
Good luck!
Cheers,
Harmen
Is it really necessary to make Pick 3 thisCOMPLEX, in order to Win ??? People Win Pick 3, with much Simpler systems. If you are going to put this much effort into making the game MORE COMPLEX than it needs to be,you should put this effort into the Pick 4 game instead, b/c the payout is higher, and therefore more worth this amount of effort.
Texas United States
Member #150,790
December 31, 2013
824 Posts
Offline
Hi Stoopendaal,
Interesting post.
I have tried Markov Chains in a jackpot lottery game. They turned out to be quite good at predicting a range (e.g. 37 followed by 42-49), but not so good on pinpointing a following number. Also, on many draws the Markov predictions would be very good for 2 or 3 of the numbers, fairly close for another 2 and wildly inaccurate for one number. Unfortunately, one could never tell which predictions would be good.
Still, any information is useful, and this is one tool to help dial in good numbers to play.
"There is no such thing as luck; only adequate or inadequate preparation to cope with a statistical universe."
Netherlands
Member #3,476
January 24, 2004
212 Posts
Offline
Hi Tialuvslotto,
Thanks for the information about Markov predictions for jackpot games. I like your idea to create chains for a range of numbers and I tested it for a pick 6 lottery game (New Jersey).
First I created the range data for this game. In this example I created groups each having 3 numbers.
49 numbers has 16 groups of 3 number and 1 group with one number (49). So there is a total of 17 groups to analyse.
Group 1: {1,2,3}
Group 2: {4,5,6}
Group 3: {7,8,9}
.etc. etct.
Group 16: {46,47,48}
Group 17: {49}
Example: a combination like 5,10,30,31,40,49 translated to the group index numbers has as result 2,4,10,11,14,17.
Here some Markov statistics for this jackpot game using the number groups as input (1031 draw results tested, checked: ):
(Chain A) Number Group 2 followed by
Number Group
Occurrence (%)
Occurrence (#)
Draw #
Skip #
3
27.02%
107
1023
1
4
20.2%
80
1024
0
5
14.39%
57
1013
11
6
9.85%
39
1021
3
7
8.33%
33
947
77
2
7.58%
30
974
50
9
4.55%
18
989
35
8
3.03%
12
888
136
10
2.78%
11
850
174
11
2.02%
8
811
213
12
0.25%
1
366
658
As you can see a number from group 2 (numbers 4,5,6) is 27% of the time followed by a number from group 3 (numbers 7,8,9).
And 20% of the time this group is followed by a number from group 4 (the numbers 10,11,12).
(Chain A) Number Group 6 followed by
Number
Occurrence (%)
Occurrence (#)
Draw #
Skip #
7
24.66%
91
1006
18
8
19.78%
73
1017
7
9
13.28%
49
1022
2
10
10.57%
39
1012
12
6
9.76%
36
997
27
11
7.59%
28
990
34
12
6.5%
24
1021
3
13
4.88%
18
983
41
14
1.9%
7
974
50
15
1.08%
4
939
85
Here a number from group 6 (numbers 16,17,18) is almost 25% of the time followed by a number from group 7 (numbers 19,20,21) ....
etc.
Another Markov analysis for this game but now for number groups each with 7 numbers (49/7 = 7 number groups):
number group 1: {1,2,3,4,5,6,7}
number group 2: {8,9,10,11,12,13,14}
number group 3: {15,16,17,18,19,20,21}
....
number group 7: {43,44,45,46,47,48,49}
(Chain A) Number Group 1 followed by
Number Group
Occurrence (%)
Occurrence (#)
Draw #
Skip #
2
42.17%
401
1024
0
1
28.71%
273
1024
0
3
18.93%
180
1022
2
4
7.15%
68
1019
5
5
2.94%
28
987
37
6
0.11%
1
748
276
(Chain A) Number Group 3 followed by
Number Group
Occurrence (%)
Occurrence (#)
Draw #
Skip #
4
44.02%
372
1022
2
3
24.97%
211
1014
10
5
21.42%
181
1003
21
6
8.05%
68
1021
3
7
1.54%
13
939
85
I think this information in combination with the skip value can be a helpful tool for (better?) predicting numbers (number groups)....but still I have to do some tests using this information for my lottery game (6/45) if I can make better predictions than other methods I'm using now.
Soon I'll add the feature to tool to convert the draw results to number groups (groups of 2,3,4, etc, 10 numbers each).
Texas United States
Member #150,790
December 31, 2013
824 Posts
Offline
Quote: Originally posted by stoopendaal on Nov 1, 2014
Hi Tialuvslotto,
Thanks for the information about Markov predictions for jackpot games. I like your idea to create chains for a range of numbers and I tested it for a pick 6 lottery game (New Jersey).
First I created the range data for this game. In this example I created groups each having 3 numbers.
49 numbers has 16 groups of 3 number and 1 group with one number (49). So there is a total of 17 groups to analyse.
Group 1: {1,2,3}
Group 2: {4,5,6}
Group 3: {7,8,9}
.etc. etct.
Group 16: {46,47,48}
Group 17: {49}
Example: a combination like 5,10,30,31,40,49 translated to the group index numbers has as result 2,4,10,11,14,17.
Here some Markov statistics for this jackpot game using the number groups as input (1031 draw results tested, checked: ):
(Chain A) Number Group 2 followed by
Number Group
Occurrence (%)
Occurrence (#)
Draw #
Skip #
3
27.02%
107
1023
1
4
20.2%
80
1024
0
5
14.39%
57
1013
11
6
9.85%
39
1021
3
7
8.33%
33
947
77
2
7.58%
30
974
50
9
4.55%
18
989
35
8
3.03%
12
888
136
10
2.78%
11
850
174
11
2.02%
8
811
213
12
0.25%
1
366
658
As you can see a number from group 2 (numbers 4,5,6) is 27% of the time followed by a number from group 3 (numbers 7,8,9).
And 20% of the time this group is followed by a number from group 4 (the numbers 10,11,12).
(Chain A) Number Group 6 followed by
Number
Occurrence (%)
Occurrence (#)
Draw #
Skip #
7
24.66%
91
1006
18
8
19.78%
73
1017
7
9
13.28%
49
1022
2
10
10.57%
39
1012
12
6
9.76%
36
997
27
11
7.59%
28
990
34
12
6.5%
24
1021
3
13
4.88%
18
983
41
14
1.9%
7
974
50
15
1.08%
4
939
85
Here a number from group 6 (numbers 16,17,18) is almost 25% of the time followed by a number from group 7 (numbers 19,20,21) ....
etc.
Another Markov analysis for this game but now for number groups each with 7 numbers (49/7 = 7 number groups):
number group 1: {1,2,3,4,5,6,7}
number group 2: {8,9,10,11,12,13,14}
number group 3: {15,16,17,18,19,20,21}
....
number group 7: {43,44,45,46,47,48,49}
(Chain A) Number Group 1 followed by
Number Group
Occurrence (%)
Occurrence (#)
Draw #
Skip #
2
42.17%
401
1024
0
1
28.71%
273
1024
0
3
18.93%
180
1022
2
4
7.15%
68
1019
5
5
2.94%
28
987
37
6
0.11%
1
748
276
(Chain A) Number Group 3 followed by
Number Group
Occurrence (%)
Occurrence (#)
Draw #
Skip #
4
44.02%
372
1022
2
3
24.97%
211
1014
10
5
21.42%
181
1003
21
6
8.05%
68
1021
3
7
1.54%
13
939
85
I think this information in combination with the skip value can be a helpful tool for (better?) predicting numbers (number groups)....but still I have to do some tests using this information for my lottery game (6/45) if I can make better predictions than other methods I'm using now.
Soon I'll add the feature to tool to convert the draw results to number groups (groups of 2,3,4, etc, 10 numbers each).
I used numbers by position.
For example, for the digit 3 in the first position, my spreadsheet tells me that there is:
0.1 probability of a repeat in position
0.7 probability of a higher number in this position
0.44 probability of a number between 1-4, 0.27 between 5-9
2 & 4 are good next draw numbers, happening about 0.15 each
For the digit 3 in the second position, I get different results:
0.00 probability of repeat in position
probability near 1.0 of a higher number in this position
0.35 probability of a number between 10-14, 0.2 prob. of a number from 15-19
18 and 11 are the most common following numbers with 0.13 and 0.1 prob., respectively.
So, you can see that the position in which the number appears makes a difference in the following result.
"There is no such thing as luck; only adequate or inadequate preparation to cope with a statistical universe."
Economy class Belgium
Member #123,694
February 27, 2012
4,035 Posts
Offline
As you can see here, digit 7 is more likely followed by digit 8 than for example digit 4 ( and 2,3,7, etc.) for the 1131 tested pick 3 draw results.
You are referring to the past situation, where 8 followed 7 more often. Your statement that it is more likely that 8 follows 7 is incorrect. You mix up sample and population.
For pick 3 a balance is faster restored than for a lottery game like Power Ball. I posted followers for pick 3 several times and proved it. The difference for catching up with the average chance is mostly not leading to a net win, as the payout is made low, so that you loose, or risk a lot of money when betting, and eventually get a payback, instead of a big payout.
Netherlands
Member #3,476
January 24, 2004
212 Posts
Offline
Yes, you're right I made an incorrect statement about the likelihood of followers. I Googled on 'sample and population'...it's now more clear to me
"For pick 3 a balance is faster restored than for a lottery game like Power Ball" ==> In another post you stated it's all about timing. How many pick3 results did you test to calculate the followers probabilities and were you able to track the increase/decrease (differences) of the probabilities of the digits?
For example you have 10.000 pick 3 results to test. Each time you calculate the followers probabilities of 200 pick 3 result starting with draw result 1 up to draw result 200 (store the probabilities for this set). Next you do the same calculations but now for draw result 2 up to draw result 201 (store the probabilities for this set) and so on till the last set of 200 draw result is tested; draw result 9.801 up to draw result 10.000. Now compare the probabilities of all these sets and track their decreases/increases (and the fastness of the differences). So, the next question is, is it worth for me to build a tool doing such tests (referring to your experience of pick 3 fast balancing)?
Economy class Belgium
Member #123,694
February 27, 2012
4,035 Posts
Offline
I generally don't mix the subjects. You didn't mention the balancing, you stated that it stays unbalanced! Now you mix probabilities with counts. - I did such tests using Excel. What came out, like I posted it, in other threads, is that it is close to probability for the pick 3 that I searched in. P(STRAIGHT)=.001 AND PAYOUT(STRAIGHT)=500. If you double your chance with a condition that you stated, you might get: (CONDITIONAL)P(STRAIGHT)=.002.
Seeing the problem with lottery playing is a budget problem, you should look for predicting one straight P3 within less than 400 drawings.
The player mostly cannot raise the bets in a daily game, as regular and poor people don't have that kind of money.
Answer:
The bigger your researches become, the more events you have, the closer the result is likely to equal the expectancy. Just like as flipping a coin, you get closer to 50% head or tail, by flipping more often. You based your thinking on 8 times tail while that is 80% tail for ten flips but not for hundred, thousand or a million. Do the random tests with your random function. Run a loop for 10 power ( i ) events.
Possible count of outcomes for straight Pick 3 for ten drawings is: 100010. That is a one with thirty zeros. Your chance to get all ten right is 10 out of 100010.
Economy class Belgium
Member #123,694
February 27, 2012
4,035 Posts
Offline
Let's be real for a minute. State that lottery is having pick 3 outcomes like following:
000
000
000
000
000
000
What do you think will be the reaction of the lottery, the players, the press, the mathematicians and others?
Would the lottery close the game for investigation? Are you supposing that there is collusion? ...
Economy class Belgium
Member #123,694
February 27, 2012
4,035 Posts
Offline
I took the time to split 0 to 999 in four groups.
My trailer function fails with VBA for bigger data, so I had to do this differently.
Unfortunately Excel VBA isn't the best solution for methods.
Using a sub on four groups:
!32
507
!31
426
!23
385
!43
358
!13
322
!33
322
!22
234
!21
227
!12
225
!11
217
!34
132
!44
129
!24
119
!14
106
I cannot take the time to do more of this. Checking by games out for the groups, the maximum skips turn around 25 games for a probability of 25%.
That means you would have waited up to 29 bets to get a payout. 29*-250 +1*500 for the case you stuck on that group at the worst moment.
You did with VB or C#, that surely won't make mistakes.