Sie sind auf Seite 1von 10

6/30/2016

Quantitative Analysis for Management - I

Random Variable

QAM - I by Prof. Gaurav Garg (IIM Lucknow)

A Review of Probability Theory


Random Experiment is an experiment which results in
any one of the possible outcomes, though repeated
under identical conditions. Actual result can not be
predicted.
Sample Space is an exhaustive list of all the possible
outcomes of a random experiment.

QAM - I by Prof. Gaurav Garg (IIM Lucknow)

Equally Likely Events


If there is no reason to expect one in preference to the others.

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.

QAM - I by Prof. Gaurav Garg (IIM Lucknow)

Classical Definition of Probability

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)

QAM - I by Prof. Gaurav Garg (IIM Lucknow)

Axiomatic Definition of Probability

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

Important Probability Rules


If S is a sample space, then
P(S) = 1
P() = 0
If A is some event in S, then
P(A Ac) = P() = 0
P(AUAc) = P(S) = 1
P(Ac) = 1 P(A)

QAM - I by Prof. Gaurav Garg (IIM Lucknow)

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.

Addition Law of Probability


P(AUB) = P(A) + P(B) P(A B)
P(AUB) = P(A) + P(B), provided AB =
AB = means A and B are mutually exclusive
Conditional probability
Probability of A given that B has already occurred is
P(A|B) = P(AB)/ P(B)
Joint Probability of A and B is
P(AB) = P(A|B) . P(B) or
P(AB) = P(B|A) . P(A)
When A and B are independent events, then
P(A|B)=P(A)
P(AB)=P(A).P(B)
QAM - I by Prof. Gaurav Garg (IIM Lucknow)

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

QAM - I by Prof. Gaurav Garg (IIM Lucknow)

QAM - I by Prof. Gaurav Garg (IIM Lucknow)

0 .2
0 .4
0 .2
0 .7

Given AC or
no AC:

All
Cars

0 .5
0 .7
0 .2
0 .3

P(AC and CD) = 0.2

P(AC and CD/) = 0.5

Given CD or
no CD:

All
Cars

0 .2
0 .4
0 .5
0 .6

P(CD and AC) = 0.2

P(CD and AC) = 0.2

P(CD and AC) = 0.5

P(AC and CD) = 0.2


P(CD and AC) = 0.1

0 .1
0 .3

P(AC and CD/) = 0.1

QAM - I by Prof. Gaurav Garg (IIM Lucknow)

0 .1
0 .6

QAM - I by Prof. Gaurav Garg (IIM Lucknow)

6/30/2016

Idea of Random Variable


Consider a random experiment of tossing a fair
coin twice.
Suppose a person plays a game where
he wins Rs. 100 if he gets at least one head in
two tosses, and
he loses Rs. 200 otherwise.
If the person keeps playing the game for a long
time, is he going to gain some money or loose?
What is the long term gain or loss to the person.

The probability of getting at least one head in


two tosses is
P({HH, HT ,TH})=3/4.
So he has 75% chance of winning Rs. 100.
But, at the same time, he could lose Rs. 200 with
25% chance.
Now how to incorporate this idea of his gain (or
loss) along with the probability.
In many situations, Probability fails to provide
the quantitative measurement of the
uncertainty.

QAM - I by Prof. Gaurav Garg (IIM Lucknow)

What is lacking in previous example, is some


quantitative measurement of his gain.
We define X as his gain or profit in the same
game, then
X takes the value 100 when he wins.
X takes the value -200 when he looses.
Now each of these outcomes is a part of the
sample space.
So each of them has some specific probability to
happen.

QAM - I by Prof. Gaurav Garg (IIM Lucknow)

We write it more systematically as follows

Using the corresponding probabilities, we write


the same idea as

Or
This variable X is called random variable.

QAM - I by Prof. Gaurav Garg (IIM Lucknow)

QAM - I by Prof. Gaurav Garg (IIM Lucknow)

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.

QAM - I by Prof. Gaurav Garg (IIM Lucknow)

A random variable is a function that assigns a numeric


value to the outcomes of a random experiment
i.e.,
X : S R,
where S is the sample space, R is the real line (-, ).

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

QAM - I by Prof. Gaurav Garg (IIM Lucknow)

Consider the same example again.


S = {HHH, HHT, HTH, THH, HTT, THT, TTH, TTT}
X: no. of heads appearing in three tosses
X belongs to {0, 1, 2, 3}
Event of getting at least one head is same as X 1
P(X 1) = P(HHH, HHT, HTH, THH, HTT, THT, TTH)
= 7/8
Similarly, we can write
P(X 1) = P(HTT, THT, TTH, TTT) = 4/8
P(X < 2) = P(HTT, THT, TTH, TTT) = 4/8
P(X 2) = P(HHT, HTH, THH, HTT, THT, TTH, TTT)= 7/8
QAM - I by Prof. Gaurav Garg (IIM Lucknow)

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)

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

X: number of Diamond Cards selected


X is a random variable.
X 1 is the event that at most one diamond is selected
P(X 1) = 15/16
QAM - I by Prof. Gaurav Garg (IIM Lucknow)

Types of Random Variables


Random Variables are of two types:
Discrete Random Variable
Continuous Random Variable

Discrete Random Variable takes only a countable (finite


or countably innite) number of values.
no. of accounts opened,
no. of cars sold,
Friday night attendance at a cinema,
no. of defective bulbs in a box, etc.
Discrete random variables usually count the items. is
Range set of X is the collection of all possible values of X
Range set of a discrete random variable is countable.
QAM - I by Prof. Gaurav Garg (IIM Lucknow)

6/30/2016

Continuous Random Variable takes on any values within


an interval.
weight of fertilizer packed in a bag,
amount of sugar in an orange,
time required to run a mile,
price of a stock, etc.
Continuous random variable is usually a measurement.
It can take an uncountably infinite number of values.
Range set of a continuous random variable is an
interval.
It can be of types (-, ), (-, 0), (0, ) or (a, b).

More Examples
Random Variable

Values

Type

Flip a coin three times;


X = the total number of heads.

{0, 1, 2, 3}

Range Set is Finite


Discrete Random Variable

Select a mutual fund;


X = the number of companies in the
fund portfolio.
Measure the length of an object;
X = its length in centimeters.

{2, 3, 4, ...}

Range Set is Countably Infinite


Discrete Random Variable

Any positive
number

Range Set is Uncountable


Continuous Random Variable

{ 1, 2, 3, 4, ...}

Range Set is Countably Infinite


Discrete Random Variable

{0, 1, 2, 3, 4, ...,
100}

Range Set is Finite


Discrete Random Variable

{$0, $1, $2,


$3,}

Range Set is Countably Infinite


Discrete Random Variable

Any positive
number

Range Set is Uncountable


Continuous Random Variable

Throw two dice over and over until


you roll a double six;
X = the number of throws.
Take a true-false test with 100
questions; X = no. of questions
answered correctly.
Invest $10,000 in stocks;
X = the value, to the nearest $1, of
your investment after an year.
Select a group of 50 people at
random;
X = exact average height (in m) of the
group.

QAM - I by Prof. Gaurav Garg (IIM Lucknow)

QAM - I by Prof. Gaurav Garg (IIM Lucknow)

Probability Distribution of a Discrete Random


Variable
Also called as Probability Mass Function (pmf).
It is a mutually exclusive listing of all possible values of
the discrete random variable along with corresponding
probabilities.

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

All possible values of random variable X


Corresponding probabilities

Probabilities

0.6

p1, p2, p3,. are non-negative.


Together they sum up to 1.

0.5
0.4
0.3
0.2
0.1
0

x=0

x=1

x=2

QAM - I by Prof. Gaurav Garg (IIM Lucknow)


QAM - I by Prof. Gaurav Garg (IIM Lucknow)

Example:
In throwing a die, X is the values appeared
X is a discrete random variable having the probability distribution

probability mass function of X is


p( x) 1 / 6,
if x 1,2,3,4,5,6.

Recall the first example where X is the random variable


denoting the gain and is given by

In tabular format, the probability distribution of X is


given by

Probabilities

0.2

Probability mass function of X is written as

0.15
0.1
0.05
0

x=1

x=2

x=3

x=4

QAM - I by Prof. Gaurav Garg (IIM Lucknow)

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

Sometimes, the pmf can be expressed as a


mathematical function.
Example:
X denotes the number of tosses needed to get
the first tail.
X is a discrete random variable.

So the random variable X has the probability distribution


probability mass function of X is
1/ 2
1 / 22

p( x)
3
1 / 2

if x 1
if x 2
if x 3

probability mass function p(x) can also be written as

Also,

1
x
2
3
1 1 1
1
p ( x ) 2 1

1
2 2 2
x 1
x 1 2
1
2

QAM - I by Prof. Gaurav Garg (IIM Lucknow)

Example:
Consider the previous example again.
The discrete random variable has the pmf

The probability of getting a tail in less than 3 tosses is


given by
P(X < 3) = P(X=1) + P(X=2)
= p(1) + p(2)
= (1/2) + (1/2)2
=1/2 + 1/4
= 3/4
QAM - I by Prof. Gaurav Garg (IIM Lucknow)

Expectation of a Discrete Random Variable


X is a discrete random variable having the pmf p(x)
Expectation or Expected value or mean of X is given by

Recall the first example where X is the random variable


denoting the gain
pmf of X is
3 / 4 if x 100
p ( x)
1 / 4 if x 200

Expected gain of the person is


E(X) = (100)(3/4) + (-200)(1/4) = 25 Rupees
QAM - I by Prof. Gaurav Garg (IIM Lucknow)

QAM - I by Prof. Gaurav Garg (IIM Lucknow)

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)

Expectation of a random variable can be interpreted


as some sort of average of all the values that the
random variable takes.
So, expected value of a random variable is the center
of its distribution.
The concept of expectation is analogous to the
physical concept of the center of gravity of a
distribution of mass.
If a and b are constants; and X and Y are random
variables, then we have
E(a) = a,
E(aX) = aE(X),
E(aX + bY) = aE(X) + bE(Y).
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

A shipment of 6 television sets contains 2 defective sets.


A hotel makes a random purchase of 3 of the sets.
If X is the no. of defective sets purchased by the hotel.
How many defective sets are expected?
Ans: 1

We have to find E(X)


Ans: 2

QAM - I by Prof. Gaurav Garg (IIM Lucknow)

QAM - I by Prof. Gaurav Garg (IIM Lucknow)

Variance of a Discrete Random Variable


The idea of center is not enough to summarize a
probability distribution.
We need some idea of variability also.
Variance of a random variable X is defined as

Var ( X ) X2 E X E ( X )

E ( X )

E X

It is the expected squared deviation of possible


values of X from its mean.

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

XY is the covariance between X and Y.


(will be discussed later)

QAM - I by Prof. Gaurav Garg (IIM Lucknow)

QAM - I by Prof. Gaurav Garg (IIM Lucknow)

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

A shipment of 6 television sets contains 2 defective sets.


A hotel makes a random purchase of 3 of the sets.
If X is the no. of defective sets purchased by the hotel.
Find Var(X).
Ans: 2/5
QAM - I by Prof. Gaurav Garg (IIM Lucknow)

where p(x) is the pmf of X.


Note that Variance is always non-negative.
Standard Deviation of X = x = [Var (X)]
If a and b are constants, X and Y are random variables,
then we have

Joint Probability Distribution of two Discrete


Random Variables
Let X and Y be two discrete random variable
Joint probability distribution or joint probability mass
function of X and Y is
X Y
a1
a2
.
.
an
Total

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

pij P( X ai and Y b j ), i 1,2,, n; j 1,2,, m.


QAM - I by Prof. Gaurav Garg (IIM Lucknow)

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

QAM - I by Prof. Gaurav Garg (IIM Lucknow)

Covariance between two Discrete


Random Variables
X and Y are two discrete random variables.
Covariance is a measure of strength of relationship
between X and Y.
It is given by

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

QAM - I by Prof. Gaurav Garg (IIM Lucknow)

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

QAM - I by Prof. Gaurav Garg (IIM Lucknow)

QAM - I by Prof. Gaurav Garg (IIM Lucknow)

Independence of two Discrete Random Variables

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)

Two discrete random variables X and Y are said


to be independent of each other when
pij = (pi.) (p.j) for i = 1,2,,n and j = 1,2,,m.
When X and Y are independent, then covariance
between them is zero.
i.e., XY = 0.
This implies that when X and Y are independent,
E(XY) = E(X).E(Y)
QAM - I by Prof. Gaurav Garg (IIM Lucknow)

6/30/2016

Probability Distribution of a Continuous Random


Variable

X is continuous random variable.


Range set Rx of X is an interval on the real line.
X can take infinite number of values and they are
always uncountable.
We can not assign a probability to each possible
value.
pmf is defined only for points x1, x2,
Point probability p(x) becomes meaningless in
this case.

The probability distribution of a continuous random


variable is given by probability density function (pdf)
pdf is defined as

f ( x) lim h0
Provided

f ( x) 0, for all x and

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

QAM - I by Prof. Gaurav Garg (IIM Lucknow)

Consider a continuous random variable X.


pdf of X is f(x) with range set Rx
Probability that X takes the values on an interval
(a,b) or (a,b] or [a,b) or [a,b] is given by

1
h
h
P x X x
h
2
2

QAM - I by Prof. Gaurav Garg (IIM Lucknow)

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)

Expectation of a Continuous Random Variable


If X is a continuous random variable.
The probability density function of X is f(x).
The range space of X is RX.
Then the Expectation of X is given by

E( X )

Example:

xf ( x)dx
RX

If X is a continuous random variable with pdf

f(x) = a e-ax, a > 0, x > 0.


Find E(X).
Ans: 1/a
QAM - I by Prof. Gaurav Garg (IIM Lucknow)

QAM - I by Prof. Gaurav Garg (IIM Lucknow)

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

Variance of a Continuous Random Variable

X is a continuous random variable.

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

Continuous Random Variable


o Probability density function of a continuous random variable
o Expectation of a continuous random variable
o Variance of a continuous random variable
QAM - I by Prof. Gaurav Garg (IIM Lucknow)

10

Das könnte Ihnen auch gefallen