Bayesian Data Analysis in Python
Michal Oleszak
Machine Learning Engineer
# Different revenue per click num_impressions = 1000 rev_per_click_A = 3.6 rev_per_click_B = 3
# Compute number of clicks num_clicks_A = A_posterior * num_impressions num_clicks_B = B_posterior * num_impressions
# Compute posterior revenue rev_A = num_clicks_A * rev_per_click_A rev_B = num_clicks_B * rev_per_click_B
import pymc3 as pm
# Collect posterior draws in a dictionary revenue = {"A": rev_A, "B": rev_B}
# Draw the forest plot pm.forestplot(revenue)
import pymc3 as pm
# Collect posterior draws in a dictionary
revenue = {"A": rev_A, "B": rev_B}
# Draw the forest plot
pm.forestplot(revenue, hdi_prob=0.99)
Bayesian Data Analysis in Python