I have been building a JavaScript engine that calculates possibilities. Following this post about odd and even numbers, I would like to ask what is the formula that produces the possible combinations and probability if we choose e.g. 8 numbers in 45/5 game.
(e.g. the possible combinations in 45/5 game are 1.221.759, and if I choose 3 odd numbers out of 23 in [1-45] range and 2 even from the rest 22, it gives a total of 409.101 combinations, that is 33.48% of the total. But what if I want to choose 8 or 10 numbers (let's say 5 odd and 5 even) in the same 45/5 game? I am searching for the formula that produces the percentage of playing more numbers than the absolutely required.)
Thanks in advance :) Daniel