Random Variables
Random Variables
A random variable associates a numerical value with each outcome of an experiment. A random
HH 0 2
HT 1 1
TH 1 1
TT 2 0
Example 2: A balance coin is tossed 4 times. List the element of the sample space
and the random variable X consisting of the total number of heads.
Solution
If H and T stand for head and tail respectively, the result is as shown below:
Element of sample space Value of X Probability
HHHH 4 1/16
HHHT 3 1/16
HHTH 3 1/16
HTHH 3 1/16
THHH 3 1/16
HHTT 2 1/16
HTHT 2 1/16
HTTH 2 1/16
THHT 2 1/16
THTH 2 1/16
TTHH 2 1/16
HTTT 1 1/16
THTT 1 1/16
TTTH 1 1/16
TTHT 1 1/16
TTTT 0 1/16
Random variable X Frequency
0 1
1 4
2 6
3 4
4 1
X 2 3 4 5 6 7 8 9 10 11 12
P(x=x)
X 1 2 3 4
F(x)
Exercise 1: check whether the function given by f(x) = , where x = 1,2,3,4,5 can
serve as a the probability function of a random variable and if so construct a
probability distribution for the function.
2. It is known from a census data for a particular income group that 10% of
households have no children, 25% have one child, 50% have two children, 10%
have three children and 5% have four children.
If X represent the number of children per household for this income group.
Construct a probability:
i. The probability that a household has at least two children.
ii. The event that a household has at most one child
iii. The probability that a household has between one and three children.
MEAN OF A DISCRETE RANDOM VARIABLE
The mean of a discrete random variable is given by
=Σ x P(x) where the sum is over all values of X
The mean of a discrete random variable is also called the expected value, and is
represented by E (X).
Example: The mean of the random variable in example 1 is found as follows:
x 2 3 4 5 6 7 8 9 10 11 12
P(x=x) 0.028 0.056 0.083 0.111 0.139 0.167 0.139 0.111 0.083 0.056 0.028
xPx 0.056 0.168 0.0332 0.555 0.834 1.169 1.112 0.999 0.830 0.616 0.336
The sum of the row labelled xP(x) is the mean of X and is equal to
7.007.
E(x) 7
Exercise: Find the mean of children per household for the distribution.
STANDARD DEVIATION OF A DISCRETE
RANDOM VARIABLE
The variation of a discrete random variable is represented by σ2 and is
defined by
σ2 = (x - )2 P(x)
The variance is also represented by Var (X) and may be calculated by
the alternative formula given by
Var (X) = σ2 = x2 P(x) – 2
The standard deviation of a discrete random variable is represented
by σ or sd (X) and is given by
σ = sd(X) = Var (X)
BINOMIAL RANDOM VARIABLE
/DISTRIBUTION
A binomial random variable is a discrete random variable that is defined
when the conditions of a binomial experiment are satisfied. The conditions
are:
i. There are n identical trials
ii. Each trials has only two possible outcomes
iii. The probability of the two outcomes remain constant for each trial
iv. The trial are independent
The two outcomes possible on each trial are called success and failure.
Their probabilities are respectively p and q and p + q = 1
The binomial probability formula is used to compute probabilities for binomial random
variables. The formula is given by
p(x) = =
For x = 0, 1, 2,…,n
• Example: Determine the probabilities of having (a) at least 1 girl and (b)
at least 1 girl and 1 boy in a family of 4 children, assuming equal
probability of male and female birth.
• Solution
• The probability of a girl being born, p, is 0.5 and the probability of a girl
not being born (male birth), q, is also 0.5. The number in the family, n, is
4.
(b) The probability of having a 4 upwards less than 4 times is the sum
of the probabilities of having a 4 upwards 0, 1, 2, and 3 times, i.e.
• Solution
• P(5) = = 0.223
TABLES OF THE BINOMIAL
DISTRIBUTION
• Appendix 1 (Schaum’s series page 359) contains the table of binomial
probabilities. This table lists the probabilities of x for n = 1 to n = 25
for selected values of p.
MEAN AND STANDARD DEVIATION
OF A BINOMIAL RANDOM VARIABLE
• The mean of a binomial random variable is given by:
= np
• The variance of a binomial random variable is given by:
npq
• Example : If X represents the number of girls in families having four
children, then X is a binomial random variable with n = 4 and p = 0.5
• The distribution of X is determimed by the formula
P(0) = = 0.0625, P(1)= = 0.25
P(2)= = 0.375, P(3) = = 0.25
P(4) = = 0.0625
• The mean of the above example is:
0 x 0 .0625 + 1 x .25 + 2 x 0.375 + 3 x .25 + 4 x .0625 =2
The occurrences are considered with respect to a time interval, a length interval, a fixed
area or a particular volume.
• When the number of trials, n, in a binomial distribution becomes
large (usually taken as larger than 10), the calculations associated
with determining the values of the terms becomes laborious. If n is
large and p is small, and the product np is less than 5, a very good
approximation to a binomial distribution is given by the
corresponding Poisson distribution, in which calculations are usually
simpler.
• The principal use of a Poisson distribution is to determine the
theoretical probabilities when p, the probability of an event
happening, is known, but q, the probability of the event not
happening is unknown. For example, the average number of goals
scored per match by a football team can be calculated, but it is not
possible to quantify the number of goals which were not scored.
Poisson probability formula:
A random variable x has a poisson distribution if its probability
distribution is given by
for x=0,1,2,…
The probability is found by finding the probability of the complementary event and
subtracting it from 1
i.e P (X 6) = 1 – P (X 6)