MCMC implementation in Python
The simplest way to explore the distribution of A is to generate samples based on the samples of B, C, and D, using your rule. That is, for each iteration, draw one value of B, C, and D from their respective sample sets, independently, with repetition, and calculate A = B*C/D.
If the sample sets for B, C, and D have the same size, I recommend generating a sample for A of the same size. Much fewer samples would result in loss of information, much more samples would not gain much. And yes, even though many samples will not be drawn, I still recommend drawing with repetition.
I have the following problem:
There are 12 samples around 20000 elements each from unknown distributions (sometimes the distributions are not uni-modal so it's hard to automatically estimate an analytical family of the distributions).
Based on these distributions I compute different quantities. How can I explore the distribution of the target quantity in the most efficient (and simplest) way?
To be absolutely clear, here's a simple example: quantity A is equal to B*C/D
B,C,D are distributed according to unknown laws but I have samples from their distributions and based on these samples I want to compute the distribution of A.
So in fact what I want is a tool to explore the distribution of the target quantity based on samples of the variables.
I know that there are MCMC algorithms to do that. But does anybody know a good implementation of an MCMC sampler in Python or C? Or are there any other ways to solve the problem?
Maxim