Notice: Undefined variable: alid in /home/u294241901/domains/codingace.net/public_html/header.php on line 67

Posterior Distribution Plot Calculator

Estimate posterior shape from binomial evidence and priors. Review mean, mode, spread, and interval summaries. Build clear Bayesian visuals for decisions, teaching, and reporting.

Calculator inputs

Use the fields below to define a Beta prior and binomial evidence. Results appear above this form after submission.

Reset values

Example data table

These examples show how the posterior changes as prior strength and evidence shift.

Prior α Prior β Trials Successes Posterior α′ Posterior β′ Posterior mean Approx. 95% interval
2 3 40 18 20 25 0.4444 0.3039 to 0.5897
1 1 20 5 6 16 0.2727 0.1128 to 0.4717
5 2 30 24 29 8 0.7838 0.6398 to 0.8988

Formula used

Prior: θ ~ Beta(α, β)
Likelihood for x successes in n trials: L(θ | x, n) ∝ θ^x (1 − θ)^(n − x)
Posterior: θ | x, n ~ Beta(α + x, β + n − x)
Posterior mean = α′ / (α′ + β′)
Posterior mode = (α′ − 1) / (α′ + β′ − 2), when α′ > 1 and β′ > 1
Posterior variance = α′β′ / [ (α′ + β′)^2 (α′ + β′ + 1) ]

Equal-tailed credible limits are estimated numerically from the posterior cumulative distribution, and the decision probability is computed as 1 − F(threshold).

How to use this calculator

  1. Enter the prior alpha and beta values that describe your initial belief.
  2. Provide total trials and observed successes from your sample or experiment.
  3. Choose a credibility level, such as 90%, 95%, or 99%.
  4. Set a decision threshold if you want P(θ > threshold).
  5. Select how many plot points you want for the density curves.
  6. Press the submit button to generate the posterior results above the form.
  7. Download the plot-ready CSV or export a PDF summary for reporting.

FAQs

1. What does this calculator model?

It models a probability parameter with a Beta prior and binomial evidence. That makes it useful for conversion rates, defect rates, success rates, and similar bounded probabilities.

2. Why are alpha and beta called prior parameters?

They encode your belief before new observations arrive. Larger values create a stronger prior, while smaller values produce a flatter and less influential starting distribution.

3. What happens when successes equal trials?

The posterior shifts toward 1 because every trial succeeded. The exact peak still depends on your prior, so a strong skeptical prior can moderate that shift.

4. What does the credible interval mean?

It gives a probability-based interval for the parameter under the posterior model. For example, a 95% credible interval contains 95% of the posterior mass.

5. Why compare prior and posterior curves?

The comparison shows how strongly the data changed your belief. A narrow posterior indicates concentrated evidence, while a wide posterior suggests more remaining uncertainty.

6. What does probability above threshold show?

It estimates the posterior chance that the true parameter exceeds your chosen benchmark. This is helpful for go or no-go decisions and Bayesian performance targets.

7. Does the calculator support non-binomial likelihoods?

No. This version is designed for Beta-Binomial updating only. Other models, such as Poisson-Gamma or Normal-Normal, require different likelihood and posterior formulas.

8. Why might the mode show as boundary mode?

When the posterior alpha or beta is at most 1, the density peaks at an edge instead of the interior. In that case, the standard interior mode formula does not apply.

Related Calculators

posterior predictive checkbayesian logistic regressionprior probability calculatorrandom effects bayesianinverse gamma posteriorconjugate prior calculatorbayesian cross validationbayesian inference calculatorposterior odds ratiobayesian model evidence

Important Note: All the Calculators listed in this site are for educational purpose only and we do not guarentee the accuracy of results. Please do consult with other sources as well.