Sie sind auf Seite 1von 16

52

Examples
1. I usually buy either one or two packets of biscuits each
time I go to the store with probabilities 0.4 and 0.4,
respectively. The packets cost Rs.10 each. However,
sometimes, (with 0.2 probability,) there is a sale when
the packets are sold at Rs.8 per pack, when I buy 10
packs. What is my average spend?

2. p(1) = 0.1, p(2) = 0.2 and p(5) = 0.7. E(X) =?


53

Expectation
Expectation of a random variable is the long-run average,
when computed over a very large number of trials.
Expectation can theoretically be measured through the
weighted average of the values of the random variable,
weighted by the corresponding probabilities.

Consider a discrete random variable X taking values x1,


x2, , xn with probabilities p(x1), p(x2), , p(xn)
respectively.
The expectation (or mean/average) of X is
n
E(X) xip(xi ).
i 1
54

Examples
1. I usually buy either one or two packets of biscuits each
time I go to the store with probabilities 0.4 and 0.4,
respectively. The packets cost Rs.10 each. However,
sometimes, (with 0.2 probability,) there is a sale when
the packets are sold at Rs.8 per pack, when I buy 10
packs. What is my average spend?

2. p(1) = 0.1, p(2) = 0.2 and p(5) = 0.7. E(X) =?


55

Variance
The variance of a random variable measures its spread.
For a discrete random variable X taking values x1, x2, ,
xn with probabilities p(x1), p(x2), , p(xn) respectively,
Variance is given by
n
V(X) (xi - E(X))2 p(xi )
i1
n
xi2p(xi ) E(X)2
i1

SD is the square root of variance.


56

Examples
1. I usually buy either one or two packets of biscuits each
time I go to the store with probabilities 0.4 and 0.4,
respectively. The packets cost Rs.10 each. However,
sometimes, (with 0.2 probability,) there is a sale when
the packets are sold at Rs.8 per pack, when I buy 10
packs. What is my average spend? Whats the variance?
SD?

2. p(1) = 0.1, p(2) = 0.2 and p(5) = 0.7. E(X) =? V(X)?


57

Properties of a Function
A coin is tossed. P(head) = p.
Let X = 1 if head, 0 if tail. E(X) = ? V(X)=?
58

Properties (True for all variables)


1. If X is a random variable, and a and b are two constants,
then
E(aX) = aE(X), E(b+X) = b+E(X).
Together: E(b+aX) = b+aE(X).
2. If X and Y are two random variables, then
E(X+Y) = E(X) + E(Y).
59

Properties
1. True for all variables: If X is a random variable, and a and b
are two constants, then
V(aX) = a2V(X), V(b+X) = V(X).
Together: V(b+aX) = V(aX) = a2V(X)

2. If X and Y are two independent random variables: then


V(X+Y) = V(X) + V(Y).
Otherwise there will be a cross-term. Well discuss that later.
60

Two dice
61

Two Dice
Y= sum of outcome based on two throws of a fair die

E(Y) =??? V(Y) =???


Any easier way to compute it?
62

Percentile/Quantile
100p th percentile or p-th quantile of a distribution is a
number Q such that F(Q)=p.
Note: If such a Q does not exist, then we choose the
smallest Q such that F(Q)p.

Example: Solve Exercise 4, Page 32, Case Mat.


63

Value at Risk
For a financial portfolio, for a given time horizon,
and probability p, the p VaR is defined as the (100-p)th
percentile of the loss distribution.
For example, if a portfolio of stocks has a one-day 5% VaR
of Rs. 1 Lakh, that means that the 95th percentile of the
distribution of losses for one-day period is Rs. 1Lakh.
It means: there is a 0.05 probability that the portfolio will fall
in value by more than Rs. 1 Lakh over a one-day period if
there is no trading.
Well come back to it when we discuss continuous random
variables.
64

Special Random Variables


We now discuss some special random variable needed for
specific modelling situations.

Examples:
Probability distribution of the number of rainy days in
Ahmedabad this year.
Probability distribution of the waiting time till the first day of rain
in terms of number of days after official onset of monsoon.
Probability distribution of number of children out of 100
randomly chosen kids of age 10 who have dropped out of
school.
Probability distribution of a rare event, say defects in a page
of our case mat.
65

Example : Based on Exercise 2, Case


Mat., Page 35
A sequence of shots are being fired independently.
P(Success) = 0.2.
a) P(no hit in the first 6 shots)=?
b) P(first hit in the 7th shot)=?
c) P(at least 1 hit in the first 10 shots)=?
66

Geometric Random Variable


A Bernoulli trial is a random event with only two possible
outcomes, say success and failure, with fixed
probabilities. We get to define success!
A geometric random variable is the number of Bernoulli
trials needed for the first success.
67

Geometric Distribution: Waiting for the 1st


success
Independent trials with probability of success p
X= number of trials needed to get the first success

P(X=k) =
P(X>k) = SURVIVAL FUNCTION!
P(X>k+r|X>k) =

E(X) =
V(X) =