Conditional Probability Two Way Tables

## Conditional Probability Two Way Tables

Conditional Probability is the probability of something happening this is dependent on the outcome of a previous event.

For example, a class determines how students travel to school:

 Walk Car Bike Bus Train TOTAL Girls 5 5 2 2 1 15 Boys 4 2 3 5 2 16 TOTAL 9 7 5 7 3 31

If only part of the set of all events are considered, then the probability for an individual outcome will change. The probability of a student walking to school is P(walk) = frac(9)(31).

By changing the criteria (making it conditional) different probabilities can be generated. For example, given boys only, what is the probability that the boy walks to school? This is written as P(walk|boy) = frac(4)(16) (which simplifies to frac(1)(4). The P(walk|boy) layout means given a boy, what is the probability that he walks to school.

Note that the denominator changes, which is a sign that a conditional probability is being calculated.

## Example 1

A software company is analysing applications by where they are run. The table shows the primary reason for running software on each machine type.

 Games Social Work Other Desktop 23 5 17 4 Laptop 12 7 18 6 Phone 18 9 3 4

Given a desktop, what is the probability that it will be used for Social applications?

Because Desktops have been preselected, the denominator is the sum of only the desktop events (29).

Answer: P(desktop|social) = frac(5)(49)

## Example 2

From the table above, what is the probability that a social app will be running on a tablet?

Social apps have been preselected, so the denominator will be based on the total of the social apps (21)

Answer: P(social|tablet) = frac(5)(21)