I want to model Bayesian updating in PyMC3, but with a probability distribution for the observations, not actual observed data.

E.g. for some parameters N (sample count), \alpha, and \beta (prior distribution parameters), we know the analytical expression for updating a Beta prior with Binomial data:

X \sim B(N, \theta_{true})

\theta_{prior} \sim Beta(\alpha, \beta)

\theta_{post} = Beta(\alpha + X, \beta + N - X)

How would I simulate this update step in PyMC3 if I don’t know an analytical expression for \theta_{post}?

I would like to do something like the following:

```
with pm.Model() as model:
obs_distribution = pm.Binomial("X", N, theta_true)
theta_ = pm.Beta("theta", alpha, beta)
obs_sampled = pm.Binomial("y", N, theta, observed=obs_distribution)
```

But of course this doesn’t work, since `observed=`

needs a concrete value list, not a random variable.