PROBABILITY AND STOCHASTIC PROCESS 21
3. Some special random variables
3.1. Bernoulli and binomial random variables. Suppose that in an experiment, the out-
come is classified as either success or a failure. Define a random variable X as
(
1 if the outcome is success
X=
0 if the outcome is failure .
Then the probability mass function of X is given by
p(0) = P(X = 0) = 1 − p,
(3.1)
p(1) = P(X = 1) = p ,
where p, 0 < p < 1 is the probability that the trial is a success.
Definition 3.1. A random variable X is said to be a Bernoulli random variable if its probability
mass function is given by (3.1) for some p ∈ (0, 1).
Definition 3.2 (Binomial distribution). A random variable X is said to be a binomial distri-
bution is parameters n and p, denoted as X ∼ B(n, p) if its probability mass function is given
by
(
n i n−1 if i = 0, 1, . . . , n
p(i) = i p (1 − p) (3.2)
0, otherwise
Binomial random variable basically denotes the number of success achieved after carrying out
n independent repetitions of the experiment. The distribution function is given by
i
X n k
P(X ≤ i) = p (1 − p)n−k i = 0, 1, . . . , n .
k
k=0
Example 3.1. A fair coin is tossed eight times. What is the probability of obtaining
a) less that 4 heads, b) more than five heads.
Solution: Let H denotes the number of heads. Then H ∼ B(8, 0.5). Now
3
X 1 8 8 8 93
P(H ≤ 3) = P(H = i) = 8 1 + + + = ≈ 0.363 ,
2 1 2 3 256
i=0
8
X 1 8 8 37
P(H > 5) = P(H = i) = 8 1 + + = ≈ 0.1445 .
2 6 7 256
i=6
Properties of binomial random variable: We calculate the expectation, variance of X ∼
B(n, p). Observe that
n n
k n n i−1
X X
k i n−i k−1
E[X ] = i p (1 − p) =p i i p (1 − p)n−i
i i
i=0 i=1
n n−1
k−1 n − 1 k−1 n − 1
X X
i−1 n−i
= np i p (1 − p) = np j+1 pj (1 − p)n−1−j
i−1 j
i=1 j=0
k−1
= npE[(Y + 1) ],
where Y ∼ B(n − 1, p). Hence for k = 1, we have E[X] = np. For k = 2,
E[X 2 ] = npE[Y + 1] = np{(n − 1)p + 1} .
Therefore, the variance of X is given by
2
Var(X) = E[X 2 ] − E[X] = np(1 − p) .
, 22 A. K. MAJEE
Remark 3.1. If X ∼ B(n, p), then for any 0 ≤ k ≤ n,
(n − k + 1)p
P(X = k) = P(X = k − 1) =⇒ P(X = k) ≥ P(X = k − 1) ⇔ (n − k + 1)p ≥ k(1 − p)
k(1 − p)
Hence, P(X = k) first increases monotonically and then decreases monotonically, reaching its
largest value when k is the largest integer less than or equal to (n + 1)p.
Example 3.2. A baised die is thrown 30 times and the number of sixex seen is eight. If the die
is thrown a further 12 times, find
a) the probability that a six will occur exactly twice, b) the expected number of sixes,
and c) the variance of the number of sixes.
8
Solution: Let X be defined by ” the number of sixes seen in 12 throws”. Then X ∼ B(12, 30 ).
The probability that a six will occur exactly twice equals to P(X = 2). Therefore,
12 4 2 11 10
a) P(X = 2) = ≈ 0.211 ,
2 15 15
4 4 11
b) E[X] = np = 12 × = 3.2 , c) Var(X) = np(1 − p) = 12 × × ≈ 2.347 .
15 15 15
Example 3.3. For a binomially distributed random variable X with mean 6 and variance 4.2,
find P(X ≤ 6).
Solution: Let X ∼ B(n, p). From the given conditions, we have 6 = np and 4.2 = np(1 − p).
Solving these, we have n = 20 and p = 0.3. Hence X ∼ B(20, 0.3). Therefore,
6 6
X X 20
P(X ≤ 6) = P(X = i) = (0.3)i (0.7)20−i ≈ 0.6080 .
i
i=0 i=0
3.2. Poisson random variable. A non-negative integer valued random variable X is said to
be a Poisson random variable with parameter λ > 0, denoted as X ∼ P(λ), if probability mass
function is given by
λi
p(i) = P(X = i) = e−λ i = 0, 1, . . .
i!
The Poisson random variable has a wide range of applications in diverse areas, For example, the
number of misprints on a page of a book, the number of phone calls received by a call center
follows a Poisson distribution. The Poisson distribution is actually a limiting case of a binomial
distribution when the number of trials n gets large and the probability of success p is small. To
see this, let X ∼ B(n, p). Set λ = np. Then
i
λ n−i n(n − 1) . . . (n − i + 1) λi
n i n−i n λ λ n−i
P(X = i) = p (1 − p) = i
1 − = i
1−
i i n n n i! n
For large n and keeping λ and i fixed, we see that
n(n − 1) . . . (n − i + 1) λ −i λ n
≈ 1, 1− ≈ 1, 1− ≈ e−λ .
ni n n
Therefore, we have
λi
P(X = i) ≈ e−λ .
i!
Example 3.4. A factory produces nails and packs them in boxes of 400. If the probability that
a nail is substandard is 0.005, find the probability that a box selected at random contains at most
two nails which are substandard.
Solution: Let X denotes the number of substandard nails in a box of 400. Then X ∼ B(n, p)
with n = 400 and p = 0.005. Since n is large enough and p is small, we can use Poisson
3. Some special random variables
3.1. Bernoulli and binomial random variables. Suppose that in an experiment, the out-
come is classified as either success or a failure. Define a random variable X as
(
1 if the outcome is success
X=
0 if the outcome is failure .
Then the probability mass function of X is given by
p(0) = P(X = 0) = 1 − p,
(3.1)
p(1) = P(X = 1) = p ,
where p, 0 < p < 1 is the probability that the trial is a success.
Definition 3.1. A random variable X is said to be a Bernoulli random variable if its probability
mass function is given by (3.1) for some p ∈ (0, 1).
Definition 3.2 (Binomial distribution). A random variable X is said to be a binomial distri-
bution is parameters n and p, denoted as X ∼ B(n, p) if its probability mass function is given
by
(
n i n−1 if i = 0, 1, . . . , n
p(i) = i p (1 − p) (3.2)
0, otherwise
Binomial random variable basically denotes the number of success achieved after carrying out
n independent repetitions of the experiment. The distribution function is given by
i
X n k
P(X ≤ i) = p (1 − p)n−k i = 0, 1, . . . , n .
k
k=0
Example 3.1. A fair coin is tossed eight times. What is the probability of obtaining
a) less that 4 heads, b) more than five heads.
Solution: Let H denotes the number of heads. Then H ∼ B(8, 0.5). Now
3
X 1 8 8 8 93
P(H ≤ 3) = P(H = i) = 8 1 + + + = ≈ 0.363 ,
2 1 2 3 256
i=0
8
X 1 8 8 37
P(H > 5) = P(H = i) = 8 1 + + = ≈ 0.1445 .
2 6 7 256
i=6
Properties of binomial random variable: We calculate the expectation, variance of X ∼
B(n, p). Observe that
n n
k n n i−1
X X
k i n−i k−1
E[X ] = i p (1 − p) =p i i p (1 − p)n−i
i i
i=0 i=1
n n−1
k−1 n − 1 k−1 n − 1
X X
i−1 n−i
= np i p (1 − p) = np j+1 pj (1 − p)n−1−j
i−1 j
i=1 j=0
k−1
= npE[(Y + 1) ],
where Y ∼ B(n − 1, p). Hence for k = 1, we have E[X] = np. For k = 2,
E[X 2 ] = npE[Y + 1] = np{(n − 1)p + 1} .
Therefore, the variance of X is given by
2
Var(X) = E[X 2 ] − E[X] = np(1 − p) .
, 22 A. K. MAJEE
Remark 3.1. If X ∼ B(n, p), then for any 0 ≤ k ≤ n,
(n − k + 1)p
P(X = k) = P(X = k − 1) =⇒ P(X = k) ≥ P(X = k − 1) ⇔ (n − k + 1)p ≥ k(1 − p)
k(1 − p)
Hence, P(X = k) first increases monotonically and then decreases monotonically, reaching its
largest value when k is the largest integer less than or equal to (n + 1)p.
Example 3.2. A baised die is thrown 30 times and the number of sixex seen is eight. If the die
is thrown a further 12 times, find
a) the probability that a six will occur exactly twice, b) the expected number of sixes,
and c) the variance of the number of sixes.
8
Solution: Let X be defined by ” the number of sixes seen in 12 throws”. Then X ∼ B(12, 30 ).
The probability that a six will occur exactly twice equals to P(X = 2). Therefore,
12 4 2 11 10
a) P(X = 2) = ≈ 0.211 ,
2 15 15
4 4 11
b) E[X] = np = 12 × = 3.2 , c) Var(X) = np(1 − p) = 12 × × ≈ 2.347 .
15 15 15
Example 3.3. For a binomially distributed random variable X with mean 6 and variance 4.2,
find P(X ≤ 6).
Solution: Let X ∼ B(n, p). From the given conditions, we have 6 = np and 4.2 = np(1 − p).
Solving these, we have n = 20 and p = 0.3. Hence X ∼ B(20, 0.3). Therefore,
6 6
X X 20
P(X ≤ 6) = P(X = i) = (0.3)i (0.7)20−i ≈ 0.6080 .
i
i=0 i=0
3.2. Poisson random variable. A non-negative integer valued random variable X is said to
be a Poisson random variable with parameter λ > 0, denoted as X ∼ P(λ), if probability mass
function is given by
λi
p(i) = P(X = i) = e−λ i = 0, 1, . . .
i!
The Poisson random variable has a wide range of applications in diverse areas, For example, the
number of misprints on a page of a book, the number of phone calls received by a call center
follows a Poisson distribution. The Poisson distribution is actually a limiting case of a binomial
distribution when the number of trials n gets large and the probability of success p is small. To
see this, let X ∼ B(n, p). Set λ = np. Then
i
λ n−i n(n − 1) . . . (n − i + 1) λi
n i n−i n λ λ n−i
P(X = i) = p (1 − p) = i
1 − = i
1−
i i n n n i! n
For large n and keeping λ and i fixed, we see that
n(n − 1) . . . (n − i + 1) λ −i λ n
≈ 1, 1− ≈ 1, 1− ≈ e−λ .
ni n n
Therefore, we have
λi
P(X = i) ≈ e−λ .
i!
Example 3.4. A factory produces nails and packs them in boxes of 400. If the probability that
a nail is substandard is 0.005, find the probability that a box selected at random contains at most
two nails which are substandard.
Solution: Let X denotes the number of substandard nails in a box of 400. Then X ∼ B(n, p)
with n = 400 and p = 0.005. Since n is large enough and p is small, we can use Poisson