The simple case for combinations is when we have equal probabilities of any event, like a coin toss. The probability of getting 2 heads in 5 tosses is simply the number of ways to get two heads $\binom{5}{2}$ divided by the number of possible outcomes $2^5$ or $10/100 = 10\%$. If the probabilities are unequal, we need a slightly different approach. These examples demonstrate a few problems you might face. ## Probability of answering multiple choice questions correctly Say a multiple choice test has 5 possible answers for each question. The chance of getting any one right by chance is 1/5. What is the probability of getting exactly 14 correct? $P(14 correct) = \binom{20}{14} * \frac{1}{5}^{14} * \frac{4}{5}^{(20 - 14)}$ Essentially this is the probability of getting 14 correct and 6 incorrect times the number of ways to do that (i.e., get the first 14 correct, miss the first one and get the next 14 correct, etc.). Why is $\binom{20}{14}$ the number of ways to get 14 correct? It's the number of ways to select 14 from 20 without replacement where order doesn't matter. In this case, we are reducing the problem to a binary outcome, right or wrong. 14 rights in a row and 6 wrongs in a row will count, as would 1 wrong, 14 rights, and 5 more wrongs, etc. Imagine that we study and thereby affect the probabilities of getting each question correctly. Imagine we are sure we have a 90% chance of getting any question correct. Now the probability of getting exactly 14 is much higher. $P(14 correct) = \binom{20}{14} * 0.9 ^ {14} * 0.1 ^ {6}$ ## Probability of selecting a team with mostly women Let's say you have 12 women and 9 men from which to choose a team of 5. What is the probability of getting exactly 3 women? Here the problem is made more complex because the probabilities change as people are selected. There are two ways to approach this problem. The first involves calculating the probabilities for each permutation, while the second involves combinations and is more elegant in my opinion. However, they resolve to the same solution and this provides some insight into the problem. ### From permuations First, let's take a brute force approach to calculate the probability of a team with each possible permutation of three women and two men. First, let's consider how many ways there are to arrange 3 women and two men $\binom{5}{3}$. *Note that we could also calculate $\binom{5}{2}$ which by the symmetry of the binomial coefficient we know to be the same as $\binom{5}{3}$.* ```R choose(5, 3) > 10 ``` Let's use `1` to represent a women and `0` to represent a man, where a team consisting of three women selected and then two men selected would be `p.11100`. We could enumerate the probabilities of each team in this way. Note we are updating the numerator and denominator each time we select a team mate with respect to whether we selected a woman or a man. ```R no.women = 12 no.men = 9 no.total = no.women + no.men p.11100 = (