Chapter 3 - Market Data Analysis
Chapter 3 - Market Data Analysis
INTRODUCTION TO
PROBABILITY DISTRIBUTIONS
RANDOM VARIABLE
p(x) P(x) 1
all x
1/6
x
1 2 3 4 5 6
PROBABILITY MASS FUNCTION (PMF)
x p(x)
1 p(x=1)=1/6
2 p(x=2)=1/6
3 p(x=3)=1/6
4 p(x=4)=1/6
5 p(x=5)=1/6
6 p(x=6)=1/6
1.0
CUMULATIVE DISTRIBUTION FUNCTION (CDF)
1.0 P(x)
5/6
2/3
1/2
1/3
1/6
1 2 3 4 5 6 x
CUMULATIVE DISTRIBUTION
FUNCTION
x P(x≤A)
1 P(x≤1)=1/6
2 P(x≤2)=2/6
3 P(x≤3)=3/6
4 P(x≤4)=4/6
5 P(x≤5)=5/6
6 P(x≤6)=6/6
PRACTICE PROBLEM:
• The number of patients seen in the ER in any given hour is a random variable
represented by x. The probability distribution for x is:
x 10 11 12 13 14
P(x) .4 .2 .2 .1 .1
If you toss a die, what’s the probability that you roll a 3 or less?
a. 1/6
b. 1/3
c. 1/2
d. 5/6
e. 1.0
REVIEW QUESTION 2
Two dice are rolled and the sum of the face values is six? What
is the probability that at least one of the dice came up a 3?
a. 1/5
b. 2/3
c. 1/2
d. 5/6
e. 1.0
REVIEW QUESTION 3
Two dice are rolled and the sum of the face values is six. What
is the probability that at least one of the dice came up a 3?
f ( x) e x
This function integrates to 1:
e
x x
e 0 1 1
0
0
CONTINUOUS CASE: “PROBABILITY DENSITY FUNCTION”
(PDF)
p(x)=e-x
x
1 2
2 2
e
x x
P(1 x 2) e e 2 e 1 .135 .368 .23
1
1
EXAMPLE 2: UNIFORM DISTRIBUTION
x
1
1 x
0
0
1 0 1
EXAMPLE: UNIFORM DISTRIBUTION
• All probability distributions are characterized by an expected value (mean) and a variance
(standard deviation squared).
• It’s sometimes called a “weighted average” because more frequent values of X are weighted
more highly in the average.
• It’s also how we expect X to behave on-average over the long run (“frequentist” view again).
EXPECTED VALUE, FORMALLY
Discrete case: E( X ) x
all x
i p(xi )
Continuous case:
E( X ) x p(x )dx
all x
i i
Symbol Interlude
E(X) = µ
these symbols are used interchangeably
EXAMPLE: EXPECTED VALUE
x
decision making
i n
1
X i 1
n
i 1
xi ( )
n
• The Lottery
• A certain lottery works by picking 6 numbers from 1 to 49. It
costs $1.00 to play the lottery, and if you win, you win $2
million after taxes.
• If you play the lottery once, what are your expected winnings or
losses?
LOTTERY
1 1 1 “49 choose 6”
7.2 x 10-8
49 49! 13,983,816
Out of 49
6 43!6! numbers, this is
the number of
The probability function (note, sums to 1.0): distinct
combinations of 6.
x$ p(x)
-1 0.999999928
x$ p(x)
-1 .999999928
Expected Value
E(X) = P(win)*$2,000,000 + P(lose)*-$1.00
= 2.0 x 106 * 7.2 x 10-8+ .999999928 (-1) = .144 - .999999928 = -$0.86
Negative expected value is never good!
You shouldn’t play if you expect to lose money!
EXPECTED VALUE
If you play the lottery every week for 10 years, what are
your expected winnings or losses?
A roulette wheel has the numbers 1 through 36, as well as 0 and 00. If you bet $1 that an
odd number comes up, you win or lose $1 according to whether or not that event occurs. If
random variable X denotes your net gain, X=1 with probability 18/38 and X= -1 with
probability 20/38.
x$ p(x)
+1 .50
+$400,000 .50
x$ p(x)
+$200,000 1.0
EXPECTED VALUE DOESN’T HELP…
x$ p(x)
+1 .50
+$400,000 .50
x$ p(x)
+$200,000 1.0
E ( X ) 200,000
HOW TO DECIDE?
Variance!
• If you take the deal, the variance/standard deviation is 0.
•If you don’t take the deal, what is average deviation from the mean?
•What’s your gut guess?
VARIANCE/STANDARD DEVIATION
2=Var(x) =E(x-)2
“The expected (or average) squared distance (or deviation) from the mean”
Var ( x) E[( x ) ]
2 2
(x
all x
i ) p(xi )
2
VARIANCE, CONTINUOUS
Discrete case:
Var ( X ) (x
all x
i ) p(xi )
2
( xi ) p(xi )dx
2
Continuous case: Var ( X )
all x
SYMBOL INTERLUDE
• Var(X)= 2
• SD(X) =
( xi x ) 2 N
1
i 1
n 1
i 1
( xi x ) ( 2
n 1
)
2
all x
( xi ) 2 p(xi )
2
all x
( x i ) 2 p(xi )
On the roulette wheel, X=1 with probability 18/38 and X= -1 with probability 20/38.
2
(x )
all x
i
2
p(xi )
(1 (0.053)) 2 (18 / 38) (1 (0.053)) 2 (20 / 38)
(1.053) 2 (18 / 38) (1 .053) 2 (20 / 38)
(1.053) 2 (18 / 38) (.947) 2 (20 / 38)
.997
.997 0.99
Standard deviation is $.99. Interpretation: On average, you’re either 1 dollar above
or 1 dollar below the mean, which is just under zero. Makes sense!
REVIEW QUESTION 3
The expected value and variance of a coin toss (H=1, T=0) are?
a. .50, .50
b. .50, .25
c. .25, .50
d. .25, .25
REVIEW QUESTION 3
a. .50, .50
b. .50, .25
c. .25, .50
d. .25, .25
Return and Risk
RATES OF RETURN
Cashflow
IntrinsicValue 1 RRR
2. It increases cost of borrowing and hence cost of capital
3. It reduces money supply which lower demand for
securities and resultantly prices fall.
Measuring Risk
• The most commonly used measure of risk
for securities is standard deviation
• SD measure the total risk of a security or a
portfolio
• It measure deviations of each observation
from the arithmetic mean
n _
[R i
-
i1 R]2
n 1
STANDARD DEVIATION
n _
[R i -
i1 R]2
n 1
139 139
5.89
5 1 4
INTERPRETATION