Basically to know the odds of winning x number of games out of y total games, you would multiply two quantities:
1) The odds of winning all games
2) The sum of the likelihood of losing all the games you need to lose divided by the likelihood of winning those games for each combination that satisfies your criterion of losing y - x games.
That second quantity might not be totally clear so I'll go into more detail. Basically if you have four games and you want to know the probability of winning three of them, you first enumerate the ways you can win three. In this case that is easy. You either lose game 1, 2, 3, or 4. So that second term would be the prob of losing game 1 divided by the prob of winning game 1 plus the prob of losing game 2 divided by the prob of winning game two plus the same for game3 plus the same for game 4. If it were the probability of winning two games out of four, now the games you need to lose come in combinations. There are 6 of them. For example, you could lose games 1 and 2. So the contribution to the sum in part 2 above for that particular combination would be (prob of losing 1*prob of losing 2)/(prob of winning 1*prob of winning 2). There would be a term in the sum for each of the six combinations of games you must lose to satisfy the condition of winning 2 of four games.
To write out the math, lets say we have a 4 game season and we want to know the probability of winning three games.
First, how many combinations is that. The answer is 4 choose 3, which is 4.
If the probability of winning game 1 is w1 and the probability of losing is l1, then the probability of winning three of four games is:
P3(4) = w1w2w3w4 * ( l1/w1 + l2/w2 + l3/w3 + l4/w4 )
On the other hand if we want to know the probability of winning 2 of 4 games, then the number of combinations is 4 choose 2, or 6. We can enumerate those as losing the following combinations, 1,2 ; 1,3 ; 1,4 ; 2,3 ; 2,4 ; 3,4. The probability becomes:
P2(4) = w1w2w3w4 * ( l1l2/w1w2 + l1l3/w1w3 + l1l4/w1w4 + l2l3/w2w3 + l2l4/w2w4 + l3l4/w3w4 )
Now, if your question is what is the probability of winning at least x games of y games, then you would just use:
P of winning at least x games of y is equal to: Sum from i = x to i = y of Pi(y)
Or, using the previous example, the probability of winning at least 2 is: P2(4) + P3(4) + P4(4).
To give actual numbers, if there are four games and the the probabilities of winning are .2, .8, .3, and .9, then :
The prob of winning two games is 50.2%.
The prob of winning three games is 28.9%.
Note that this form should work for all numbers of games.
If it is the prob of winning one game then the terms in the sum look like l1l2l3/w1w2w3 ... Three terms per combination because you would have to have three losses.
The prob of winning zero games becomes w1w2w3w4 * (l1l2l3l4/w1w2w3w4), which reduces to the the obvious l1l2l3l4.
The prob of winning 4 games is just w1w2w3w4 since there are no losing combinations to sum over in the second portion of the probability equation.
This should be fairly straightforward in a spreadsheet but I don't like that you have to enumerate all combinations. To make sure you get them all use the following equation.
N choose r is n!/(r!(n-r)!).
Last edited by TennTradition; 06-05-2014 at 07:09 AM.
This is actually done analytically very easily by writing some code. The nice thing is the combination sets are the same for everyone as long as they play the same number of games. All you need to do is define the probabilities you want at that point.
I smell an 8th maxim widget.
Bajakian must be dealt with.
*But, man, I wish I still had Matlab.
My contribution to this thread:
It's less clever and more brute force, but nested for loops with logic in between might get you there. Basically populating the combination with zeros and ones for wins and losses for each x of y game scenario then ripping through the math using for loops from there (which is the most straightforward part).
Sorry I am late to the party, as I was asleep through the whole thing. Because it involves combinatorial numbers, it can get a bit hairy. It is not as easy as just getting a mean games won and going with a bell curve and standard deviations, if I am not mistaken, because each game has a different weight to it.
And my studies were not in probabilities (only took a couple of courses on it). So I would trust someone else in this matter. I think TennTradition is who you want in this case.
Also, it has been 20 years and my work has involved zero mathematics since then, much to my sadness. I didn't want to get an advanced degree (lazy) and didn't want to crunch actuarial tables all day (boring), so I went into computer systems administration.
Just did a quick google because generating the unique n choose r combinations should be a common request. Found this, but I haven't read in detail.
One other note KB, I derived this assuming non-zero probabilities of winning because I'm a damn optimist. This simplified form will require you to at least give us a shot of winning.
And yes, python and an interpreter do come pre-installed on Macs.