How can I calculate a conditional probability from a small outcome table?
Quick answer
To find P(A|B), first keep only the outcomes where condition B is true. Count how many of those also satisfy A, then divide that count by the size of the B group: P(A|B) = count(A and B) / count(B). If the B group is empty, the conditional probability is undefined; do not divide by zero. [S1]
The question, the details, the next step.
A practical checklist
Define A and B clearly before marking the table.
Mark each outcome as meeting or not meeting B.
Count only the B outcomes for the denominator.
Among those B outcomes, count the ones that also meet A for the numerator.
Check that the denominator is not zero before dividing.
If outcomes are not equally likely, use their probabilities instead of raw row counts.
A few more useful answers
Why isn’t the denominator the total number of outcomes?
Because “given B” restricts the calculation to outcomes where B is true. The denominator is the size or probability of that B group, not the full original set. [S1]
What should I write if the condition group is empty?
Write that the conditional probability is undefined because the probability of B is zero. Do not divide by zero. [S1]
Does counting rows work when outcomes are not equally likely?
Not generally. Use the probabilities of outcomes: divide P(A and B) by P(B), rather than relying on unweighted row counts. [S1]
Sources
References used for this guide.
- [S1] OpenStax Introductory Statistics 2e, Section 3.3: Two Basic Rules of Probability openstax.org · Checked
