What is the probability of a seredipitous encounter with a friend? Imagine you are live in an area with a large general population (e.g., Stanford with 17,000 students). A small subset of the population are friends. What are the chances that you run into at least one friend if you see a handful of people from the population? Assume that seeing each person from the population is equally likely.
The probability that you see at least one friend is:
First lets define some useful terms: $n$ = total population = $k$ = people seen = $r$ = num friends =
Since each way of seing $s$ people is equally likely, we can use the "Equally Likely Events" probability calculation:
$P(E) = \frac{|E|}{|S|}$
One way to approach this problem is to directly count all ways you see 1 or more friends. That is hard. You would have to count the ways you could see exactly one friend, then exactly two friends and so on. It is much easier to calculate the ways that you see zero friends. If we can calculate the probability of seeing zero friends our answer is just one minus that number.
Let the sample space ($S$) be the set of ways that you could see $k$ people. The size of the sample space is: the total population $n$ choose the number of people seen, $k$.
The event space ($E$) is the set of ways that you could see no friends. The size of the event space is: the number of non friends (aka population $n$ $-$ friends $r$) choose the number of people seen, $k$.
Thus the probability of not seeing a friend is:
$\text{prob(not seen)} = \frac{ \left( {\begin{array}{*{20}c} n - r \\ k \\ \end{array}} \right) } { \left( {\begin{array}{*{20}c} n \\ k \\ \end{array}} \right) } $
Now the probability that you see at least one friend is 1 minus the probability that you see no friends.
$\text{prob(seen)} = 1 - \frac{ \left( {\begin{array}{*{20}c} n - r \\ k \\ \end{array}} \right) } { \left( {\begin{array}{*{20}c} r \\ k \\ \end{array}} \right) } $
That is equal to