Professional Documents
Culture Documents
3 CommonDistributions
3 CommonDistributions
The University of Texas at Austin, CS 395T, Spring 2009, Prof. William H. Press 1
Many, though not all, common distributions look sort-of like this:
The University of Texas at Austin, CS 395T, Spring 2009, Prof. William H. Press 2
expectation notation:
R
hanythingi ≡ x (anything) p(x)dx
expectation is linear, etc.
2
® 2
2 2
®
minimize: ∆ ≡ (x − a) = x − 2ax + a
2® 2
= ( x − hxi ) + (hxi − a)2
This is the variance Var(x),
but all we care about here is
that it doesn’t depend on a.
The University of Texas at Austin, CS 395T, Spring 2009, Prof. William H. Press 3
Why mean-square? Why not mean-absolute? Try it!
Z ∞
∆ = h|x − a|i = |x − a| p(x)dx
−∞
Z a Z ∞
= (a − x) p(x)dx + (x − a) p(x)dx
−∞ a
So,
Z a Z ∞
d∆
0= = p(x)dx + 0 − p(x)dx + 0
da −∞ a
⇒
Z a Z ∞ Integrand at a
1
p(x)dx = p(x)dx = 2
−∞ a
⇒ a is the median value
The University of Texas at Austin, CS 395T, Spring 2009, Prof. William H. Press 4
Higher moments, centered moments defined by
i® R i
μi ≡ x = x p(x)dx
® R
Mi ≡ (x − hxi) = (x − hxi)i p(x)dx
i
The University of Texas at Austin, CS 395T, Spring 2009, Prof. William H. Press 5
Mean and variance are additive over independent random variables:
The University of Texas at Austin, CS 395T, Spring 2009, Prof. William H. Press 6
This is a good time to review some standard (i.e., frequently occurring) distributions:
Normal (Gaussian):
The University of Texas at Austin, CS 395T, Spring 2009, Prof. William H. Press 7
Student:
The University of Texas at Austin, CS 395T, Spring 2009, Prof. William H. Press 8
Common distributions on positive real line:
Exponential:
The University of Texas at Austin, CS 395T, Spring 2009, Prof. William H. Press 9
Lognormal:
The University of Texas at Austin, CS 395T, Spring 2009, Prof. William H. Press 10
Gamma distribution:
The University of Texas at Austin, CS 395T, Spring 2009, Prof. William H. Press 11
Chi-square distribution (we’ll use this a lot!)
Has only one parameter ν that determines both peak location and width.
ν is often an integer, called “number of degrees of freedom” or “DF”
The University of Texas at Austin, CS 395T, Spring 2009, Prof. William H. Press 12
For univariate distributions, one wants efficient computational methods for all of:
• PDF p(x)
• CDF P(x)
• Inverse of CDF x(P)
• Random deviates drawn from it (we’ll get to soon)
NR3 has classes for many common distributions, with algorithms for p, cdf, and inverse cdf.
The University of Texas at Austin, CS 395T, Spring 2009, Prof. William H. Press 13