Skip to main content
Statistics LibreTexts

5.3: Conditional Probability Demonstration

  • Page ID
    2105
  • \( \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

    • Compute conditional probabilities

    Instructions

    The simulation shows a set of \(30\) objects varying in color (red, blue, and purple) and shape (\(X\) and \(O\)). One of the objects is to be chosen at random. The various possible conditional probabilities are shown below the objects. Click on one to see how the conditional probability is computed. For example, if you click on P(X|Red) which is read "the probability of \(X\) given Red" then a box is put around each of the red objects. Of these, those that are \(X's\) are shaded. The probability of \(X\) given it is red is the number of red \(X's\) (shaded boxes) divided by the total red items (the number of boxes).

    Click "Another Example" for new distribution of objects.

    Illustrated Instructions

    This demonstration starts by presenting you with a dataset of red, blue and purple \(Xs\) and \(Os\) (see screenshot below).

    conditional_demo1.jpg
    Figure \(\PageIndex{1}\): Conditional Probability demo

    Selecting one of the conditional probabilities changes the display to show you how this probability would be calculated from the provided data.

    The screenshot below shows the conditional probability for getting a selection being Blue given that it is a \(O\). The demonstration shows Puts a square around all \(19\) \(Os\) in the data and a shaded square around the \(5\) blue \(Os\).

    conditional_demo2.jpg
    Figure \(\PageIndex{2}\): Conditional probability for getting a selection being Blue

    Click "Another Example" for new distribution of objects.


    This page titled 5.3: Conditional Probability Demonstration 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.