Chapter 4

advertisement
Chapter 4
The curve described by a simple molecule of air
vapor is regulated in a Manner just as certain as
the planetary orbits; the only difference between
them is that which comes from our ignorance.—
Marquis de LaPlace
Probability Distributions
and
Expected Value
1
Random Variables and
Probability Distributions
A random variable is a numerical quantity
whose value is determined by chance.
Number of arriving customers in an hour
Rate of return on a new portfolio
Your next year’s grade-point average
A probability distribution may provide:
A listing of possible values and probabilities.
A formula for computing probabilities.
A graph relating probabilities to values.
2
Some Probability Distributions
 Number of customers waiting for haircuts:
Number Waiting
Probability
0
1
2
3
.21
.37
.25
.17
1.00
 Number of heads in 5 coin tosses:
5!
r
5- r
Pr[heads  r ] 
(.5) (1  .5)
r!(5 - r )!
3
Expected Value
 The expected value of a random variable is
the probability-weighted average.
Number Waiting
0
1
2
3
4
Probability
Number Waiting
× Probability
.21
0 × .21 = 0.00
.37
1 × .37 = 0.37
.25
2 × .25 = 0.50
.17
3 × .17 = 0.51
Expected value = 1.38
The expected number waiting is 1.38.
Meaning of Expected Value
 For repeatable random experiments, the
expected value is the long-run average.
 3.5 dots for top of die cube.
 2.5 heads from 5 tosses.
 1.38 customers waiting for a haircut.
 For non-repeatable experiments there is no
long run. Probabilities are subjective and
express “conviction” the value will occur.
5
 A portfolio’s expected return of 13.58% is the
“average conviction” for its return.
Variance of a Random Variable
 The variance of a random variable is the
probability-weighted average of squared
deviations from the expected value.
Number Probab- Deviation
(x – 1.38)2
Waiting x
ility (x – 1.38) (x – 1.38)2 × Prob.
0
1
2
3
6
.21
.37
.25
.17
– 1.38
– 0.38
0.62
1.62
1.9044
.3999
.1444
.0534
.3844
.0961
2.6244
.4461
Variance = .9955
The variance is .9995 customers squared.
Importance of Variance
 It summarizes amount of variability in the
random variable.
 A companion measure is the standard
deviation (square root of the variance).
 Units are same as the random variable itself.
 In finance, variability expresses risk.
 When two stocks have the same expected
return, the one with the smaller variance is less
risky.
7
Finding the
Probability Distribution
 There are four ways to establish a
probability distribution:
 Deduction (apply probability laws & concepts)
 Sum of showing dots from two rolled dice
 Historical frequencies (extrapolate from past)
 Fire insurance claim size
 Judgment (out of “thin air” from interview)
 Sales of a new product
 Games played in next World Series
 Assumed pattern (supported by theory)
8
 Mean contents weight (normal distribution)
The Binomial Distribution
 Applies to a large class of random variables
generated by Bernoulli processes:
 Having a series of trials of like form.
 Two complementary outcomes per trial:
 success v. failure
head v. tail
defect v. satis.
 Constant trial success probability.
 Independent trial outcomes.
 Binomial Formula:
n!
r
n-r
Pr[ R  r ] 
P (1  P)
r!(n - r )!
9
Computing Binomial
Probabilities
 The number of trials is n, the trial success
probability is P, and R is the number of
successes.
 R=3 defectives from n = 5 items when P = .05:
5!
Pr[ R  3] 
(.05)3 (1  .95)53  .0011
3!(5 - 3)!
 R=7 correct, n=10 random answers, P=.6 true:
10
10!
Pr[ R  7] 
(.6)7 (1  .6)107  .2150
7!(10 - 7)!
About Binomial Formula
 Factorials (n!) account for possibilities:
 5! = 5×4 ×3 ×2 ×1 = 120
11
0! = 1
1! = 1
 Number of combinations: n!/r!(n-r)!
 Pr(1-P)n-r is the probability for any particular rsuccess outcome. They are identical for same r.
 Binomial formula is the product of the above. It
utilizes the addition law to find the probability for
any one of the several R = r possible outcomes.
 Messy hand computations. Values are tabled in
back of book and can be obtained on computer
using Excel.
The Normal Distribution
 The normal distribution is characterized by
its bell curve.
12
The Normal Distribution
 It has been found to give good fits to a
variety of phenomena, such as physical
dimensions. It is fundamental to statistics,
representing levels of the sample mean.
 It is totally specified by two parameters:
 The mean m
 The standard deviation s
 Probabilities are obtained for ranges:
13
 Correspond to areas under the normal curve.
 Defined by distances from center (mean).
Finding Areas
Under Normal Curve
 The area depends on the distance z in (units
of s) separating a point x from m:
z=
14
xm
s
125150
=
= .83
30
Poisson Distribution
 The Poisson distribution gives probabilities
for number of events over time or space.
 It has one parameter l, the mean rate.
 Poisson probabilities are calculated from:
e-lt(lt)x
Pr[X = x] =
x!
x = 0, 1, 2, . . .
 Cars arrive in a minute when l = 4/min.:
Pr[X = 2] =
15
e-4(4)2
2!
=
.0183(4)2
2!
 .1465
Poisson Process and
Exponential Distribution
 The Poisson process (random events over
time) involves a second distribution.
 The exponential distribution gives
probabilities for the time between events.
 The exponential cumulative probability
distribution function provides the values:
Pr[T < t] = 1  e lt
16
 For Example, customers arrive at l = 20 per
hour. Let T be the time between any 2 arrivals.
Pr[T < .1 hr] = 1  e 20(.1)  1  .1353=.8647
Templates and Software
 Excel Templates
 Palisade Decision Tools RISKview 4.0
17
Excel Templates
 Expected Value, Variance, and
Standard Deviation
 Binomial
 Normal
 Exponential
 Poisson
18
Expected Value, Variance, and
Standard Deviation Template
2. If more
rows are
needed
insert the
appropriate
number at
any
intermediate
row. It is
easiest not
to add the
new rows at
the end of
the table..
19
1. Enter data in cells B4:C8.
A
B
C
D
E
F
EXPECTED VALUE, VARIANCE AND STANDARD DEVIATION
1
2
3
Value
Probability
4
10
0.10
5
20
0.25
C
6
30
0.30
10 =SUMPRODUCT(B4:B8,C4:C8)
7
40
0.25 11 =SUMPRODUCT(C4:C8,(B4:B8-C10)^2)
8
50
0.10 12 =SQRT(C11)
9
10 Expected Value =
30
11 Variance =
130
12 Standard deviation =
11.40
Figure 4-2 The Excel spreadsheet for calculating
expected value, variance, and standard deviation
for the price of ChipMont
Excel’s BINOMDIST Function
=BINOMDIST(r,n,P,cumulative)
r = number of successes
n = number of trials
P = success probability
cumulative = TRUE for cumulative
distribution and FALSE for individual
probabilities
20
2. If more
rows are
needed insert
them at any
intermediate
row. Copy
the formulas
in columns B
and C down
to the
inserted rows
and onwards
to the bottom
of the
expanded
table.
21
Binomial Probability Distribution
Excel Template
A
B
C
D
E
F
G
1
BINOMIAL PROBABILITY DISTRIBUTION
2
3
4 Number of trials n =
100 Trial success probability P =
0.3
5
6 Number of Probability Cumulative
7 Successes Density
Probability
Pr[R < r]
8
r
Pr[R = r]
B
9
25
0.0496
0.1631
9 =BINOMDIST(A9,$C$4,$G$4,FALSE)
10
26
0.0613
0.2244
10 =BINOMDIST(A10,$C$4,$G$4,FALSE)
11
27
0.0720
0.2964
11 =BINOMDIST(A11,$C$4,$G$4,FALSE)
12
28
0.0804
0.3768
12 =BINOMDIST(A12,$C$4,$G$4,FALSE)
13
29
0.0856
0.4623
13 =BINOMDIST(A13,$C$4,$G$4,FALSE)
14
30
0.0868
0.5491
14 =BINOMDIST(A14,$C$4,$G$4,FALSE)
15 =BINOMDIST(A15,$C$4,$G$4,FALSE)
15
31
0.0840
0.6331
16 =BINOMDIST(A16,$C$4,$G$4,FALSE)
16
32
0.0776
0.7107
17 =BINOMDIST(A17,$C$4,$G$4,FALSE)
17
33
0.0685
0.7793
18 =BINOMDIST(A18,$C$4,$G$4,FALSE)
18
34
0.0579
0.8371
19 =BINOMDIST(A19,$C$4,$G$4,FALSE)
19
35
0.0468
0.8839
1. Enter new data
in C4 and G4.
Figure 4-8 (upper portion) Excel spreadsheet and
graph for finding binomial probabilities for number of
persons remembering aspirin ad
Binomial Probability Distribution
Binomial Probabilities for the Number of
Persons Remembering Aspirin Ad
Probability
1.0
0.8
0.6
Density
Cumulative
0.4
0.2
0.0
25 26 27 28 29 30 31 32 33 34 35
Number of Persons
22
Figure 4-8 (lower portion) Excel spreadsheet and
graph for finding binomial probabilities for number of
persons remembering aspirin ad
Excel’s NORMDIST Function
=NORMDIST(t,m,s,cumulative)
t = value for which the normal
probability is being calculated
m = mean
s = standard deviation
cumulative = TRUE for cumulative
distribution and FALSE for individual
probabilities
23
Normal Distribution
Excel Template
2. If more rows
are needed insert
them at any
intermediate row.
Enter the data in
column A. Copy
the formulas in
columns B and C
down to the
inserted rows and
onwards to the
bottom of the
expanded table.
24
A
B
C
D
E
F
1
NORMAL DISTRIBUTION
2
3 Mean mu =
150
4 Standard deviation sigma =
30
5
6
Frequency
Cumulative
7
Time
Curve
Distribution
8
x
f(x)
F(x)
9
60
0.0001
0.0013
C
9 =NORMDIST(A9,$C$3,$C$4,TRUE)
10
85
0.0013
0.0151
10 =NORMDIST(A10,$C$3,$C$4,TRUE)
11
90
0.0018
0.0228
11 =NORMDIST(A11,$C$3,$C$4,TRUE)
12
120
0.0081
0.1587
12 =NORMDIST(A12,$C$3,$C$4,TRUE)
13
125
0.0094
0.2023
13 =NORMDIST(A13,$C$3,$C$4,TRUE)
14
140
0.0126
0.3694
14 =NORMDIST(A14,$C$3,$C$4,TRUE)
15
150
0.0133
0.5000
15 =NORMDIST(A15,$C$3,$C$4,TRUE)
16
165
0.0117
0.6915
16 =NORMDIST(A16,$C$3,$C$4,TRUE)
17 =NORMDIST(A17,$C$3,$C$4,TRUE)
17
170
0.0106
0.7475
18 =NORMDIST(A18,$C$3,$C$4,TRUE)
18
180
0.0081
0.8413
19 =NORMDIST(A19,$C$3,$C$4,TRUE)
19
185
0.0067
0.8783
20 =NORMDIST(A20,$C$3,$C$4,TRUE)
20
190
0.0055
0.9088
21 =NORMDIST(A21,$C$3,$C$4,TRUE)
21
195
0.0043
0.9332
22 =NORMDIST(A22,$C$3,$C$4,TRUE)
22
210
0.0018
0.9772
23 =NORMDIST(A23,$C$3,$C$4,TRUE)
23
240
0.0001
0.9987
1. Enter new
data in
C3:C4.
Figure 4-13 (upper portion) Spreadsheet for
typesetting normal distribution
Normal Distribution
25
1.00
Probability
The graph here
has equal time
intervals so the
curves are
smoother and
the normal
frequency
curve is
multiplied by
50 to be able
to see it better.
Normal Distribution for the Typesetting Example
0.80
f(x)*50
F(x)
0.60
0.40
0.20
0.00
80
100
120
140
160
180
200
220
Tim e, m inutes
Figure 4-13 (lower portion) Spreadsheet for
typesetting normal distribution
Excel’s EXPONDIST Function
=EXPONDIST(t, l,cumulative)
t = value for which the exponential
probability is being calculated
l = mean arrival rate
s = standard deviation
cumulative = TRUE for cumulative
distribution and FALSE for individual
probabilities
26
2. If more
rows are
needed insert
them at any
intermediate
row. Enter the
data in column
A. Copy the
formulas in
columns B and
C down to the
inserted rows
and onwards to
the bottom of
the expanded
table.
27
Exponential Distribution
Excel Template
A
B
C
D
E
F
G
1
EXPONENTIAL DISTRIBUTION
2
3 Mean rate lam bda = 4
1. Enter new
4
data in C3.
5 Interarriv al Frequency Cumulative
6
Time
Curve
Distribution
C
7
t
f(t)
F(t)
8 =EXPONDIST(A8,$C$3,TRUE)
8
0
4.0000
0.0000
9 =EXPONDIST(A9,$C$3,TRUE)
9
0.1
2.6813
0.3297
10 =EXPONDIST(A10,$C$3,TRUE)
10
0.2
1.7973
0.5507
11 =EXPONDIST(A11,$C$3,TRUE)
11
0.3
1.2048
0.6988
12 =EXPONDIST(A12,$C$3,TRUE)
12
0.4
0.8076
0.7981
13 =EXPONDIST(A13,$C$3,TRUE)
13
0.5
0.5413
0.8647
14 =EXPONDIST(A14,$C$3,TRUE)
14
0.6
0.3629
0.9093
15 =EXPONDIST(A15,$C$3,TRUE)
15
0.7
0.2432
0.9392
16 =EXPONDIST(A16,$C$3,TRUE)
16
0.8
0.1630
0.9592
17 =EXPONDIST(A17,$C$3,TRUE)
17
0.9
0.1093
0.9727
18 =EXPONDIST(A18,$C$3,TRUE)
18
1
0.0733
0.9817
Figure 4-16 (upper portion) Spreadsheet
for exponential distribution
Exponential Distribution
Exponential Frequency Curve
and Cumulative Distribution
4
3
f(t)
2
F(t)
1
0
0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
Interarrival Time
28
Figure 4-16 (lower portion) Graph for
exponential distribution
0.9
1
Excel’s POISSON Function
=POISSON(X, mean,cumulative)
X = number of events during time period t
mean = lt
l = mean number of events per unit time
cumulative = TRUE for cumulative
distribution and FALSE for individual
probabilities
29
Poisson Distribution
Excel Template
A
2. If more rows are
needed insert them
at any intermediate
row. Enter the data
in column A. Copy
the formulas in
columns B and C
down to the inserted
rows and onwards
to the bottom of the
expanded table.
30
B
C
D
E
F
G
1
POISSON DISTRIBUTION
2
3 Mean rate lambda =
4
4 Duration t =
1
5
6 Number of Density Cumulative
7
Arrivals
Function Probability
B
Pr[X < x]
8
x
Pr[X=x]
9 =POISSON(A9,$C$3*$C$4,FALSE)
9
0
0.0183
0.0183
10
=POISSON(A10,$C$3*$C$4,FALSE)
10
1
0.0733
0.0916
11 =POISSON(A11,$C$3*$C$4,FALSE)
11
2
0.1465
0.2381
12 =POISSON(A12,$C$3*$C$4,FALSE)
12
3
0.1954
0.4335
13 =POISSON(A13,$C$3*$C$4,FALSE)
13
4
0.1954
0.6288
14 =POISSON(A14,$C$3*$C$4,FALSE)
14
5
0.1563
0.7851
15 =POISSON(A15,$C$3*$C$4,FALSE)
15
6
0.1042
0.8893
16 =POISSON(A16,$C$3*$C$4,FALSE)
16
7
0.0595
0.9489
17 =POISSON(A17,$C$3*$C$4,FALSE)
17
8
0.0298
0.9786
18 =POISSON(A18,$C$3*$C$4,FALSE)
18
9
0.0132
0.9919
19 =POISSON(A19,$C$3*$C$4,FALSE)
19
10
0.0053
0.9972
20 =POISSON(A20,$C$3*$C$4,FALSE)
20
11
0.0019
0.9991
21 =POISSON(A21,$C$3*$C$4,FALSE)
21
12
0.0006
0.9997
22 =POISSON(A22,$C$3*$C$4,FALSE)
22
13
0.0002
0.9999
23 =POISSON(A23,$C$3*$C$4,FALSE)
23
14
0.0001
1.0000
1. Enter new
data in C3:C4.
Figure 4-17 (upper portion)
Poisson Distribution
Poisson and Cumulative Poisson Probabilities
1.2
Probability
1.0
0.8
Pr[X=x]
0.6
Pr[X < x]
0.4
0.2
0.0
0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
Number of Arrivals
31
Figure 4-17 (lower portion) Graph of the Poisson
density function and the cumulative distribution
for number of arrivals
Palisade Decision Tools
RISKview
The RISKview 4.0 software program on the
CD-ROM accompanying this book provides a
picture of more than 30 different distributions.
A few of the more common distributions
beta, binomial, chi-square, exponential, gamma,
geometric, hypergeometric, normal, Poisson,
triangular, and uniform.
32
RISKview
To start RISKview, click on the Windows
Start button, select Programs, Palisade
Decision Tools, then RISKview 4.0.
RISKview will open and an initial screen
like the one shown next will appear.
33
Initial RISKview Screen
1. Click on
down arrow in
the Dist line to
show a list of
the other
distributions
RISKview can
display.
2. Enter the
mean in the m
line.
3. Enter the
std. dev. in the
s line.
34
Download