FIT / PROBABILITY LAB
University, Probability and Statistics
Round 1/6
Score 0
Bayes Lab
Bayesian reasoning
Concept figure
Live Bayesian analysis
Adjust the model and examine the changes.
The maths
Bayes' theorem: P(D | +) = P(+ | D)P(D) / P(+).
For a test with prevalence π, sensitivity Se and specificity Sp:
P(D | +) = Seπ / [Seπ + (1−Sp)(1−π)].
Beta–Binomial: θ ~ Beta(α,β) and k successes from n independent Bernoulli trials give θ | data ~ Beta(α+k, β+n−k).
Posterior mean = (α+k)/(α+β+n).
The equal-tailed 95% credible interval uses the posterior's 2.5th and 97.5th percentiles.
Beta probabilities are evaluated using the regularised incomplete beta function and continued fractions; quantiles use bisection. Density plots use the log-gamma function.
Assumptions: fixed test accuracy within a scenario; independent, identically distributed Bernoulli observations for the updating model.