How to get the probabilities of this PyMC3 model?

Hi,
I just started with pymc and I’ve been documenting myself for a weeks
Maybe it’s a very stupid question but I can’t find how can I get the probabilities of
P(theta = '1'|y = '80')
P(y = '50'|theta = '3')
P(theta = '1', y = '80')

and get the graphic P(theta|y).
(Note that my prior is theta, my prior is discrete and my ‘y’ distribution is continuous, so for me it’s valid to find the range of 80.0 to 80.99 for example)

in this simple model:

import pymc3 as pm

num_people = 100

with pm.Model() as model:

theta = pm.BetaBinomial('θ', alpha=1., beta=1.,n=num_people)
y = pm.TruncatedNormal('y', mu=theta, sigma=15, lower=0.0, upper=101.0)
trace = pm.sample(10000, cores=1)


I’d appreciate any help,
John.

Hi, John! Your post is a little confusedly worded - when you say you want P(theta = '1'|y = '80'), it sounds like estimating the probability of variable A \ \text{being} = 80, given variable B \ \text{being} = 1, which sounds like fitting the joint distribution, but then you say theta is your prior.

Could you clarify what you mean?

Hi Gon_F !
Yes ! It sounds like the first scenario you told me !
One of the probabilities I want to calculate is the probability of theta = ‘1’ (in the beta binomial) and y = ‘80’ (range 80-80.99 because it’s continuous ).
Maybe I have a misunderstanding with the concept of get the probabilities with pymc3.

You can use the samples from the posterior trace to do this numerically.

1/