Choose k objects out of n
ordered | unordered | |
---|---|---|
w/ replacement | nk | ??? |
w/o replacement | n(n−1)(n−2)…(n−k+1) | (nk) |
To complete our discussion of sampling, recall that of the four ways of sampling as shown above, all except the case of unordered, with replacement follow immediately from the multiplication rule.
Now the solution is (n+k−1k), but let's see if we can prove this.
We start off with some simple edge cases.
If we let k=0, then we are not choosing anything, and so there is only one solution to this case: the empty set. let k=0⇒(n+0−10)=(n−10)=1
If we let k=1, then there are n ways we could select a single item out of a total of n. let k=1⇒(n+1−11)=(n1)=n
Now let's consider a simple but non-trivial case. If we let n=2, then let n=2⇒(2+k−1k)=(k+1k)=(k+11)=k+1
Here's an example of n=2,k=7:
But notice that we are really doing here is placing n−1 dividers between k elements. Or in other words, we are choosing k slots for the elements out of n+k−1 slots in total.
And we can easily build on this understanding to other values of n and k.
And the number of ways to select k items out of n, unordered and with replacement, is:
choose k out n items, unordered, with replacement=(n+k−1k)=(n+k−1n−1)
A story proof is a proof by interpretation. No algebra needed, just intuition.
Here are some examples that we have already come across.
Choosing k elements out of n is the same as choosing n−k elements out of n. We've just seen this above!
Imagine picking k people out of n, and then designating of the k as president. You can either select all k people, and then choose 1 from among those k. Or, you can select a president, and then choose the remaining k−1 out of the n−1 people.
Suppose you had m boys and n girls, and you needed to select k children out of them all. You could do this by first choosing j out of the m boys, and then choosing k−j of the girls. You would have to apply the multiplication rule to get the total number of combinations, and then sum them all up. This is known as Vandermonde's identity.
Now we move from the naïve definition of probability into the more abstract and general.
Let S be a sample space, the set of all possible outcomes of some experiment. S might not be finite anymore, and all outcomes might not be equally probable, either.
Let A be an event in, or a subset of, S.
Let P be a function that maps an event A to some value from 0 to 1.
And we have the following axioms:
P(∅)=0P(Ω)=1
The probability of the empty set, or a null event, is by definition 0.
The probability of the entire space is by definition 1.
These are the 2 extremes, and this is why Prof. Blitzstein lumps them together in one rule.
P(∞⋃n=1An)=∞∑n=1P(An)⟺A1,A2,...An are disjoint (non-overlapping)
Every theorem about probability follows from these 2 rules. You might want to have a look at Kolmogorov's axioms.
View Lecture 2: Story Proofs, Axioms of Probability | Statistics 110 on YouTube.