The premise of all lottery matrix is randomness, else the game will be biased. Even if you assume the game is not random, any algorithm you come with will be purely a guess work.
I still haven't seen anyone offer proof that lotteries are pure random events, what all you people say is just your belief that it is pure random and those that attempted to predict using faulty approaches (AI, NN etc) conclude faulty results as well.
The keyword to your answer or proof is PREDICTION, am certain of 2+2=4, am certain of the linear equation x=y but am not certain of univariate x assuming different multivariate identities Y1....Yn. The ideal of testing on 'prior' should be questioned, since x and y are mutually exclusive. Let say a new lottery is introduced in your state with the matrix 8/49, how do wage from the get-go without 'priors'. Lottery is not weather forecasting or population census.If you think lottery is not random then try " forward-testing' your algorithm instead of 'Back-testing'.