2.1 Random Variables 2.1.1 Definition: PX PX X
2.1 Random Variables 2.1.1 Definition: PX PX X
=
}
Examples
1. Show that
( ) 4 0 0.25
0
f x x
otherwise
= s s
=
is a probability density function
2. In a certain risk sector of share market, the proportion of companies that survive
(i.e. not deleted) a year is continuous random variable lying in the interval from
zero to one. A statistician examines the data collected over past years and
suggests that the function
3
( ) 20 (1- ) 0 1
0
f x x x x
otherwise
= s s
=
might be useful in modeling X , the annual proportion of companies that survives.
(a) Check that ( ) f x is a probability density function.
(b) What is the probability that between 30% and 50% of the companies survive a year?
(c) What is the probability that less than 10% of companies survive a year?
7
ii. Mean , Variance, and coefficient of variation of random variables
1. Mean
(a) Let X be a discrete random variable with probability mass function ( ) ( ) p x P X x = =
The mean of X , sometimes called the expectation, or expected value, is given by
( ) ( )
x
x
E X xp x
=
=
=
=
=
=
}
Example:
Suppose the random variable X has a probability density function
( ) 6 (1 ) 0 1
0
f x x x x
otherwise
= s s
=
Find the mean value of X
8
2. Variance
(a) Let X be a discrete random variable with probability mass function ( ) ( ) p x P X x = =
The variance of X , is given by
2 2
2
2
( ) ( )
x
x
x
V X x p x
=
=
=
Or
2
2
2
( ) ( ) ( )
x
x
x
V X x p x
=
=
=
=
}
If X is discrete, then
( ) ( )
t x
F x p t
s
=
Notes:
For X is continuous:
( ) ( ) F x f x ' = ie the first derivative of the cumulative distribution function is the probability density
function.
The distribution function gives an expression gives an expression that can be directly to compute
probabilities.
Examples:
1. Find the cumulative distribution function of a random variable that follows the mass function
given by:
4
4
( ) 0.5 0,1, 2, 3, 4
0
x
p x x
elsewhere
| |
= =
|
\ .
=
11
Solution
, )
, )
, )
, )
, )
, )
4
4
0
4
4
1
4
4
2
4
4
3
4
4
4
( ) :
0 0.5
0.0625
1 0.5
0.25
2 0.5
0.375
3 0.5
0.25
4 0.5
0.0625
0 0
0.0625 0 1
F x
p
p
p
p
p
F x x
x
| |
=
|
\ .
=
| |
=
|
\ .
=
| |
=
|
\ .
=
| |
=
|
\ .
=
| |
=
|
\ .
=
= <
= s <
0.3125 1 2
0.6875 2 3
0.9375 3 4
1 4
x
x
x
x
= s <
= s <
= s <
= >
2. Find the cumulative distribution function for the exponentially distributed random variable
(i.e.
, ) 0
0
x
f x e x
elsewhere
= >
=
)
3.
Find the distribution functions of random variables having the following probability
density/mass functions:
12
(a)
, )
4
4-
0.4 0.6 0,1, 2, 3, 4
0
x x
x
p x x
otherwise
| |
= =
|
\ .
=
(b)
, )
1
3 8
5
0
f x x
otherwise
= < <
=
(c)
, )
1
1
0
f x x e
x
otherwise
= s s
=
(d)
, )
3
3-
0.2 0.8 0,1, 2, 3
0
x x
x
p x x
otherwise
| |
= =
|
\ .
=
iv. Median of a random variable
A cumulative distribution function enables us to define the median of a random variable.
Let X be a random variable with a cumulative distribution function , ) F x . Then the median of X ,
denoted
m
x , satisfies the equation
, ) 0
0
x
f x e x
elsewhere
= >
=
, )
1
2
m
F x =
If X is continuous, the median is clearly the value
m
x such that , )
1
2
m
x
f x dx
=
}
If X is discrete, , ) F x is a step function and the median is taken to be the lowest value of X for which
, )
1
2
F x >
13
Examples
Find the medians of random variables having the following probability density/mass functions:
(a)
, )
4
4-
0.4 0.6 0,1, 2, 3, 4
0
x x
x
p x x
otherwise
| |
= =
|
\ .
=
(b)
, )
1
3 8
5
0
f x x
otherwise
= < <
=
v. Percentile of a random variable
Let X be a continuous random variable with probability density function ( ) f x and the cumulative
distribution function , ) F x . Let p be any number between 0 and 100, the
th
p percentile is the point
p
x that satisfies the equation , )
100
p
x
p
f x dx
=
}
Find the 60
th
percentile of random variable X with a probability density function
, ) 0
0
x
f x e x
elsewhere
= >
=