Skip to main content
Statistics LibreTexts

5.13: Bayes Demo

  • Page ID
    2369
  • \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \) \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)\(\newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\) \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\) \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\) \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\) \( \newcommand{\Span}{\mathrm{span}}\) \(\newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\) \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\) \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\) \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\) \( \newcommand{\Span}{\mathrm{span}}\)\(\newcommand{\AA}{\unicode[.8,0]{x212B}}\)

    Learning Objectives

    • Calculate probabilities based on a tree diagram
    • Calculate probabilities based on Bayes' theorem

    Instructions

    This demonstration lets you examine the effects of base rate, true positive rate, and false positive rate on the probability that a person diagnosed with disease \(X\) actually has the disease. The base rate is the proportion of people who have the disease. The true positive rate is the probability that a person with the disease will test positive. The false positive rate is the probability that someone who does not have the disease will test positive. The demonstration is based on \(10,000\) people being tested. A tree diagram showing the results and calculations based on Bayes' theorem are shown. They should always agree.

    You can change the initial values and then press the "Calculate" button.

    Illustrated Instructions

    The Bayes' Theorem demonstration starts by displaying the results for the default base rate, true positive rate and the false positive rate as shown in the screenshot below. You can change any of these three numbers and click the "Calculate" button to get the results based on the changes you make.

    bayes_demo1.jpg
    Figure \(\PageIndex{1}\): Bayes' Theorem Demonstration

    This page titled 5.13: Bayes Demo is shared under a Public Domain license and was authored, remixed, and/or curated by David Lane via source content that was edited to the style and standards of the LibreTexts platform; a detailed edit history is available upon request.

    • Was this article helpful?