### State Bayes Theorem and use it to calculate conditional probabilities

An extension of conditional probability is Bayes Theorem which can be written as:

$$P\left( A|B \right) =\frac { P\left( B|A \right) \ast P\left( A \right) }{ P\left( B \right) }$$

Example

Given a population of students in which 25% play baseball, 30% play basketball and the probability of a student playing basketball given they also play baseball is 10%, what is the probability a student plays baseball if we know that they play basketball?

Let event $$A$$ be “plays baseball” and event $$B$$ be “plays basketball” then,

$$P\left( A|B \right) =\frac { P\left( B|A \right) \ast P\left( A \right) }{ P\left( B \right) }$$

\begin{align*} P\left( baseball|basketball \right) & =P\left( basketball|baseball \right) \ast { P\left( baseball \right) }/{ P }\left( basketball \right) \\ & = .10 \ast {.25}/{.30} = .083\quad or \quad 8.3\% \\ \end{align*}

Another useful formula for calculating the probability of an event using conditional probabilities is shown below:

$$P\left( A \right) =P\left( A|B \right) \ast P\left( B \right) +P\left(A|B’ \right)\ast \left( 1-P\left( B \right) \right)$$

The probability of $$A$$ given $$B’$$, $$P\left(A|B’ \right)$$, can be shown as the dotted section in the diagram below:

Example

In a given population of students, 25% play baseball and 30% play basketball. Also, the probability of a student playing baseball given that they also play basketball is 10%. What is the probability that a student plays baseball given that they do not play basketball?

\begin{align*} P\left( A \right) & =P\left( A|B \right) \ast P\left( B \right) +P\left(A|B’ \right)\ast \left( 1-P\left( B \right) \right) \\ .25 &= .10 \ast .30 + x \left(1-.30 \right) \\ .22 &= x \ast \left(.70 \right) \\ x &= {.22}/{.70} = .314\quad or \quad 31.4\% \\ \end{align*}

Learning Outcome

Topic 1.g: General Probability – State Bayes Theorem and use it to calculate conditional probabilities.