Beruflich Dokumente
Kultur Dokumente
Random Variable
Exhaustive Events
A set of events is called collectively exhaustive if at least one
out of them must occur.
Mutually Exclusive or Disjoint Events
Events are called mutually exclusive if occurrence of one of
them implies non-occurrence of the remaining events.
Complementary Event
The complimentary event of some event A is the event A
does not occur, denoted by Ac or A.
A and A are mutually exclusive as well as exhaustive.
Independent Events
Occurrence of an event does not affect the occurrence of the
other event.
S is a sample space
A is some event in S. (A S )
nA is the number of occurrences of A
n is the total number of outcomes.
The Probability of event A is
P( A)
nA
n
Limitations:
outcomes should be equally likely
total no. of outcomes should be finite.
QAM - I by Prof. Gaurav Garg (IIM Lucknow)
S is a sample space
A is some event in S. (A S )
A number P(A) is assigned to the event A
P(A) is called the probability of the event A , if it
satisfies following 3 axioms:
(i)
P( A) 0
(ii) P( S ) 1
(iii) P( A B) P( A) P( B)
for any event B, provided A B
QAM - I by Prof. Gaurav Garg (IIM Lucknow)
6/30/2016
Example:
Each year, ratings are complied concerning the performance of new cars
during first 90 days of use.
Cars are categorized according to
if the car needs warranty related repair
if the car is manufactured in USA
Based on the data collected, it was found that
P(Car needs warranty repair) = 0.04
P (Car manufactured in USA) = 0.60
P (needs warranty repair and manufactured in USA) = 0.025
Make contingency table
Obtain the probability that
A new car needs warranty repair or manufactured in USA.
A new car needs warranty repair and manufactured in USA.
A new car needs warranty repair given that it is manufactured in
USA.
Example:
In a lot of used cars
70% have air conditioning (AC)
40% have a CD player (CD)
20% of the cars have both.
What is the probability that a car has a CD player, given
that it has AC ?
We want to find P(CD | AC).
CD
No CD
Total
AC
0.2
0.5
0.7
No AC
0.2
0.1
0.3
Total
0.4
0.6
1.0
0 .2
0 .4
0 .2
0 .7
Given AC or
no AC:
All
Cars
0 .5
0 .7
0 .2
0 .3
Given CD or
no CD:
All
Cars
0 .2
0 .4
0 .5
0 .6
0 .1
0 .3
0 .1
0 .6
6/30/2016
Or
This variable X is called random variable.
Mathematical Definition
Variable changes its values depending on
some other factor (unlike constant).
Random Variable changes its value depending
on what we get as an outcome of a random
experiment.
Thus, each value of a random variable is
associated with a probability.
In other words, random variable takes a value
with some probability.
Example:
Consider the random experiment of tossing two coins
Sample space:
S = {HH, HT, TH, TT }
X is number of Heads appeared
X is a random variable
X can take any value out of 0,1 and 2.
P(X =0) = P{TT} = 1/4,
P(X =1) = P{HT ,TH} = 2/4,
P(X =2) = P{HH} = 1/4.
QAM - I by Prof. Gaurav Garg (IIM Lucknow)
6/30/2016
Example:
Consider the random experiment of tossing a fair die.
Sample space:
S = {1, 2, 3, 4, 5, 6}
P(getting 1) = 1/6 P(getting 2) = 1/6
P(getting 3) = 1/6 P(getting 4) = 1/6
P(getting 5) = 1/6 P(getting 6) = 1/6
Let X be the value on the upper face of the die
X could be 1, 2, 3, 4, 5 or 6
The event of getting 1 is same as saying X=1
So,
P(getting 1) = P(X=1) = 1/6
Similarly,
P(X=2) =1/6,
P(X=3) = 1/6,
P(X=4) = 1/6,
P(X=5) = 1/6,
P(X=6) = 1/6
Example:
Consider the random experiment of tossing a fair coin
thrice.
Sample space
S={HHH, HHT, HTH, THH, HTT, THT, TTH, TTT}
X: no. of heads appearing in three tosses
X is a random variable.
X could be 0, 1, 2, or 3.
P(X = 0) = P(TTT) = 1/8
P(X=1) = P(HTT, THT, TTH) = 3/8
P(X=2) = P(HHT, HTH, THH) = 3/8
P(X=3) = P(HHH) = 1/8
Example:
Metro trains run every half hour between 7:00 AM to
7:00 PM on a certain line .
A man enters the station at a random time during this
period.
Let X be the random variable which denotes the waiting
time in minutes.
X can take any value between 0 and 30.
Sample space: S = (0,30).
The event that he has to wait for at most 10 minutes
is same as X 10
P(X 10) = (10 0)/ (30 0) = 1/3
QAM - I by Prof. Gaurav Garg (IIM Lucknow)
Example:
Consider the random experiment of drawing two cards at
random from a well shuffled pack of 52 cards.
The sample space:
S = { CC,
DC,
HC,
SC,
CD,
DD,
HD,
SD,
CH,
DH,
HH,
SH,
CS,
DS,
HS,
SS
6/30/2016
More Examples
Random Variable
Values
Type
{0, 1, 2, 3}
{2, 3, 4, ...}
Any positive
number
{ 1, 2, 3, 4, ...}
{0, 1, 2, 3, 4, ...,
100}
Any positive
number
Example:
X is the number of heads appeared in two coins tossing
experiment.
X is a discrete random variable having the probability distribution
probability mass function of X is
1 / 4, if x 0
p( x) 2 / 4, if x 1
1 / 4, if x 2
Probabilities
0.6
0.5
0.4
0.3
0.2
0.1
0
x=0
x=1
x=2
Example:
In throwing a die, X is the values appeared
X is a discrete random variable having the probability distribution
Probabilities
0.2
0.15
0.1
0.05
0
x=1
x=2
x=3
x=4
x=5
x=6
3 / 4 if x 100
p ( x)
1 / 4 if x 200
QAM - I by Prof. Gaurav Garg (IIM Lucknow)
6/30/2016
p( x)
3
1 / 2
if x 1
if x 2
if x 3
Also,
1
x
2
3
1 1 1
1
p ( x ) 2 1
1
2 2 2
x 1
x 1 2
1
2
Example:
Consider the previous example again.
The discrete random variable has the pmf
Example:
Suppose an individual purchases two electronic
components
Each of which may either be defective or acceptable.
Sample space: S = {DD, DA, AD, AA}
Given that
P(DD) = 0.09,
P(DA) = 0.21,
P(AD) = 0.21,
P(AA) = 0.49.
X: number of acceptable components.
Obtain the probability distribution of X.
What is the probability of getting at least one
acceptable components?
Ans: 0.91
QAM - I by Prof. Gaurav Garg (IIM Lucknow)
6/30/2016
Example
Suppose X is a discrete random variable having following
probability distribution
x
p(x)
-2
0.4
-1
k
0
0.2
Example
Consider the random experiment of tossing a fair
coin.
What is the expected number of tosses needed to get
the first tail.
Recall the example discussed earlier.
Random variable X is the number of tosses needed to
get the first tail.
pmf of X is given as
1
0.3
Find E(X).
Ans: -0.6
Example
Var ( X ) X2 E X E ( X )
E ( X )
E X
E ( X 2 ) x 2 p( x) and E ( X ) x p( x),
x
Var(a) = 0,
Var(aX) = a2Var(X),
Var(aX + bY) = a2Var(X) + b2Var(Y) + 2ab XY
Example
Suppose X is a discrete random variable having following
probability distribution
x
p(x)
-2
0.4
-1
k
0
0.2
1
0.3
Find Var(X).
Ans: 1.64
Example
b1
p11
p21
.
.
pn1
p.1
b2
p12
p22
.
.
pn2
p.2
.
.
bm
p1m
p2m
.
.
pnm
p.m
Total
p1.
p2.
.
.
pn.
1
Possible values of Y
Possible values of X
Marginal pmf of X
Marginal pmf of Y
6/30/2016
Example:
A fair coin is tossed once.
Let X denote the number of heads.
Y denote the number of tails.
Find the joint probability mass function of X and
Y.
Y
Ans
Total
Total
1/2
1/2
1/8
2/8
1/8
4/8
1/2
1/2
1/8
2/8
1/8
4/8
1/2
Total 1/8
3/8
3/8
1/8
Total 1/2
XY
E{ X E ( X )}{Y E (Y )}
E ( XY ) E ( X ) E (Y )
Here,
E ( XY ) ai b j pij
i 1 j 1
E ( X ) ai pi ,
i 1
E (Y ) b j p j
Example:
A fair coin is tossed three times independently.
Let X denote the no. of heads on the first toss;
Y denote the total no. of heads.
Obtain covariance between X and Y.
Example:
A fair coin is tossed once.
Let X denote the number of head.
Y denote the number of tail.
Obtain covariance between X and Y.
j 1
Example:
Given the following probability distribution for the
random variables X and Y
P(XiYi)
0.2
0.4
0.3
0.1
Example:
A fair coin is tossed three times independently.
X: no. of heads on the first toss;
Y: total no. of heads.
Find the joint pmf of X and Y.
Ans
X
-100
50
200
300
Y
50
30
20
20
Compute
E(X), E(Y), E(X+Y)
X ,Y , XY
Var (X+Y) = Var (X) + Var (Y) + 2 XY = ?
QAM - I by Prof. Gaurav Garg (IIM Lucknow)
6/30/2016
f ( x) lim h0
Provided
P ( a X b) P ( a X b)
P ( a X b)
P ( a X b)
b
f ( x)dx
f(x) dx 1.
RX
1
h
h
P x X x
h
2
2
Example:
Let X is a random variable with probability density
function given by
Show that f (x) is a valid pdf.
Find P(X > 2) and P(1 < X < 2).
Example:
Let X is a random variable with pdf
Show that f (x) is a valid pdf.
Find P(X > 1/2) and P(0 < X < 1/2).
a
QAM - I by Prof. Gaurav Garg (IIM Lucknow)
E( X )
Example:
xf ( x)dx
RX
Example:
If X is a continuous random variable with pdf
Find E(X).
Ans: 3/4
Example:
If X is a continuous random variable with pdf
f(x) = k, 0 < X < 2,
Find k
Find E(X)
QAM - I by Prof. Gaurav Garg (IIM Lucknow)
6/30/2016
Var ( X ) X2 E X E ( X )
E ( X )
E X
where
E( X 2 )
f ( x)dx and
E( X )
RX
xf ( x)dx
RX
f(x) is pdf of X,
RX is the range space of X.
QAM - I by Prof. Gaurav Garg (IIM Lucknow)
Example:
If X is a continuous random variable with pdf
Find Var(X).
Example:
If X is a continuous random variable with pdf
f(x) = 1/2, 0 < X < 2,
Find Var(X)
Example:
If X is a continuous random variable with pdf
f(x) = a e-ax, a > 0, x > 0.
Find Var(X).
QAM - I by Prof. Gaurav Garg (IIM Lucknow)
Summary
Random Variable
Discrete Random Variable
o Probability mass function of a discrete random variable
o Expectation of a discrete random variable
o Variance of a discrete random variable
o Joint probability mass function
o Covariance between two variables
o Independence of two random variables
10