Abstract
At each end year, the Brazillian lottery makes a sortition called “mega da virada”. Generally, this sortition has the most value among the Brazilian lottery sortition. In this sortition, the player chooses six random numbers distributed from 1 to 60. The player can choose from a six-number bet to a fifteen-number bet. The price of the minimum bet is R$ 4,50, and the value of the maximum bet is R$ 22.522,50. Knowing the values of the bets, is it worth it to play in “mega da virada”?To answer, we need to use some definitions of probability and statistics. First, the universe of the problem is the set \(\upsilon \in \{1,60\}\). Second, the probability of hitting a number among the chosen ones is 1/60, this is:
prob <- c()
for(i in 1:60){
prob[i] <- 1/(61-i)
}
plot(1:60, prob, type = "l", col = "red", xlab = "Numbers", ylab = "Probability")
The probability of getting the six numbers right is given by the following relationship:
\[P = \prod_{i = 1}^{N} \frac{1}{p_i}*N !\]
Where \(N\) represents the number of dozens choosed. For a six-number bet, the probability of getting the six options right is:
\[\begin{equation} \begin{aligned} P &= \prod_{i = 1}^{6} \frac{1}{p_i}*6 !\\ & = \frac{1}{60}*\frac{1}{59}*\frac{1}{58}*\frac{1}{57}*\frac{1}{56}*\frac{1}{55}* 6! \end{aligned} \end{equation}\]
What is equivalent to:
(1/60)*(1/59)*(1/58)*(1/57)*(1/56)*(1/55)*factorial(6)
## [1] 1.997449e-08
Or:
p <- 1/((1/60)*(1/59)*(1/58)*(1/57)*(1/56)*(1/55)*factorial(6))
print(sprintf("1 em cada %s", format(p, scientific = FALSE)))
## [1] "1 em cada 50063860"
For bets with more numbers the probability of winning the prize is:
prob = function(n, p){factorial(n)/(factorial(p)*factorial(n-p))}
probability <- c()
for(i in 6:15){
if(i == 6){
probability[i-5] <- prob(n = 60, p = 6)
}else{
probability[i-5] <- prob(n = 60, p = 6)/(factorial(i)/(factorial(6)*factorial(i -6)))
}
}
plot(6:15, 1/probability, type = "l", col = "red", xlab = "Number of tens", ylab = "Probability")
For a business to be really advantageous, the product between the probability of success and the return of success must be greater than the amount invested, that is:
\[P(x)* premium > 4.50\]
This indicates that for it to be worthwhile to play the lottery with a six-number bet it is necessary that:
\[\begin{equation} \begin{aligned} premium &> \frac{4.50}{P(x)}\\ & > 225.287.370,00 \end{aligned} \end{equation}\]
This value is the same for the other numbers of tens chosen.
Betting on the Brazilian mega sena is only a good deal if the value of the prize is greater than R$ 225.287.370,00.