introduction paul j. hurtado mathematical biosciences institute (mbi), the ohio state university 19...
DESCRIPTION
Why do statistics? Scientific vs. Mathematical Inference Estimation & Uncertainty Quantification Statistics with dynamic models? Challenges of statistics with ODEs?TRANSCRIPT
IntroductionPaul J. Hurtado
http://www.pauljhurtado.com/Mathematical Biosciences Institute
(MBI),The Ohio State University
19 May 2014 (Monday a.m.)
Workshop Overview• Why do we do statistics?• Estimation vs Uncertainty Quantification• ODEs vs “Classical” Models• Other useful topics…
I. Fundamental Concepts: Review/Overview• Linear models and ex
• Parameter Space & Bifurcations• Probability & Statistics• Optimization• Visualization
II. Computer Lab• Resources: (URL)• Scripts vs. console (R vs Matlab)• Simulating ODE Solutions• Graphics/Plotting• Random numbers• Manipulating Objects• …
III. Summary
Why do statistics?•Scientific vs. Mathematical
Inference•Estimation & Uncertainty
Quantification
Statistics with dynamic models?•Challenges of statistics with ODEs?
Additional Topics?•Markov Chain Monte Carlo (MCMC)•Bayesian Methods•Filtering (Kalman, Particle, etc)•Functional Data Analysis•SDEs, PDEs, SPDEs…•Decision Trees, Neural Networks,
etc.•etc!
Quick Review
•Linear Models•Probability•Parameter Space Bifurcations•Visualization
Linear Equations
X
Y
X
Y
Y = m X + b
X
Y
Y = m X + b
X
Y
Y = m X + b
X
Y
Y = m X + b + ε
X
Y
Y = m X + b
Why linear algebra?
• Curves: intuition based on lines.
• Models are rarely 1-dimensional! y1 = ax1 – bx3
y = m x vs y2 = – cx1 – dx2 + bx3
y3 = – bx3 + ax1
X
Y
Matrices & Vectors…… useful notation. For example, y =
Ax vs
… essential tools for math/computing.
or
Computers :: Matrix
Matrix ApplicationsTwo common ways matrices are used:
1. Storage variables: data, etc.* Easier, faster computations!
2. Maps/Transformations
Matrix transformations
Pick a random* matrix A. It can be written:
A = QDQ-1
where D=diag(λ1, …, λn) are eigenvalues, & the columns of Q are their eigenvectors.
y = A xQ: How does A convert x to y?
Matrix transformations
Example:
y1’ = A11y1+A12y2+…+A1nyn
y2’ = A21y1+A22y2+…+A2nyn
...
yn’ = An1y1+An2y2+…+Annyn
Matrix transformations
Example:
y1’ A11 A12 … A1n yn
y2’ A21 A22 … A2n yn
...
yn’ An1 An2 … Ann yn
=
A
Matrix transformations
Example:
y1’ λ1 0 … 0 yn
y2’ 0 λ2 … 0 yn
...
yn’ 0 0 … λn yn
= Q Q-1
A = Q D Q-1
Matrix transformations
Example:
y1’ λ1 0 … 0 yn
y2’ 0 λ2 … 0 yn
...
yn’ 0 0 … λn yn
= Q-1Q Q-1Q-1
Matrix transformations
Example:
Y1’ λ1 0 … 0 Y1
Y2’ 0 λ2 … 0 Y2
...
Yn’ 0 0 … λn Yn
=
Matrix transformations
Example:
Y1’ = λ1 Y1
Y2’ = λ2 Y2
...
Yn’ = λn Yn
Matrix transformations
Example:
Y1(t) = Y1(0)exp(λ1t)
Y2(t) = Y2(0)exp(λ2t)
...
Yn(t) = Yn(0)exp(λnt)
Matrix transformations
Example:
Y1(t) Y1(0)exp(λ1t)
Y2(t) Y2(0)exp(λ2t)
...
Yn(t) Yn(0)exp(λnt)
=
Matrix transformations
Example:
y1(t) Y1(0)exp(λ1t)
y2(t) Y2(0)exp(λ2t)
...
yn(t) Yn(0)exp(λnt)
= Q
Matrix transformations
Example:
y1(t) Y1(0)exp(λ1t)
y2(t) Y2(0)exp(λ2t)
...
yn(t) Yn(0)exp(λnt)
= q1 … qn
Matrix transformations
Example:
y1(t) y2(t)
…
yn(t)
= Y1(0)exp(λ1t) q1 + … + Yn(0)exp(λnt) qn
Matrix transformations
Summary #1: Eigenpairs tells us about the geometry of matrix transformations
Matrices & ModelsLinear Model in matrix form:
Yi = β0 + β1 Xi + εi where εi ~ N(0,σ2)
Matrices & ModelsLinear Model in matrix form:
Y1 = β0 + β1 X1 + ε1
Y2 = β0 + β1 X2 + ε2
…Yn = β0 + β1 Xn + εn
Matrices & ModelsLinear Model in matrix form:
Y1 β0 + β1 X1 ε1
Y2 β0 + β1 X2 ε2
…Yn β0 + β1 Xn εn
= +
Matrices & ModelsLinear Model in matrix form:
Y1 1 X1 ε1
Y2 1 X2 ε2
…Yn 1 Xn εn
= +β0
β1
Unknown!
Matrices & ModelsLinear Model in matrix form:
Goal: Minimize ε’ε = (Y-Xβ)’(Y-Xβ).
This is the same as solving (X’Y) = (X’X)β.
Y = X β + εUnknown!
Summary•Matrices are pervasive in scientific computing, statistics. - Computing with
vectors/matrices is faster, simpler than iteration/loops.
- Intuition improves use, interpretation.
•Linear algebra is a cornerstone of stats!
X
Y
Y = m X + b + ε
Probability Basics
Distributions Density CDF
Continuous Random Variables: Ex: Normal, Gamma, etc.
Distributions Mass CDF
Discrete Random Variables: Ex: Poisson, Binomial, etc.
Distributions Mass+Density CDF
20%
80%
20%
Mixed Distributions: Zero-inflated Normal,
etc.
Sampling CDFsLet r~Unif(0,1), CDF F(x) with inverse
F-1. Then F-1(r) ~ F(x). Ex: .67 5.1 .12 0.0 .85 5.9
Distributions in RR has many built-in densities and
CDFs!Density CDF Quantile Sample
dnorm pnorm qnorm rnorm
dpois ppois qpois rpois
… beta, binomial, Cauchy, χ2, exponential, F, gamma, geometric, hypergeometric, log-normal, multinomial, negative binomial, Student's t, uniform distribution, Weibull, etc.
Multivariate If Yi all independent, identically
distributedYi ~ f(y|θ)
then their joint distribution is the product
Y = (Y1, …,Yn) ~ f(yi|θ).
LiklihoodThe likelihood of data X=(X1,…,Xn)
under parameter θ is given byLik(θ|X) = f(Xi|θ).
The log-likelihood of data X=(X1,…,Xn) under parameter θ is given by
LL(θ|X) = log(f(Xi|θ)).
Parameter Space Bifurcations
Consumption Rate (a)
Satu
ratio
n Pa
ram
eter
(k)
Optimization
Visualization
GDP
Life
Exp
ecta
ncy
R2 = … p = …
Questions?