February 12, 2017

Texas Lotto Numbers Generator

This is a quick numbers generator for the Texas Lottery. To play the Texas Lotto, particiants must choose 6 separate numbers between 1 and 54. This application provides 3 generation options.

Generator Options

Below are the random generation options for 'My Texas Lotto Numbers Generator':

  • Basic random generation
  • Random generation based upon what numbers has been generated the most
  • Random generation based upon what numbers has been generated the least

Basic Random Generation

This option just randomly generates a list of 6 numbers between 1 and 54.

rand1 <- sample(1:54, 6, replace = F)
rand1
## [1] 47 13 12 18  6 43

Weighted Generation Option

This option generates a list of 6 numbers from the list of the top 21 most generated numbers based on the Texas Lotto website. Below is the url to the most frequently winning numbers in the Texas Lotto: http://www.txlottery.org/export/sites/lottery/Games/Lotto_Texas/Number_Frequency.html

Below is the general idea of the algorithm. For this example, let's assume 1-21 is the most frequently winning numbers in the Texas Lotto:

rand1 <- sample(1:21, 6, replace = F)
rand1
## [1]  3  7 13  9  2 16

Conclusion

This strategy allows the participants to chose 6 numbers that they think will be more likely be selected based upon the history of their selection. Either they were or weren't selected as much in the past and they chose from that pool to more likely hit more winning lotto numbers.