# How to calculate lotto winnings?

There is a game similar to Keno, where 10 are selected from 40 numbers.

A player can choose his own set of a maximum of 10 numbers and, depending on the number of selected and guessed numbers, his bet is multiplied by a different factor.For example, the player chose 3 numbers.Then his chances are:
• guess 0 numbers: 41,093%
• guess the 1st number: 44.028%
• guess 2 numbers: 13,664%
• guess 3 numbers: 1.215%

For each of the outcomes, we consider the coefficient using the formula `100/probability`.It turns out:
• if you guessed 0 numbers: 0
• if you guessed 1 number: 2.271
• if you guessed 2 numbers: 7,319
• if you guessed 3 numbers: 82,305

But with such ratios, the"casino" turns out to be a big loser.For example, 100 players bet \$1.Of them, according to probability, 1 number will win 44.028 and be picked up, at a rate of 2.271 `2.271 * 44.028=\$99.9` - i.e., the whole prize fund is already.And 2 and 3 more numbers will guess - there, too, each option spends \$100.Of this, payments are 3 times higher than the bets made.

How to calculate the odds so that “casino"Remained in the black, and did the rates reflect the real probability of winning?

Also tell me, please, the literature about this kind of games and their mathematics: both probabilistic and financial.

10 out of 40 is randomly chosen by the car, 3 out of 40 is chosen by the player.It is necessary, for example, to find the probability of dropping just 2.

The total number of cases `C(10,40) * C(3,40)` - we divide into it the number of favorable options.This is the choice of 10 winning C(10.40);from 10 you must choose 2 hits C( 2.10);from the remaining 30, you must choose 1 Overshot C(1.30) and multiply them all.Total
``Q(40,10,3,2)=C(10.40) * C(2.10) * C(1.30)/(C(10.40) * C(3 , 40))``
Surely you can pretty well cut something.

C(N, M) - the number of combinations
` C(N, M)=M!/(N! *(M-N)!)`
• Gains at the rate won by

You can not charge for these factors.
– Nice64 Jul 25 '18 at 17:07
• [[miki131]] why? For example, with a probability of 50%, the ratio will be 2.All honest. – Vivacious Vendace Jul 25 '18 at 17:16
• [[sergiks]], let's explain with an example.
As I wrote in the question, if you select 3 numbers, then the chance that all these 3 numbers will be 1.215% in the final “ten”.The coefficient in this case will be x82.305.
This coefficient only works if there are only 2 outcomes of the game - I guessed 3 numbers and did not guess.
Do you understand?
– Nice64 Jul 25 '18 at 17:22
• [[miki131]], the coefficients take into account both the number of versions indicated and the number of guessed ones.

That is, for guessing 2 numbers, the coefficients will be different when betting on 3 numbers and, say, on 5.Most of all, of course, if you bet only 2 numbers, and both won.
– Vivacious Vendace Jul 25 '18 at 18:11
• [[sergiks]],
coefficients take into account both the number of versions indicated and the number of guessed ones.

I understand that.For example, I made the player choose 3 numbers.
But what will they be? How to count them?
– Nice64 Jul 25 '18 at 18:17
• [[miki131]], 10 of 40 randomly chooses a car, 3 of 40 chooses a player.For example, you need to find the probability of dropping just 2.

The total number of cases `C(10.40) * C(3.40)` - we divide into it the number of favorable options.This is a choice of 10 winning C(10.40) out of 10, you must choose 2 hits C(2 , 10) out of the remaining 30, you must choose 1 Overshot C(1.30) and multiply.Total
``````Q(40,10,3,2) =
C(10.40) * C(2.10) * C(1.30)/(C(10.40) * C(3.40))``````
You can certainly shorten something then.

Delivered this comment in response.
– Vivacious Vendace Jul 25 '18 at 18:51
• [[sergiks]], you wrote a formula for calculating odds.
I need on the basis of these chances to count the coefficients.
– Nice64 Jul 25 '18 at 19:36
• [[miki131]], 100/chance – Vivacious Vendace Jul 25 '18 at 19:37
• [[sergiks]], right, these will be coefficients for a game in which there are only 2 outcomes - guessed or not guessed. – Nice64 Jul 25 '18 at 19:39
• [[miki131]], yes no.This is also the case for the case when the bet is made – Vivacious Vendace Jul 25 '18 at 20:11
• Possible outcomes of do not intersect: either guesses 0, or 1, or..., or N.Each option has its own probability=>its coefficient.The probabilities of all outcomes add up to 1.Tasks are discrete.Each specific outcome can be isolated and put in a separate box.It remains to recount these boxes.1 red box “guessed 3 out of 3”, 2 yellow “2 out of 3”, 3 green “1 out 3", 4 blacks" did not guess a single one."Everything is all possible outcomes at all, there are no others(numbers are fictitious).In the sum of 10 possible outcomes.The probability of red is 1/10, and the bet on it is taken with a coefficient.1/(1/10)=10: 1, on yellow, whose probability is higher, coefficient 5: 1.On green 3.33.On black it would be 2.5, but this is a winning institution. – Vivacious Vendace Jul 25 '18 at 21:04