Skip to content

Calculation error in "Introduction to Bayesian A/B Testing"? #714

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
AhmetZamanis opened this issue Oct 2, 2024 · 1 comment
Closed

Comments

@AhmetZamanis
Copy link

Notebook title: Introduction to Bayesian A/B Testing
Notebook url: https://github.com/pymc-devs/pymc-examples/blob/main/examples/causal_inference/bayesian_ab_testing_introduction.ipynb

Issue description

The modeling example under the subtitle Value Conversions models the revenue generated for each visitor as:
revenue = probability of paying at all * mean amount spent when paying.

The following priors are specified for the probability of purchase, theta, & mean purchase amount, lam, spent respectively:
image

Then, the following deterministic equation is used to calculate the average revenue per visitor, mu:
image

The calculation in the code:
image

Expected output

Shouldn't the calculation be mu = theta * lam, instead of mu = theta * (1 / lam)? Or am I missing something about the model specification?

@AhmetZamanis
Copy link
Author

My mistake, it stems from the model specification indeed:
lam in the model is the rate parameter for an Exponential distribution, so 1/lam is the mean.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant