Open rriv opened 9 years ago
You are correct: the former is just Poisson with a fixed parameter, the latter is a compound distribution of an Exponential and a Poisson.
Perhaps the best way to see this is to plot the samples (using your code, and calling hist
on them)
We can see the differences in the distributions quite clearly (ignoring the width, but focusing on the height of each bar).
Hello,
first thanks a lot to Cameron to bring us such a nice book on MCMC.
Can anyone please tell me if I'm understanding correctly about Parent and Child relationships and distribution sampling.
Let me do the following (from Ch2 example) :
if I do now :
I'm taking 2000 random values from
data_generator
Poisson distribution, but with a constantparameter
(initially random chosen from Exponential distribution, but the same for all 2000 sample). I'm telling this following this sentence from PyMC Documentation § 3.4.1 :After all,
samples1
follows a Poisson distribution. With some parameter, but a Poisson distribution.If I do now :
Here
parameter
is drawn each timedata_generator
is sampled. Nowsamples2
has no more anything to do with a Poisson distribution. We really mixed the parent random parameter with the child distribution sampling.So I'd be glad to hear if I'm right or wrong... Thanks in advance,
Robert