Markov chains in lottery

Lucas

Member
Hello there !

I am trying to write a program that predicts the next combination in a 6/49 lottery game, using Markov chains. The problem is I can't figure out how to define the state space.
If you consider a state as one of the C(49,6) possible combinations, then you get a C(49,6) by C(49,6) transition matrix which is impossible to store in memory. That is, if you use the lexicographical order of combinations.

Another possibility would be to have 2 Markov chains as follows :

P1(i,j) = P( j will be extracted at combination n+1, given that i was extracted at combination n)

and

P2(i,j) = P( j will be extracted at combination n, given that i was extract at the same combination, n)

So you have two transition matrixes with 49x49 elements each which is small enough. Now the question is how can I relate the two stochastic matrixes in order to find out what the next combination would be ?

Hope to hear from you soon !

:wavey:
Lucas
 

Lucas

Member
Markov chains in lottery (continued)

Hello again !

I think I found a way of mixing the two Markov chains in order to predict the next combination.
First consider these probabilities :

P1(i,j) = P( ball j is extracted at combination n+1, given that the ball i was extracted at combination n)

and

P2(i,j) = P(ball j is extracted after ball i in the same combination)

Now, consider the latest combination :

C(n) : a1, a2, a3, a4, a5, a6

and you want to predict the next one.

For this, consider X(n) the probabilistic distribution of numbers at combination n :

| 1 2 3 ... a1... a2 ... a3 ... a4 ... a5 ... a6 ... 49 |
X(n) = | |
| 0 0 0 ... 1/6.. 1/6...1/6....1/6....1/6....1/6.... 0 |

I consider p(a1)=p(a2)=...=p(a6) because they all contribute equally to the next outcome.

Now, using the first markov chain, you get the following distribution :

X(n+1) = X(n) * P1

Now let's say b1, b2, b3, b4, b5, b6 are the numbers to predict.
And now take
b1 = the number with the maximum probability in the distribution of X(n+1).
This is the first number in the combination we try to find out.

Now, using the second Markov chain, we get the other 5 numbers : b2, b3, b4, b5, b6.
But the method is a little different :

First, let's say Y(n) = the distribution of the combination at moment n. Then, we have Y(1) : b1=100% the initial distribution.

Then you calculate Y(2) = Y(1) * P2 and choose b2 as the maximum from the resulting distribution multiplied by its corresponding value in distribution of X(n+1). (This is the tricky part) Now you have b2.
To find b3, you follow the same algorithm : Y(3) = Y(2) * P2, and so on, until you come up with all the six numbers.

This is all. Hope to hear from you soon !

:dizzy:
Lucas
 

Lucas

Member
Does anybody have a better idea ?

Hi there !

Well, I gave my method of predicting the next combination at lottery, but nobody posted any reply. Is it because it is too good or because it is too bad ? One way or the other, I would like to know your suggestions.

:wavey:
Lucas
 

mirage

Member
Markov chains

Lucas,

Try reposting your question(s) in sub-forum Questions and Answers . You might get better results there. (Or maybe LT can move this thread there?)
Good Luck!
 

peter

Member
Re: Does anybody have a better idea ?

Lucas said:
Hi there !

Well, I gave my method of predicting the next combination at lottery, but nobody posted any reply. Is it because it is too good or because it is too bad ? One way or the other, I would like to know your suggestions.

:wavey:
Lucas
I'm not a math professor, it sounds impressive, I'd like to hear the thoughts of some of the more math inclined members.
I'd also like to see you post your best bet or best pair.:wavey:
 

thornc

Member
???
two posts about the same thing!
I replied under the Strategies forum!

There is where this should be discussed!!!
 

Sidebar

Top