Hello,
I’ll try to explain my motivations more clearly.
I’d like to know what the data Ng would look like under the hypothesis that the parameter a is equal to some value (for example a=0, which for me corresponds to the “background only hypothesis”, or null hypothesis let’s say). In my understanding of bayesian statistics, this should be done by building a “marginal model” with a=constant, where marginalization is done over the nuisance parameters.
If possible, I’d like to build this marginal model from the model that I already have (given in the script I attached in my first message).
To me, this “marginal model” thus describes the law of probability of Ng given a (it’s what I called Pmarginal). So yes, my question is essentially on how to construct Pmarginal by fixing the value of some parameters. In other words, how do we marginalize over some parameters in PyMC while fixing the value of other parameters ?
Once I have this marginal model, I’d like to generate the Ng observable from it and then inject this new set of Ng values (thus generated under the hypothesis a=constant value) as the observed value is the non-marginal model. This new set of Ng value is what we could call a pseudo-dataset under the null hypothesis.
The ultimate goal is to have a posterior like this:
P(a|Ng(a=0))
where Ng(a=0) represents my null hypothesis.