How to implement the Bayesian inference correctly?

Hi, the scope of your question is very wide and I also found the code hard to follow with the extra breaklines, repeated code and no syntax highlighting, here is an attempt to a partial answer.

There is really no way to know without some more information about what is it what you are trying to achieve, we’ll also probably need to run the code and play around for a bit which doesn’t seem possible as is, there is an st variable used for example which I think is supposed to be scipy.stats but I’m not sure.

I know it is hard and can also be frustrating, but in my case (and I imagine other people find is similar situations) I log in from time to time for a bit and try to answer some questions. Having limited time, I restrict myself to questions I can understand quickly and expect to be able to answer in that time window. The easier you manage to make this the higher probability someone will be able to answer.

Similar comments here, I’ll add more details on the other topic.

Having never written a distribution myself, I am afraid the best I can do is refer you to https://docs.pymc.io/projects/examples/en/latest/pymc3_howto/custom_distribution.html

1 Like