Here is my go-to advice for posting questions to stack-overflow-type forums: http://stackoverflow.com/help/mcve

]]>Your blog is a wonderful collection of information on PyMC and MCMC in general, a great help in (re)learning statistics. Thank You!

As e-mail address scrambler on Your page is not working, I’ll ask a question here, if You don’t mind. I believe that MCMC is a fitting tool for this type of problem but I haven’t found a good solution yet.

There is a “black box”/experiment yielding a random sample x[i] when given a set of parameters a[j]. The number of randoms is generally less than a 100, the number of variables is between 4 and 8.

I would like to use MCMC sampler to explore parameter space of a[j] to try and find a set that produces a random sample with distribution as close to a Poisson distribution with a specified rate as possible.

So far I’ve tried PyMC at fitting the sample histogram rather than the distribution itself: produce a desired histogram with numpy.random.poisson(rate,N); set it as an observed data; try to fit it with a histogram produced by the “black box” using parameters a. This “almost works”, but different runs often produce very different results as can be expected for a lowish N. But since there are no actual observed data, only a sample from a distribution with unknown properties, I would like to find another solution. What, in Your opinion, would be a “proper” way to compare these random samples and to minimize their difference? I would be very grateful for even a small nudge in the direction of a better answer. Thank You again!

Respectfully, Dmitrij

]]>-Ian

]]>