Professional Documents
Culture Documents
L05 continuousRV
L05 continuousRV
Quantitative Methods 1
Continuous Random Variable
Examples:
• Price
• Income
• Time
• …
2
Probability Density Function (PDF)
Probabilities for continuous random variables are calculated for ranges of outcomes, not individual
outcomes.
E.g., not , but instead
This is because the outcome space is too large, any individual point has probability of 0.
(Imagine a point on a line has length of 0)
Definition
A probability density function (pdf) is a function that satisfies
1. for all ,
2. the total area under is equal to 1.
3
From PDF to Probability
𝑃 (𝑥1 < 𝑋 ≤ 𝑥 2 )
ONLY for continuous random variable
𝑓 (𝑥 )
𝑥1 𝑥2
4
Uniform Distribution
• for x outside [a, b]. Namely, X will NOT show up outside the interval [a,b]
5
Probability in a Uniform Distribution
The probability is
𝑥1 𝑥2
6
Probability in a Uniform Distribution
𝑥2 𝑥2
1 𝑥2− 𝑥1
𝑃 ( 𝑥 1 < 𝑋 ≤ 𝑥 2 )=∫ 𝑓 ( 𝑥 ) 𝑑𝑥=∫ 𝑑𝑥=
𝑥1 𝑥1
𝑏−𝑎 𝑏−𝑎
7
Expected Value / Mean
Definition
The expected value (mean) of a continuous random variable with probability density function is
8
Variance
Definition
Example: if X is uniform on [0, 1] then . Its PDF is for . Its variance is then
Last week, Each week, the value might Now, Each week, the value change has a uniform
• Increase by $1 with probability 0.55 distribution, denoted by
• Decrease by $1 with probability 0.45
After 1 year, what is the expected value and standard After 1 year, what is the expected value and standard
deviation of the investment? deviation of the investment?
10
Uniform distribution
For a uniform random variable , its mean (expected value) and variance are
In this example,
11
Why use ?
If ,
A random variable
• Increase by $1 with probability 0.55
• Decrease by $1 with probability 0.45
𝐸 ( 𝑌 𝑖 ) =1 ×0.55 + ( −1 ) ×0.45=0.1
2 2
𝑣𝑎𝑟 ( 𝑌 𝑖 ) =( 1− 0.1 ) ×0.55+ ( −1 −0.1 ) ×0.45=0.99
12
Value after 1 year
[ ] [ ]
52 52
𝑖=1
𝑖=1
13
Cumulative Distribution Function (CDF)
Definition
If s a continuous random variable with pdf then the cumulative distribution function (cdf) is
x
14
CDF of a Uniform Distribution
F(x)=0 if x < a
F(x)=1 if x > b
If
15
How to Draw CDF
16
How to Draw CDF: Another Example
17
A Point in a Continuous Variable
Recall: Continuous random variables have zero probability outcomes!
As
18
A Point in a Continuous Variable
Recall: Continuous random variables have zero probability outcomes!
As
19
Discrete Random Variable CDF has Jumps
CDF:
20
ECON10005
Quantitative Methods 1
Normal Distribution
where
22
Standard Normal Distribution N(0, 1)
• Zero mean
23
Change the mean
𝜇=−1
𝜇=2
24
Change the standard deviation
𝜎 =0.5
25
CDF of the Normal Distribution
where ,
28
Standard Normal CDF
𝑃 ( 𝑍 ≤− 1 )=0.159
29
Standard Normal CDF
𝑃 ( 𝑍 ≤ 0 )=0.5
30
Standard Normal CDF
977
31
Probability in an Interval
32
Probability in an Interval
𝑃 (− 0.5<𝑍 ≤ 1)
𝑃 ( − 0.5< 𝑍 ≤1 ) =𝑃 ( 𝑍 ≤1 ) − 𝑃( 𝑍 ≤ −0.5)
= NORM.DIST(1,0,1,TRUE)- NORM.DIST(-0.5,0,1,TRUE)
33
Finding Normal Distribution Quantiles
(Percentiles)
𝑧𝑝
34
Finding Normal Distribution Quantiles
(Percentiles)
Use
=NORM.INV(0.1, 0, 1) = -1.282
𝑝
The 10th percentile of the distribution of Z is
𝑧𝑝
35
Symmetry of the Normal Distribution
This is equivalent to
Use
=NORM.INV(0.9, 0, 1) = 1.282 0.1 0.1
-1.282 1.282 36
Example: Height
Suppose height can be considered to be normally distributed across a population. In Sri Lanka,
take the mean height to be 157.5cm with standard deviation of 9.0cm.
How tall does one have to be in order to be in the top 10% of the population?
37
Example: Height
Suppose height can be considered to be normally distributed across a population. In Australia, take the
mean height to be 168.7cm with standard deviation of 10.1cm.
If an individual is 169cm, where does this place them within this distribution?
We want to calculate
38
ECON10005
Quantitative Methods 1
Student t Distribution
A random variable X is distributed with degrees of freedom equal to if it has probability density function
• If , then
• If , then .
• As
40
t Distribution Varies with DF
41
t Distribution Varies with DF
42
t Distribution Varies with DF
43
t Distribution Varies with DF
44
t Distribution Varies with DF
45
t Distribution Varies with DF
46
T Distribution has Fat Tail
More “outliers”
47
Probability Calculation with t Distribution
Excel: = T.DIST()
-1 48
Probability Calculation with t Distribution
Excel: = T.DIST()
T.DIST.RT(-1, 3) = 0.804
or
-1 50
Probability Calculation with t Distribution
Excel: = T.DIST.2T()
T.DIST.2T(1, 3) = 0.391
51
Finding t Distribution Quantiles (Percentiles)
“Inverse” problem. Find the values for the corresponding probability
Example:
=T.INV(0.196, 3) = -0.998 -1
p=0.196
-1 52
Finding t Distribution Quantiles (Percentiles)
Example:
=T.INV.2T(0.391, 3) = 1
p=0.196 p=0.196
53