-
Notifications
You must be signed in to change notification settings - Fork 1
Chapter 6
Damon Snyder edited this page Aug 10, 2013
·
6 revisions
(cdf/cdf->probability-range (partial cdf/expocdf 0.01) 1 20)
0.17131
(cdf/cdf->probability-range (partial cdf/normalcdf 178.0 59.4) 177.8 185.4)
0.05091
About 5% of the US male population is eligible for the Blue Man Group.
If X has an exponential distribution with parameter λ, and Y has an Erlang distribution with parameters k and λ, what is the distribution of the sum Z = X + Y?
I believe this will result in an Erlang distribution with the same λ and k + 1. Since an Erlang distribution is the sum of k exponential distributions with a given λ, it follows that the sum of an exponential distribution and an Erlang distribution is the sum of k + 1 exponential distributions.
Simulation appears to confirm this result:
(def x #(random/expovariate 1.0))
(def y #(random/erlangvariate 1.0 1.0))
(stats/mean (repeatedly 1000000 #(random/erlangvariate 1.0 2.0)))
2.0009476353379774
(stats/mean (repeatedly 1000000 #(+ (x) (y))))
1.9998794810982121
(def test-dist (fn [] (+ (random/lognormalvariate 1 2.5) (random/lognormalvariate 1 2))))
(six/sample-mean-probability-plot
(random/sample 1000 #(six/sample-mean (Math/pow 2 22) test-dist))
1000
"\nZ = X + Y (both lognormal) n = 2^22 samples = 1000")