Title | 24 Inverse Transforms for Continous Distributions |
---|---|
Author | Haiqing Gong |
Course | Intermediate Microeconomics SFW |
Institution | University of Guelph |
Pages | 7 |
File Size | 451.1 KB |
File Type | |
Total Downloads | 58 |
Total Views | 155 |
Mersenne Twister...
Inverse-transform Technique !
The concept generalized to continuous: !
For cdf function: r = F(x)
!
Generate r from uniform(0,1)
!
Find x by solving above equation for x !
i.e. apply the cdf inverse to the uniform random numbers r = F(x)
r1
x = F-1(r) x1
Exponential Distribution [Inverse-transform] !
Exponential Distribution: !
Exponential pdf:
f(x) = λe-λx !
for x ≥ 0
Exponential cdf:
F(x) = 1 – e-λx for x ≥ 0 !
Derive CDF-1
r = F(x) r = 1 – e-λx
solve for x
(isolate x, take log of both sides, then solve) !
To generate X1, X2, X3 …
Xi = F-1(Ri) = -(1/λ) ln(1 – Ri)
Figure: Inverse-transform technique for exp(λ = 1)
Other Distributions [Inverse-transform] !
Examples of other distributions for which inverse cdf works are: ! ! !
Uniform distribution Weibull distribution Triangular distribution
Empirical Continuous Dist’n ! !
[Inverse-transform] When theoretical distribution is not applicable To collect empirical data: ! !
!
Resample the observed data Interpolate between observed data points to fill in the gaps
For a small sample set (size n): !
Arrange the data from smallest to largest
!
The slope for each line segment is
!
Assign the probability 1/n to each interval
x(i ) − x(i−1) x(i ) − x(i−1) = n(x(i ) − x(i−1) ) = ai = i / n − (i − 1) / n 1/ n i⎞ ⎛ X = Fˆ −1 (R) = x(i ) + ai+1 ⎜ R − ⎟ ⎝ n⎠
(
)
= x(i ) + x(i+1) − x(i ) ( nR − i )
i =floor(R/n)
(i − 1) / n ≤ R ≤ i / n x(i-1) ≤ x ≤ x(i )
Empirical Continuous Dist’n !
[Inverse-transform] Example: Let the data collected for 100 broken-widget repair times be:
R1 = 0.83: Consider c3 = 0.66 < R1 < c4 = 1.00
X1 = x(4-1) + a4(R1 – c(4-1)) = 1.5 + 1.47(0.83-0.66) = 1.7
Empirical Continuous Dist’n !
[Inverse-transform] Example: Let the data collected for 100 broken-widget repair times be:
Textbook says accuracy increases with increasing samples. R1 = 0.83: Consider c3 = 0.66 < R1 < c4 = 1.00
X1 = x(4-1) + a4(R1 – c(4-1)) = 1.5 + 1.47(0.83-0.66) = 1.7
Not true!!!
Empirical Continuous Dist’n !
[Inverse-transform] Example: Let the data collected for 100 broken-widget repair times be:
Textbook says accuracy increases with increasing samples. R1 = 0.83: Consider
Smoothing needed!
c3 = 0.66 < R1 < c4 = 1.00
X1 = x(4-1) + a4(R1 – c(4-1)) = 1.5 + 1.47(0.83-0.66) = 1.7...