EuroMillions Lottery

Statistics Visualization with shiny and googleVis

Victor Ruiz

What is this application for?

  • Visualize frequencies and relative frequencies of numbers drawn in Euromillions lottery.

  • Compare the experimental relative frequencies with the theoretical probabilities.

  • Learn how to use shiny and googleVis API to build an interactive application and visualize data.

  • Build a data product for 'Developing Data Products' course, within Coursera Data Science Specialization.

Theoretical probabilities

  • Every remaining ball in the pool is equally as likely to occur as all the other balls in the pool: uniform distribution

  • In every draw, five main numbers are picked without replacement, therefore the probability of one ball to be picked in a draw is:

1/50 + 1/49 + 1/48 + 1/47 + 1/46
## [1] 0.1043

Two additional balls are picked every draw from the stars pool. The probability of one star to be in the winning numbers is:

1/11 + 1/10
## [1] 0.1909

Relative frequency

  • The relative frequency of an event is defined as the number of times that the event occurs during experimental trials, divided by the total number of trials conducted.

  • For an arbitrary number, the relative frequency is calculated as: \[\frac{frequency}{number\quad of\quad draws}\]

  • For a high number of trials, the relative frequencies of every number should converge to a limit given by the theoretical probability.

Experimental relative frequencies

  • 14 numbers below the experimental mean, 0.1, 36 over the mean.

  • 36 numbers fall within one standard deviation and all are within two standard deviations.

  • The relative frequency of most often picked number, 50, is 72% higher than the value for the least often picked, 46.

relative frequencies