780 CHAPTER 38. PROBABILITY
random variable takes values in some subset of the integers. The following two examplesconsider situations where X can only take finitely many values.
Example 38.7.1 Let an experiment be performed n times. Each time the experiment isperformed, the probability of a “success” is p and the probability of a “failure” is q, p+q = 1. Then let X be the number of successes in the n experiments. The probability thatX = k, P(X = k) is (
nk
)pkqn−k
A distribution of this sort is called a binomial distribution.
Example 38.7.2 Let k ≤ m < N. If X is a random variable such P(X = j) , j ≤ k, is givenby
P(X = j)≡
(mj
)(N−mk− j
)(
Nk
)this is called a hypergeometric distribution. This is when you have m marked fish and youtake a sample of k fish. Then X is the number of marked fish you get in your sample of kfish. The probability it equals j is given by the above. Thus as explained in Problem 18 onPage 778,
k
∑j=0
(mj
)(N−mk− j
)(
Nk
) = 1
There are
(mj
)(N−mk− j
)ways to get exactly j marked fish from a sample of k
fish. You have
(mj
)ways to get j marked fish from the set of m marked fish and for
each of these, there are exactly
(N−mk− j
)ways to fill the set of k fish with non marked
fish. Thusk
∑j=0
(mj
)(N−mk− j
)=
(Nk
)where the last is the total number of ways of selecting k fish from the N fish. Thus theabove claim is verified.
Now sometimes a random variable can take values from the set of all nonnegative in-tegers. Suppose you have a binomial distribution in which the probability of a success isextremely small and the number of trials is very large. Say pn = λ where n is large. Thenthe probability of success in the n trials is
P(X = k) =
(nk
)(λ
n
)k(1− λ
n
)n−k