CHAPTER FIVE
5. RANDOM VARIABLES AND PROBABILITY DISTRIBUTIONS
Definition: A random variable is a numerical description of the outcomes of the experiment or a
numerical valued function defined on sample space, usually denoted by capital letters.
Example: If X is a random variable, then it is a function from the elements of the sample space to the
set of real numbers.
A random variable takes a possible outcome and assigns a number to it.
Example: Flip a coin three times, let X be the number of heads in three tosses.
S HHH , HHT , HTH , HTT , THH , THT , TTH , TTT
X HHH 3,
X HHT X HTH X THH 2,
X HTT X THT X TTH 1
X TTT 0
X = {0, 1, 2, 3}
X assumes a specific number of values with some probabilities.
Random variables are of two types:
1. Discrete random variable: are variables which can assume only a specific number of values.
They have values that can be counted
Examples:
Toss coin n times and count the number of heads.
Number of car accidents per week.
Number of defective items in a given company.
Number of machines working in a factory
Number of faults in an electrical circuit
2. Continuous random variable: are variables that can assume all values between any two give
values.
Examples:
Height of students at certain college.
Time taken to complete a task
Voltage in an electrical circuit
Temperature of a machine
Length or weight of a material
Definition: a probability distribution consists of a value a random variable can assume and the
corresponding probabilities of the values.
Example: Consider the experiment of tossing a coin three times. Let X be the number of heads.
Construct the probability distribution of X.
Solution:
First identify the possible value that X can assume.
Calculate the probability of each possible distinct value of X and express X in the form of
frequency distribution.
X x 0 1 2 3
P X x 1 8 38 38 18
Probability distribution is denoted by P for discrete and by f for continuous random variable.
Properties of Probability Distribution:
1.
P( x) 0, if X is discrete.
f ( x) 0, if X is continuous.
2.
P X x 1 ,
x
if X is discrete.
f ( x)dx
x
1 , if is continuous.
Note:
1. If X is a continuous random variable then
b
P(a X b) f ( x)dx
a
2. Probability of a fixed value of a continuous random variable is zero.
P ( a X b ) P ( a X b ) P ( a X b) P ( a X b )
3. If X is discrete random variable the
b 1
P ( a X b) P( x)
x a 1
b 1
P ( a X b) p ( x )
xa
b
P ( a X b) P( x)
x a 1
b
P ( a X b) P ( x )
xa
4. Probability means area for continuous random variable
Introduction to expectation
Definition:
1. Let a discrete random variable X assume the values X1, X2, ….,Xn with the probabilities P(X1),
P(X2), ….,P(Xn) respectively. Then the expected value of X ,denoted as E(X) is defined as:
E ( X ) X 1 P( X 1 ) X 2 P( X 2 ) .... X n P( X n )
n
X i P( X i )
i 1
2. Let X be a continuous random variable assuming the values in the interval (a, b) such that
b
f ( x)dx 1 ,then
a
b
E ( X ) x f ( x)dx
a
Examples:
1. What is the expected value of a random variable X obtained by tossing a coin three times where
is the number of heads
Solution:
First construct the probability distribution of X
X x 0 1 2 3
P X x 1 8 38 38 18
E ( X ) X 1P( X 1 ) X 2 P( X 2 ) .... X n P( X n )
0 *1 8 1* 3 8 ..... 2 *1 8
1.5
2. Suppose a charity organization is mailing printed return-address stickers to over one million
homes in the Ethiopia. Each recipient is asked to donate either $1, $2, $5, $10, $15, or $20. Based
on past experience, the amount a person donates is believed to follow the following probability
distribution:
X x $1 $2 $5 $10 $15 $20
P X x 0.1 0.2 0.3 0.2 0.15 0.05
What is expected that an average donor to contribute?
Solution:
X x $1 $2 $5 $10 $15 $20 Total
P X x 0.1 0.2 0.3 0.2 0.15 0.05 1
xP( X x) 0.1 0.4 1.5 2 2.25 1 7.25
6
E ( X ) xi P( X xi ) $7.25
i 1
Mean and Variance of a random variable
Let X be given random variable.
1. The expected value of X is its mean
Mean of X E (X )
2. The variance of X is given by:
Variance of X var( X ) E ( X 2 ) [ E ( X )]2
Where:
n
E ( X 2 ) xi P( X xi ) , if X is discrete
2
i 1
x 2 f ( x)dx , if X is continuous.
x
Examples: Find the mean and the variance of a random variable X in example 2 above.
Solutions:
X x $1 $2 $5 $10 $15 $20 Total
P X x 0.1 0.2 0.3 0.2 0.15 0.05 1
xP( X x) 0.1 0.4 1.5 2 2.25 1 7.25
x 2 P( X x) 0.1 0.8 7.5 20 33.75 20 82.15
There are some general rules for mathematical expectation.
Let X and Y are random variables and k be a constant.
RULE 1
E (k ) k
RULE 2
Var (k ) k
RULE 3
E (kX ) kE( X )
RULE 4
Var (kX ) k 2Var ( X )
RULE 5
E ( X Y ) E ( X ) E (Y )