Keno

From Opasnet
Jump to: navigation, search



Keno is a lottery gambling game where 20 balls are drawn from an urn with 70 numbered balls. A player has a ticket with 2 - 10 numbers, and the prize depends on how many numbers are correct. The actual odds for winning can be computed with the Analytica code, which is explained in more detail in the Finnish Wikipedia.

<anacode> index crosses:= 2..10; index right:= 0..10; var balls:= 70; var draws:= 20; var P_right:= factorial(crosses)/factorial(crosses-right) / (Factorial(balls)/factorial(balls-right)); var P_wrong:= factorial(balls-crosses)/factorial(balls-crosses-(draws-right)) / (factorial(balls-right)/factorial(balls-draws)); var a:= P_right*P_wrong*(factorial(draws) / (factorial(right)*factorial(draws-right))); (1-a)/a </anacode>