Chapter 3: Random Variables and Discrete Probability
Distributions
3.1 Outcomes for this chapter
After you have studied this chapter you must be able to
•
identify a random variable
•
explain the use of a random variable
•
•
understand the meaning of expectation
apply the Binomial distribution and use the Binomial tables
•
apply the Poisson distribution and use the Poisson tables
3.2 Random Variables and Probability Mass Functions
A sample space S may be difficult to describe if the elements of S are not
numbers. We now discuss how we can use a rule by which an element
associated with a number x.
s of S may
be
Definition 3.1: Random Variable
A random variable is a function Xthat assigns to each element s in S one and only
one real number Xes) = x. The space of Xis the set of real numbers
{x : x = X(s),s E S}
Example 3.1:
Toss two coins and let t = tails and h = heads. Define a random variable for the
number of heads.
Solution 3.1
X = the number of heads observed. The sample space S = {tt, th, ht, hh} and
83
~
tt
I
0
ht
th
11
1
hh
I
2
The space of Xis {0,1,2}.
Definition 3.2: Probabilitymass function (p.m.t:)
A functionp(x) defined for all real x by p(x) = P(X = x) is called a probability mass
function. Since p(x) is the probability that X takes on the value x, the notationpx(x)
sometimes used. The p.mJ. must satisfy the following three properties
i.
ii.
iii.
p(x)
~ 0
LXERP(x)
=
for all x E R
1
P(X E A) = LxEAP(x)
where A
cR
Example 3.2: From example 3.1
From the previous example we have, assuming that the coins are fair,
X=x
p(x)
1- 1..
4 4
Hil
i
~
Total
I
1
Example 3.3:
Consider the following information
P(X = x) = ex,
84
x
= 0,1,2,3,4
is
a. What value of c will make the function a p.mJ.?
b. Find P(X > 2)
c. Find P(1 < X:S 3)
Solution 3.3:
a. For the function to be a p.mJ.
1 = P(X = 0) + P(X = 1) + P(X = 2) + P(X = 3) + P(X = 4)
1 = c(O) + c(1) + c(2) + c(3) + c(4)
1 = c + 2c + 3c + 4c
1 = 10c
_1
10
=
c
b.
P(X > 2) = P(X = 3)
+ P(X = 4)
= /0 (3) + -fo(4)
_ 7
-TO
c.
P(1
< X:S 3) = P(X= 2) +P(X=
3)
= /0 (2) + /0 (3)
~
10
Definition 3.3: Cumulative distribution function, CDF
The function F(x) defined for all real x by F(x) = P(X:S x) = Lk$xP(X = k) is
called the cumulative distribution function of the random variable X. F(x) is the sum of
all the probabilities from the smallest observation to a specified observation x.
85
Example 3.4: From example 3.2
P(X:S 1)
= P(X = 0) + P(X = 1)
=l..+14 4
l
#
4
3.3 Mathematical
expectation
Definition 3.4: Mean Expected value
LetXbe a discrete random variable with probability distributionp(x). The mean or
expected value of X, denoted by f.l or E[X], is defined by
f.l
= E[X] = Exxp(x)
#
Example 3.5: From example 3.2
Determine the mean of X
Solution 3.5:
E[X]
= LXp(x)
x
=
o(~) +1(~) +2(~)
=1-+1=
4
1
4
#
Definition 3.5: Variance
(52
The variance, denoted by (52 or
= E[X2] - (E[X])2 = E[X2] - p2
(5}.,
of a random variable X is defined by
#
Definition 3.6: Standard deviation
The standard deviation, denoted by (5 or (5x, of a random variable X is defined by
(5
#
= + JE[X2] - p2
86
Example 3.6: From example 3.2
Determine the variance and standard deviation of X
Solution 3.6:
The variance is
oJ
= E[P] - p2
( ~ ) + 12 (
244
=-+--444
= 02
~ )
+ 22 (
~ )
-
12
l..
2
and the standard deviation is
ax =
If
j2
#
2
3.4 The Binomial distribution
Many statistical problems are concerned with experiments where the population
of interest can be divided into two disjoint classes. We will denote these classes by E
and E respectively.
Example 3.7:
a. A selected item may be good or defective.
b. A student may pass or fail an examination.
c. A person selected may be a smoker or not.
d. The price of gold may be up or down.
Definition 3.7: The Binomial distribution, X-B(n,p)
A random variable X has a binomial distribution with parameters nand p if the
p.m.f. of Xis given by
87
#
P(X = x) = (~)pX(1-
p)n-x,
X
= 0,1,2, ...n
where
x = the number of items in the class of interest
n = the number of items selected for the sample (all items independent from each
other)
p = the probability of selecting an item from the class of interest (p stays
#
constant)
Example 3.8:
A certain type of daisy occurs in two variations, one with white flowers and one
with red flowers. At the seedling stage it is impossible to determine whether the plant
will bear white or red flowers, but it is known that 20% of all seedlings bear red
flowers. Suppose that you randomly select
3 plants,
and let X denote the number of
plants which bear red flowers. For this experiment choosing a daisy that bears red
flowers is considered the class of interest. What is the probability that 2 of the
selected plants are red?
3
Solution 3.8:
n=3
x=2
p = 20% = 0.20
P(X = 2) = (~ ) (0.20)2(1 - 0.20)3-2
= (3)(0.04)(0.80)
= 0.096
= 9.6%
#
Definition 3.8: Cumulative Binomial Probabilities
Table 2 gives the values of B(x;n,p)
==
P(X:::; x)
= :E:O (~)pr(1-
p)n-r (the sum
of all the probabilities from the smallest observation to a specified observation) for
selected values of nand p. More extensive tables are available and the probabilities
#
can also be calculated on MSExcel.
88
Example 3.9: From example 3.8
Determine the probability that at most two plants bear red flowers
Solution 3.9:
x
P(X ~ x) =
L (~
)pr(1-
p)n-r
r=O
2
P(X ~ 2)
=
L (~)
(0.20Y(1
- 0.20)3-r
r=O
From table 2 with n = 3, x = 2 and p = 0.20, we have
P(X ~ 2)
= 0.992 = 99.2%
#
Definition 3.9: Mean and variance of binomial distribution
The mean (/l) and variance ((j2) of the binomial distribution are
/l
(j2
= np
= np(1- p)
#
Example 3.10: From example 3.8
Determine the mean and the variance of X.
Solution 3.10:
The expected number of plants with red flowers is
E[X]
= np = 3 x 0.20 = 0.60
and the variance is
(52
= np(1- p) = 3 x 0.20 x 0.80 = 0.48
89
#
3.5 The Poisson Distribution
A poisson random variable is usually a variable that counts the number of events
that occur in an interval of time.
Example 3.11:
a. The number of bad cheques that arrive at a bank every day.
b. The number of vehicle deaths per month.
c. The number of defective manufactured
items during a month.
d. The number of bacteria in a given culture.
#
Definition 3.10: The Poisson Distribution; X~POI(J1)
A random variable X is said to have a Poisson distribution with parameter
J1
if the
p.m.f. of Xis given by
e-Jl J1x
P(X = x) = --,x. -,
x
= 0,1,2, ...
J1
>0
where
x = number of events of interest
J1
= expected
number of events
e = mathematical
constant
#
Example 3.12
If a bank receives on the average 6 bad cheques a day, what is the probability
that the bank will receive 4 bad cheques a day?
Solution 3.12:
T
-664
P(X= 4) =
90
= 0.135 = 13.5%
#
Definition 3.11: Cumulative Poisson
-ji
Table 3 gives the values of P(X:::; x) = 2::0
r
e ri
for selected values of Ji. The
cumulative probability of a random variable is the sum of all the probabilities from the
smallest observation to a specified observation x. More extensive tables are available
#
and it is also possible to calculate the probabilities on MSExcel.
Example 3.13: From example 3.12
What is the probability of receiving at most 4 bad cheques a day?
Solution 3.13:
4
P(X:::; 4)
=
L: e-6,6r
r.
r=O
e-660
e-661
e-662
= ----or- + -1-'- + ~
= 0.285
e-663
+~
e-664
+ Lj:"!
= 28.5%
Or from table 3 with
Ji
= 6 and x = 4
P(X:::; 4)
#
= 0.2851 = 28.51%
Definition 3.12: Mean and variance of Poisson distribution
The mean (expected value) and the variance of the poisson distribution are given
by
E[X]
(J2
=
Ji
=
Ji
i.e. the mean equals the variance for a poisson random variable.
#
Example 3.14:
A life insurance company has found that the probability is 0.00001 that a person
91
in the 40 to 50 age bracket will die from a certain rare disease. If the company has
100000 policy holders in this age group, what is the probability that it will have to pay
out more than four claims because of death from this cause?
Solution 3.14:
The problem could be solved using a binomial model since
a. One either dies from the disease or not.
b. The records give a constant probability value of p = 0.00001for death from the
disease.
c. Whether one dies from the disease or not does not affect what happens to
another person in the group.
Hence X ~B( 100000,0.00001)
In a case such as this were p is small and n is very large we can use the Poisson
distribution to approximate the binomial distribution, since the binomial tables do not
containp = 0.00001and n = 100000.To use the poisson table we need the value of x
and 11. From definition 3.12 we see that the expected value of a poisson random
variable is 11 and from definition 3.9 we see that the expected value of a binomial
random variable is np. Thus we can use
11
11
= np, and for the information given above
= np = 100000x 0.00001 = 1
Hence X ~ POI( 1) and
P(X
> 4) = 1 - P(X -:;.4)
= 1 - 0.9963
= 0.0037
92
from table
3
#
Exercise 3:
1. In a survey three people are selected and asked whether they smoke (Yes) or not
(No).
a. What is the sample space and the space of X?
b. What is the p.mJ.?
c. Determine P(X:S 2).
d. Determine the expected value of X
e. Find the standard deviation of X.
2. A union wage negotiator feels that the probabilities are 0.40, 0.30, 0.20 and 0.10
that the union members will get a R1.50 per hour raise, a R1.00 an hour raise, a 50
cents an hour raise, or no raise at all. What is their expected raise?
3. An importer is offered a shipment of machine tools for R140 000. The probabilities
that he will be able to sell for R180 000, R170 000 or R150 000 are 0.32,0.55 and
0.13. What is the importers expected gross profit?
4. A builder has to choose between two jobs. The first job has a 75% chance of a profit
of R80 000 and a 25% chance of a loss of R25 000. The second job has a 50%
chance of a profit of R120 000 and a 50% chance of a loss of R45 000. Which job
should the builder choose to maximize his profit?
5. At a computer store, the annual demand for a particular software package is a
discrete random variable X The store owner orders four copies of the package at
R100 per copy and charges customers R350 per copy. At the end of the year the
package is obsolete and the owner loses the investment on unsold copies. The
p.mJ. of Xis given by the following table
x
0
1
2
3
4
fix)
0.1 0.3 0.3 0.2 0.1
a. Find E[X]
b. Find (J2
c. Suppose the computer store expands its marketing operation and orders 10
copies of the software package. As before, the annual demand is a random
variable, X, and unsold copies are discarded; but assume now thatX~B(10,p).
i. Find the expected net profit to the store as a function of p.
ii. How large must p be to produce a positive expected net profit?
93
6. For every vehicle that a certain bank finances, there is a 25% chance that the vehicle
will be repossessed after 6 months. If 20 cars are financed in a certain month,
a. What is the probability that 3 vehicles will be repossessed after 6 months?
b. What is the probability that at most 3 vehicles will be repossessed after 6
months?
c. Determine the expected number of repossessions after 6 months.
d. Determine the variance of the distribution.
7. An insurance broker, who has five independent contracts, believes that, for each,
the probability of making a sale is 0.40.
a. What is the probability of at least one sale?
b. What is the expected number of sales?
8. You are in charge of a large fleet of delivery trucks. On average 1.9 trucks break
down per day, and you keep two trucks available to replace those that break down.
What is the probability that on one day
a. no extra replacement trucks are needed?
b. the number of replacement trucks is inadequate?
9. For a typical factory with 2000 workers, it is known that the mean number of strikes
per year is 0.4.
a. Find the probability of one strike per year at the factory.
b. Find the probability of at most 2 strikes per year.
10. A certain scientific theory supposes that mistakes in cell division occur according to
a poisson process with rate 2.5 per year, and that an individual dies when 196 such
mistakes have occurred. Assuming this theory find
a. the mean lifetime of an individual,
b. the variance of the lifetime of an individual.
94
© Copyright 2026 Paperzz