Skip to content

Instantly share code, notes, and snippets.

@fonnesbeck
Created October 26, 2016 21:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fonnesbeck/5c4dae4cec2c26fbc1b9eeb8163af0ce to your computer and use it in GitHub Desktop.
Save fonnesbeck/5c4dae4cec2c26fbc1b9eeb8163af0ce to your computer and use it in GitHub Desktop.
Sampling from the product of two betas
from pymc3 import Beta, Deterministic, Model, sample
with Model():
a = Beta('a', 3, 1)
b = Beta('b', 2, 5)
a_times_b = Deterministic('a_times_b', a*b)
trace = sample(2000)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment