Chapter 2
Chapter 2
What do you
canada
0.0
think the return
will be next month?
-0.1
Index 20 40 60 80 100
0.08
Index 5 10 15 20
defs100
0.5
1 means defective.
0 means good.
25% are defective. 0.0
Index 10 20 30 40 50 60 70 80 90 100
coin
0.5
Suppose we
toss the coin 25 times.
0.0
0 5 10 15 20 25
We get a sequence time
coin
0.5
same
data
0.0
Index 5 10 15 20 25
Frequency
5
We had 13 heads
and 12 tails. 0
0 1
coin
1 + 1 + 0 + 1 + L + 0 13(1) + 12(0)
= = .52
25 25
X will be either a 1 or a 0.
The two possible outcomes are equally likely (by the very
nature of a coin).
Over the long run, if we tossed the coin over and over again,
we expect a 1 (or, equivalently, a zero) 50% of the time.
n1 n0
then, ≈ .5 ≈ .5
n n
Of course, if we toss 5
Frequency
4
a coin 10 times we 3
do not necessarily 2
0
5 heads and 5 tails. 0 1
toss10
500
If we toss it 1000
400
times we expect
Frequency
300
the proportion to
200
work out in the
100
long run.
0
0 1
toss10thou
© Imperial College Business School
50
40
Percent
30
10,000 tosses
20
10
0 1
C5
p X (1) = p p X (0) = 1 − p
Then,Y = X 1 + X 2 +L+ X n
We write: Y ~ B(n, p)
distribution. Just like Be(p) is a symbol
for the Bernoulli distribution. The
meaning is all that matters.
r .05 .1 .15
Consider again the
return example: p(r) .1 .5 .4
0.4
0.3
f(x)
0.2
0.1
0.0
-3 -2 -1 0 1 2 3
x
© Imperial College Business School
0.4
area is
0.3
.477
f(x)
0.2
0.1
0.0
-3 -2 -1 0 1 2 3
x
0.20
f(c) 0.15
0.10
0.05
0.00
0 5 10
c
Question
Question
1.0
0.8
U
0.6
pdf
0.4
0.2
0.0
-2 0 2 4 6 8
U3
U1
© Imperial College Business School
2.3 The Normal Family of Distributions
f(x)
0.2
This distribution is
called the standard 0.1
-3 -2 -1 0 1 2 3
x
Pr(-1<Z<1) = .68
If Z has this distribution,
then:
Pr(-1.96<Z<1.96)=.95
0.8
X2 = .5Z X4 = 5+.5Z
0.6
0.4
Z
X1 = 2Z
X3 = 5+2Z
0.2
0.0
-5 0 5 10
0.95 = Pr(-2<Z<2) =
Pr(1<X3<9) = Pr(5+2(-2)<X3<5+2(2)) =
Pr(-4<X1<4) =
Pr(4<X4<6) = Pr(5+.5(-2)<X4<5+.5(2))=
Pr(-1<X2<1) =
© Imperial College Business School
σ: spread or tighten
In general, let X = µ + σZ µ: move
0.4
0.3
f(x)
0.2
0.1
0.0
µ − 2σ µ µ + 2σ x
We write, X ~ N ( µ, σ 2 )
Equivalently, X = µ + σZ
where Z is the standard normal Z ~ N (0,1)
Properties:
Note: σ>=0
µ : your “prediction”
σ : how “sure” are you, +/- 2σ.
© Imperial College Business School
Note: in the next section of the notes we will see that
µ is the “mean”, σ is the “standard deviation” and σ2
is the variance of the normal random variable.
0.7
0.6
0.5
C2
0.4
0.3
0.2
0.1
0.0
-6 -4 -2 0 2 4 6 8
x
© Imperial College Business School
Note: If we say X~N(5,4), then
µ=5
σ=2
FX ( x) = P( X ≤ x)
© Imperial College Business School
Example:
0.4
0.3
f(x)
0.2
0.1
0.0
-3 -2 -1 0 1 2 3
x
© Imperial College Business School
The c.d.f. is handy for computing the probabilities
of intervals.
P(a < X ≤ b) = P( X ≤ b) − P( X ≤ a)
= FX (b ) − FX ( a )
Example 0.4
0.3
f(x)
0.2
we have: 0.1
0.0
P((-1,1)) = F(1)-F(-1) -3 -2 -1 0 1 2 3
x
= .84 - .16 = .68
.68
© Imperial College Business School
1.0
F (b)
F(x)
0.5
F (a )
0.0
-3 -2 -1 0 1 2 3
a x b
R~N(.01,.042)
10
p(r)
coin
0.5
Index 5 10 15 20 25
P(X=1)=.5
P(X=0)=.5
How would you predict
(or X~Bernoulli(.5)) the next one?
C5
0.5
Index 5 10 15 20
we have a pattern matter?
X1 ~ Bernoulli(.5) X 2 ~ Bernoulli(.5)
and
X2 is independent of X1
© Imperial College Business School
We say that the two X’s are independent
and identically distributed, Xi~Bernoulli(.5)
They are
i.i.d.
X1, X2,LXn
we have 700
600
Frequency
already seen 500
400
C1
0.5
i.i.d. draws 100
0
from the 0
C1
1
Bernoulli(.1)
distribution 0.0
By writing
1
C1
0
There is no pattern,
-1 they look “random”
-2
Index 10 20 30 40 50 60 70 80 90 100
0 here (between
+2 and –2)
-1
-2
ndex 10 20 30 40 50 60 70 80 90 100
>>c1=randn(100,1);
We multiply each value in
>>c1 = 5+2*c1;
c1 by 2and add 5
>>plot(c1)
10
These are i.i.d draws from
5 N(5,4)
C1
Index 10 20 30 40 50 60 70 80 90 100
The height of
each bar tells
us the percentage
of observations in
the interval.
61
>>[N,BIN] = histc(randn(1000,1),(-4:0.5:4));
>> bar((-4:0.5:4),N/100)
in the interval.
0.1
In large samples
these are close. 0.0
-4 -3 -2 -1 0 1 2 3 4
z
© Imperial College Business School
Example:
Frequency
histogram of 20
1
i.i.d N(0,1) draws
0
-1.5 -1.0 -0.5 0.0 0.5 1.0 1.5 2.0 2.5 3.0 3.5
C3
90
80
70
histogram of 1000 60
Frequency
50
-3 -2 -1 0 1 2 3
C4
© Imperial College Business School
Example:
150 400
300
Frequency
100
Frequency 200
50
100
0 0
-1 0 1 -4 -3 -2 -1 0 1 2 3 4 5
C1 normal
2.8 The Normal Distribution
and Data
0.0 No apparent
pattern!
-0.1
Index 20 40 60 80 100
30
25
Frequency
20 Normality
15 seems
10 reasonable!
5
(i__)
60
Windsor return: 50
40
Frequency
30
20
10
Skewed to the 0
( µ, σ )
Similarly, if the data are i.i.d Bernoulli, we would like
to know p.
31
30
20
29
28
Frequency
aWait
27
26 10
25
24
23
0
22
Index 10 20 30 40 50 60 70 80 90 100 22.0 23.2 24.4 25.6 26.8 28.0 29.2 30.4 31.6
aWait
Example
dji
1500
beerprod
level
9 16 9 9 1 10 12 9
4 1 10
12 10 10 2 9
10
15 12 2 9 2
8 9
10
1 12
14 11 11 11 12
7 12 11
12 11
11
12
13 12
6
12
Index 10 20 30 40 50 60 70 80 90 Index 10 20 30 40 50 60 70
0.1
Index 10 20 30 40 50 60 70 80 90
histogram). We can
Frequency
10
p(r)
4
r = .0127 + .0437z (µ + σ z)
r − µ r − .0127
z= =
σ .0437
The z values should look standard normal.
No way!
Frequency
10