Sie sind auf Seite 1von 13

2 Random variables*-

2.1.1 Definition
Let S be a sample space of an event. Let us assign numbers to elementary events in the sample
space. Let X stands for numerical values of the elementary events.
X is said to be a random variable because it can take on different values and the particular value
it takes on depends on the outcome of the random experiment.
So we can now define a random variable as a numerical variable whose value is determined by
the outcome of a random experiment.
Notation
1, 4 and 5 8 X X X = s s s are example of events and hence have probabilities.
Their probabilities are j j j 1 , 4 and P 5 8 P X P X X = s s s .
We read:
- The probability that the random variable X takes on the value 1
- The probability that the random variable X takes on the values less than or equal to 4
- The probability that the random variable X takes on the values between 5 and 8
inclusive
Examples
1. Consider the random experiment of tossing an unbiased coin three times. If the random
variable X of interest is the number of heads that occur.
(a)List all possible values that X can take on.
(b) Find the following probabilities:
(i) j 0 P X =
(ii) j 1 P X =
(iii) j 3 P X =
2. Consider the random experiment of rolling a die. . If the random variable X of interest is
the label of the face turned up.
(a)List all possible values that X can take on.
(b) Find the following probabilities:
(i) j 0 P X =
(ii) j 1 P X =
(iii) j 3 P X =
(iv) j P X is an even number
3 . A car salesperson is scheduled to see two clients today. She sells only two models of car,
an executive ( ) E and a basic ( ) B model. Each executive model sold earns the
salesperson a commission of N$ 20 0 0 , while each basic model sold earns her only
N$10 0 0 . If the sale is lost ( ) L , no commission is earned. Suppose ( ) 0 .2 P E = ,
( ) 0 .3 P B = , and ( ) 0 .5 P L = , and that the sales are independent of each other. Let the
random variable X be the total commission earned by the salesperson today.
(a) What values can X take on?
(b) Find the probability of each value.
2.1.2 Classification of random variables
The flow chart below gives a summary of variables classification.
3
4
5
From the above chart, it can be noted that random variables are divided into two categories,
namely Qualitative and Quantitative random variables. The later will be the focus of this course.
The quantitative random variables are also subdivided into two groups: Discrete and Continuous
random variables.
Types of variables
Qualitative
Quantitative
Discrete
Continuous
e.g
- Brand of PC
- Marital status,
- hair color
- Children in a family
- Strikes in a golf hole
- TV sets owned
- Amount of income
tax paid
- Weight of a student
- Yearly rainfall in
Tampa,FL
(a) Discrete random variable (d.r.v)
A discrete random variable takes on isolates values along the real line, usually integer.
However, discrete random variables with values that are not integers do also exist!
Examples:
- Number of customers entering a store between 12:0 0 and 14:0 0
- Number of students who drop out every year
- Number of clients visited by a salesperson
(b) Continuous random variable (c.r.v)
Continuous random variables are random variables that can be measured to any degree of
accuracy. This means that between every two possible value
1
x and
2
x there exists another
possible value
3
x .
Examples:
- Distance travelled by a car on one litre of petrol
- Time that a customer waits in the queue at fast food outlet
- Direction of a wind at midday measured in degrees.
2.2.3 Probability mass functions (p.m.fs) and probability density functions (p.d.fs )
We can use probability mass functions to describe mathematically discrete random variables
whereas continuous random variables are modeled using probability density functions.
(a) Probability mass functions
A function ( ) p x is called a probability mass function if it satisfies the following
conditions:
- ( ) p x is defined for all values of x , but ( ) 0 p x = only at finite or countable
infinite set of points.
- All values of ( ) p x lie in the unit j 0 ,1 i.e. 0 ( ) 1 p x s s
- ( ) 1 p x =

, where the sum is taken over all values of x for ( ) 0 p x =


Examples:
1. Unbiased die is rolled and the random variable X consists of the number of dots
appearing on the upturned face. Find the probability mass function for this random
variable.
2. The minister of environmental affairs has to decide on a fishing quota for forthcoming
season. Currently, the biomass of fish is estimated to be 20 m tones. The fish may have a
good breeding season with probability 0 .3 and produce 10 m tones of young fish, or have
bad breeding season and produce only 1 m tone. A so called warm water event may occur
with probability 0 .1, and kill 15 tones of fish, otherwise1 m tone of fish die.
(a) Find the value of X , the biomass of fish before setting the quota , can take on.
(b) Assume that all events are independent; find the probability mass function of X .
Note:
For discrete random variable X ,
j ( )
b
x a
P a X b p x
=
s s =

i.e. sum up relevant values of probability mass function.


Example:
Check that the probability function
( ) , 1, 2, 3 , 4, 5
15
0
x
p x x
otherwise
= =
=
satisfies the condition for being the probability mass function.
Find the following probabilities:
(i) j 2 4 P X s s
(ii) j 3 P X >
(b) Probability density functions(pdfs)
A function ( ) f x is called a probability density function if it satisfies the following
conditions:
- ( ) f x is defined for all values of X
- 0 ( ) f x s <
- ( ) 1 f 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 3 0 % and 50 % of the companies survive a
year?
(c) What is the probability that less than 10 % of companies survive a year?
2.2.4 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

=
=
=

Where the sum is over all possible values of X


e.g. The discrete random variable has probability mass function given by
1
( ) 1, 2, 3 , 4, 5, 6
6
0
p x x
otherwise
= =
=
Find the expected value of X
(b) Let X be a continuous random variable with probability density function ( ) f x
The mean of X , sometimes called the expectation, or expected value, is given by
( ) ( )
b
a
x
E X xf x dx

=
=
=
}
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
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

=
=
=

The standard deviation is the square root of the variance.


Example
Find the variance of random variable X whose probability mass function is given by
1
( ) 1, 2, 3 , 4, 5, 6
6
0
p x x
otherwise
= =
=
(b) Let X be a continuous random variable with probability density function ( ) f x
The variance of X is given by
2 2
( ) ( )
b
x
a
V X x f x dx =
}
The standard deviation is the square root of the variance.
Laws of Expected Value and Variance
Laws of Expected Value
E(a) = a
E(a + X) = a + E(X)
E(aX) = aE(X)
Laws of Variance
V(b) = 0
V(X + b) = V(X)
V(aX) = a
2
V(X)
V(aX + b) =a
2
V(X)
3. Coefficient of variation (CV)
Sometimes, it is necessary to compare the samples of data from different random
variables to establish which sample data shows greater variability. A direct comparison of
their respective standard deviations would be misleading as the random variables may be
measured in different units. Thus, a meaningful comparison should be based on measure
variability expressed in the same units. This achieved by producing a measure of relative
variability (i.e. relative to their mean) expressed in percentage terms, called coefficient of
variation.
10 0 %
( )
CV
E X

= . This ratio describes how large the measure of dispersion is relative


to the mean of the observations.
A coefficient of variation close to zero indicates low variability and tight clustering of
observations about mean. A large coefficient of variation value indicates that
observations are more spread out about their mean.
Example
1. 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 coefficient of variation of X
2. Find the coefficient of variation of a random variable X whose probability mass function
is given by
1
( ) 1, 2, 3 , 4, 5, 6
6
0
p x x
otherwise
= =
=
2.2.5 Cumulative distribution function
A cumulative distribution function or just a distribution function is a function that gives the
probability that X takes on a value less than or equal to x and is denoted by ( ) F x and
, ) ( ) F x P X x = s
If X is continuous, then
( ) ( )
x
F x f t dt

=
}
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 that can be directly used 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
| |
= =
|
\ .
=
Solution
, )
, )
, )
, )
, )
, )
4
4
0
4
4
1
4
4
2
4
4
3
4
4
4
( ) :
0 0 .5
0 .0 625
1 0 .5
0 .25
2 0 .5
0 .3 75
3 0 .5
0 .25
4 0 .5
0 .0 625
0 0
0 .0 625 0 1
F x
p
p
p
p
p
F x x
x
| |
=
|
\ .
=
| |
=
|
\ .
=
| |
=
|
\ .
=
| |
=
|
\ .
=
| |
=
|
\ .
=
= <
= s <
0 .3 125 1 2
0 .6875 2 3
0 .93 75 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:
(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
| |
= =
|
\ .
=
2.2.6 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 >
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
= < <
=
2.2.7 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 10 0 , the
th
p
percentile is the point
p
x that satisfies the equation , )
10 0
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


= >
=

Das könnte Ihnen auch gefallen