Download FECStatsPrimer - Financial Engineering Club at Illinois

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts
Transcript
FEC
FINANCIAL ENGINEERING CLUB
WELCOME!
ο‚  Facebook: http://www.facebook.com/UIUCFEC
ο‚  LinkedIn: http://www.linkedin.com/financialengineeringclub
ο‚  Email: [email protected]
fecuiuc.com
is up!
Please Welcome the
MSFE Director,
Morton Lane!
PROBABILITY & STATISTICS
PRIMER
DISCRETE RANDOM VARIABLES
ο‚  Definition: The cumulative distribution function (CDF), of a random variable X is defined
by
𝐹 π‘₯ = 𝑃(𝑋 ≀ π‘₯)
ο‚  Definition: A discrete random variable, X, has probability mass function (PMF) if 𝑝 π‘₯ β‰₯
0 and for all events 𝐴 we have
𝑃 π‘‹πœ–π΄ =
π‘₯πœ€π΄ 𝑝(π‘₯)
ο‚  Definition: The expected value of a function of a discrete random variable X is given by
ΞΌ = 𝐸 𝑔(𝑋) =
𝑖 𝑔(π‘₯𝑖 )𝑝(π‘₯𝑖 )
ο‚  Definition: The variance of any random variable, X, is defined as
𝜎 2 = π‘‰π‘Žπ‘Ÿ 𝑋 = 𝐸 𝑋 βˆ’ 𝐸 𝑋
2
= 𝐸 𝑋 2 βˆ’ 𝐸[𝑋]2
BERNOULLI & BINOMIAL RVS
ο‚  Bernoulli RV:
ο‚  Let X=Bernoulli(p)
ο‚  Pdf:
ο‚  𝑃 𝑠𝑒𝑐𝑐𝑒𝑠𝑠 = 𝑝
ο‚  𝑃 π‘“π‘Žπ‘–π‘™ = 1 βˆ’ 𝑝
ο‚  0<𝑝<1
ο‚  Binomial RV:
ο‚ 
ο‚ 
ο‚ 
ο‚ 
ο‚ 
π΅π‘–π‘›π‘œπ‘šπ‘–π‘Žπ‘™(𝑛, 𝑝) = π‘†π‘’π‘š π‘œπ‘“ 𝑛 π΅π‘’π‘Ÿπ‘›π‘œπ‘’π‘™π‘™π‘–(𝑝)
PDF: p(k) = π‘›π‘˜ π‘π‘˜ 1 βˆ’ 𝑝 π‘›βˆ’π‘˜
𝐸 𝑋 = 𝑛𝑝
π‘‰π‘Žπ‘Ÿ 𝑋 = 𝑛𝑝(1 βˆ’ 𝑝)
Models:
ο‚  The probability that we achieve π‘˜ successes after 𝑛 trials, each with probability of success 𝑝
POISSON RVS
ο‚  Let 𝑋 = π‘π‘œπ‘–π‘ π‘ π‘œπ‘›(πœ†)
ο‚  𝑃𝐷𝐹: 𝑝(π‘˜) =
𝑒 βˆ’πœ† πœ†π‘˜
π‘˜!
ο‚  π‘˜ = 0,1,2,3, …
ο‚  πœ†>0
𝐸𝑋 = πœ†
ο‚  π‘‰π‘Žπ‘Ÿ 𝑋 = πœ†
ο‚  Models:
ο‚  The probability that some event occurs π‘˜ times in a fixed time period if the event is
known to occur at an average rate of πœ† times per time period, independently of the last
event.
GEOMETRIC DISTRIBUTION
ο‚  Let 𝑋 = π‘”π‘’π‘œπ‘šπ‘’π‘‘π‘Ÿπ‘–π‘ 𝑝
ο‚  0<𝑝<1
ο‚  𝑃 𝑋 =π‘˜ = 1βˆ’π‘
π‘˜βˆ’1
𝑝
ο‚  π‘˜ = 1,2,3,4 …
𝐸𝑋 =
1
𝑝
ο‚  π‘‰π‘Žπ‘Ÿ 𝑋 =
1βˆ’π‘
𝑝2
ο‚  Models:
ο‚  The probability that it takes π‘˜ successive independent trials to get first success with
probability of success for each event = 𝑝
CONTINUOUS RANDOM VARIABLES
ο‚  Definition: A continuous random variable, X, has probability density function
(PDF) if 𝑓 π‘₯ β‰₯ 0 and for all events 𝐴 we have
𝑃 π‘‹πœ–π΄ =
𝐴
𝑓 π‘₯ 𝑑π‘₯
ο‚  Definition: The cumulative distribution function (CDF), of a continuous random
variable X is related to the PDF by:
𝐹 π‘₯ =𝑃 𝑋≀π‘₯ =
π‘₯
𝑓
βˆ’βˆž
π‘₯ 𝑑π‘₯
ο‚  Definition: The expected value of a function of a continuous random variable X is
given by
ΞΌ = 𝐸 𝑔(𝑋) =
∞
𝑔(π‘₯)
βˆ’βˆž
𝑓 π‘₯ 𝑑π‘₯
EXPONENTIAL
ο‚  Let 𝑋 = 𝑒π‘₯π‘π‘œπ‘›π‘’π‘›π‘‘π‘–π‘Žπ‘™(πœ†)
ο‚  PDF:
ο‚  𝑓 π‘₯ = πœ†π‘’ βˆ’πœ†π‘₯
ο‚  𝐸𝑋 =
1
πœ†
ο‚  π‘‰π‘Žπ‘Ÿ 𝑋 =
1
πœ†2
ο‚  Models:
ο‚  The time between events occurring
independently and continuously at
a constant average rate
NORMAL/GAUSSIAN DISTRIBUTION
ο‚  Let 𝑋 = π‘π‘œπ‘Ÿπ‘šπ‘Žπ‘™(𝑒, 𝜎 2 )
ο‚  𝑓π‘₯(π‘₯) =
1
2𝜎2
𝑒
βˆ’ π‘₯βˆ’π‘’ 2
2𝜎2
ο‚  Central Limit Theorem:
Let 𝑋1 , … , 𝑋𝑛 be a sequence of 𝑛
independent random variables with mean
πœ‡ and variance 𝜎 2 . Then:
𝑛
𝑖=1 𝑋𝑖
β†’ π‘π‘œπ‘Ÿπ‘šπ‘Žπ‘™(𝑛𝑒, π‘›πœŽ 2 )
π‘Žπ‘  𝑛 β†’ ∞
BROWNIAN MOTION
BROWNIAN MOTION
120
u=1 var=100
100
u=3 var=800
80
u=1 var=300
60
40
20
0
-20
0
100
200
300
400
500
600
SIMULATING RANDOM VARIABLES
ο‚  For continuous, use inverse CDF method: if F(x) is cdf of random variable X then to
simulate X,
ο‚  Generate U~Uniform(0,1)
ο‚  X = Fβˆ’1 (π‘ˆ)
ο‚  Easy example: simulate an exponential with parameter Ξ»
ο‚  CDF 𝐹 π‘₯ = 1 βˆ’ 𝑒 βˆ’Ξ»π‘₯ if x β‰₯ 0 οƒ  𝐹 βˆ’1 𝑦 =
βˆ’1
ln(1
Ξ»
βˆ’ 𝑦)
ο‚  Simulate U~Uniform(0,1), note that (1-U)~Uniform(0,1)
1
ο‚  Set X = Ξ» ln(π‘ˆ), X is exponential(Ξ»)
CONDITIONAL PROBABILITY
ο‚  Definition: The probability that X occurs given Y occurred is:
𝑷 π‘‹π‘Œ =
𝑃 π‘‹βˆ©π‘Œ
𝑃 π‘Œ
ο‚  Bayes’s Theorem says that:
𝑷 𝒀𝑿
𝑷 𝑿𝒀 =
𝑷(𝑿)
𝑷(𝒀)
=
𝑷
𝑷
𝒀𝑿
𝒀𝑿
𝑷 𝑿 +𝑷
𝑷(𝑿)
𝒀 𝑿′
𝑷(𝑿′ )
MULTIVARIATE RANDOM VARIABLES
ο‚  We have two RVs, X and Y
ο‚  Let the joint PDF of X and Y be 𝑓(π‘₯, 𝑦)
ο‚  Definition: The joint cumulative distribution function (CDF) of 𝑍 satisfies
𝐹π‘₯,𝑦 π‘₯, 𝑦 = 𝑃 𝑋 ≀ π‘₯, π‘Œ ≀ 𝑦 =
𝑦
π‘₯
𝑓
βˆ’βˆž βˆ’βˆž
ο‚  Definition: The marginal density function of 𝑋 is:
𝑓π‘₯ π‘₯ =
∞
𝑓
βˆ’βˆž
π‘₯, 𝑦 𝑑𝑦
π‘₯, 𝑦 𝑑π‘₯𝑑𝑦
MULTIVARIATE RANDOM VARIABLES
MULTIVARIATE RANDOM VARIABLES
INDEPENDENT RANDOM VARIABLES
INDEPENDENT RANDOM VARIABLES
COVARIANCE
ο‚  Covariance is the measure of how much two variables change together.
ο‚  Cov(X,Y)>0 if increasing X β†’ increasing Y
ο‚  Cov(X,Y)<0 if increasing X β†’ decreasing Y
ο‚  πΆπ‘œπ‘£ 𝑋, π‘Œ = 0 𝑖𝑓 𝑋 & π‘Œ π‘Žπ‘Ÿπ‘’ 𝑖𝑛𝑑𝑒𝑝𝑒𝑛𝑑𝑒𝑛𝑑
ο‚  πΆπ‘œπ‘£ 𝑋, π‘Œ = πœŽπ‘‹π‘Œ
= 𝐸[ 𝑋 βˆ’ 𝑒π‘₯ π‘Œ βˆ’ π‘’π‘Œ ]
= 𝐸 π‘‹π‘Œ βˆ’ π‘’π‘‹π‘’π‘Œ
ο‚  πΆπ‘œπ‘£ 𝑋, 𝑋 = π‘‰π‘Žπ‘Ÿ 𝑋
ο‚  π‘‰π‘Žπ‘Ÿ
𝑛
𝑖=1 𝑋𝑖
=
𝑛
𝑖=1
=
𝑛
𝑗=1 πΆπ‘œπ‘£(𝑋𝑖, 𝑋𝑗)
𝑛
𝑖=1 π‘‰π‘Žπ‘Ÿ 𝑋𝑖 + 2
𝑛
𝑖=1
𝑛
𝑗=𝑖+1 πΆπ‘œπ‘£(𝑋𝑖, 𝑋𝑗)
CORRELATION COEFFICIENT
ο‚  Definition: The correlation of two RVs, X and Y, is defined by:
𝜌 π‘₯, 𝑦 =
πΆπ‘œπ‘£(𝑋,π‘Œ)
π‘‰π‘Žπ‘Ÿ 𝑋 π‘‰π‘Žπ‘Ÿ(π‘Œ)
ο‚  If X and Y are independent, they are uncorrelated:
𝜌 π‘₯, 𝑦 = 0
VARIANCE AND COVARIANCE
VARIANCE AND COVARIANCE
LINEAR REGRESSION
ο‚  Least Squares Method:
π’š = 𝜢 + πœ·π’™
𝒏
π’Š=𝟏(π’šπ’Š βˆ’πœΆ
π’Žπ’Šπ’π’Šπ’Žπ’Šπ’›π’†
βˆ’ πœ·π’™π’Š )𝟐
ο‚  The minimizing 𝛽 is:
𝛽=
πΆπ‘œπ‘£(π‘₯,𝑦)
π‘‰π‘Žπ‘Ÿ(π‘₯)
= π‘Ÿπ‘₯𝑦
𝑠𝑦
𝑠π‘₯
ο‚  The minimizing 𝛼 is:
𝛼 = π‘Žπ‘£π‘” 𝑦 βˆ’ 𝛽 βˆ— π‘Žπ‘£π‘”(π‘₯)
COMBINATIONS OF RANDOM VARIABLES
ο‚  πΏπ‘–π‘›π‘’π‘Žπ‘Ÿπ‘–π‘‘π‘¦ π‘œπ‘“ 𝑒π‘₯π‘π‘’π‘π‘‘π‘Žπ‘‘π‘–π‘œπ‘›: 𝐸[π‘Žπ‘‹ + 𝑏 π‘Œ] = π‘ŽπΈ[𝑋] + 𝑏𝐸[π‘Œ]
ο‚  πΆπ‘œπ‘£(π‘Žπ‘‹ + π‘π‘Œ, π‘π‘Š + 𝑑𝑍) = π‘Žπ‘πΆπ‘œπ‘£(𝑋, π‘Š) + π‘Žπ‘‘πΆπ‘œπ‘£(𝑋, 𝑍) + π‘π‘πΆπ‘œπ‘£(π‘Œ, π‘Š) +
π‘π‘‘πΆπ‘œπ‘£(π‘Œ, 𝑍)
ο‚  π‘‰π‘Žπ‘Ÿ[π‘Žπ‘‹ + π‘π‘Œ] = π‘Ž2 π‘‰π‘Žπ‘Ÿ(𝑋) + 2π‘Žπ‘πΆπ‘œπ‘£(𝑋, π‘Œ) + 𝑏 2 π‘‰π‘Žπ‘Ÿ(π‘Œ)
ο‚  Examples, portfolio mean and variance: Equations (1) and (3) generalized to N
variables (assets in the portfolio) with coefficients as weights: see boxed info in
http://en.wikipedia.org/wiki/Modern_portfolio_theory
MOMENT GENERATING FUNCTIONS
ο‚  𝑀π‘₯ 𝑑 = 𝐸 𝑒 π‘₯𝑑
ο‚  𝑀π‘₯β€² 0 = 𝐸 𝑋
ο‚  𝑀π‘₯β€²β€² 0 = 𝐸 𝑋 2
ο‚  …..
ο‚  𝑀π‘₯𝑛 0 = 𝐸[𝑋 𝑛 ]
GEOMETRIC BROWNIAN MOTION
MAXIMUM LIKELIHOOD ESTIMATOR
ο‚  Likelihood function 𝐿(πœƒ|𝑋) = 𝑃(𝑋|πœƒ)
ο‚  Let πœƒ represent all parameters to the RV 𝑋
ο‚  𝐿 is a function of πœƒ, 𝑋 fixed
ο‚  π‘€π‘Žπ‘₯πœƒ (𝐿(πœƒ|𝑋))
ο‚  πœƒπ‘šπ‘Žπ‘₯ is the maximum likelihood estimator (MLE)
THANK YOU!
ο‚  Facebook: http://www.facebook.com/UIUCFEC
ο‚  LinkedIn: http://www.linkedin.com/financialengineeringclub
ο‚  Email: [email protected]
fecuiuc.com
is up!
Next Meeting:
β€œTrading and Market
Microstructure”
Wed. 26th Feb. 6-7pm
165 Everitt