Tutorials › Introduction to Statistics › Reading Conditional Probability Notation

Conditional Probability and Bayes’ Rule · Tutorial 326 of 996

Reading Conditional Probability Notation

Learn to identify the conditioning event in conditional-probability notation and interpret the probability in the subgroup it specifies.

Beginner 9 min read

What You'll Learn

  • Read \(P(A\mid B)\) as the probability of event A given that event B has occurred.
  • Identify the event after the vertical bar as the conditioning event and reference group.
  • Translate conditional probabilities into statements about a specified subgroup.
  • Distinguish \(P(A\mid B)\) from \(P(B\mid A)\) using their different denominators.
  • Check that the conditioning event has positive probability before interpreting the conditional probability.

Why the Order of Events Matters

Conditional probability describes a probability after some information is known. The notation is compact, but its order carries meaning: \(P(A\mid B)\) asks about event \(A\) among outcomes where \(B\) has occurred. The event after the vertical bar sets the condition; it identifies the restricted group being considered.

A reliable way to read the notation is to say, “the probability of \(A\), given \(B\).” Then translate that phrase into a full sentence: “Among the outcomes for which \(B\) is true, what fraction also have \(A\) true?” This careful reading matters because reversing the events generally changes both the group under consideration and the answer.

Definition: For events \(A\) and \(B\), with \(P(B)>0\), the conditional probability of \(A\) given \(B\) is
$$ P(A\mid B)=\frac{P(A\cap B)}{P(B)}. $$
The event \(B\) is the conditioning event. It defines the restricted set of outcomes. The event \(A\cap B\) consists of outcomes where both \(A\) and \(B\) occur.

The denominator \(P(B)\) is not an incidental part of the formula: it corresponds to the group described by “given \(B\).” The numerator counts or measures only outcomes in that group that also satisfy \(A\). Thus, \(P(A\mid B)\) is a proportion within \(B\), rather than a proportion of all possible outcomes.

Reading the Notation in Both Directions

In \(P(A\mid B)\), \(A\) is the event whose probability is being asked for, while \(B\) is the information being taken as known. In \(P(B\mid A)\), those roles are reversed. The two expressions share the same joint event in their numerators, \(A\cap B\), but their denominators are different:

$$ P(A\mid B)=\frac{P(A\cap B)}{P(B)} \qquad\text{and}\qquad P(B\mid A)=\frac{P(A\cap B)}{P(A)}, $$

provided the relevant denominator is positive. A shared numerator does not make the conditional probabilities equal. The first is a proportion of the \(B\) group; the second is a proportion of the \(A\) group. There is no general rule that allows one to reverse the events without changing the question.

In words, the vertical bar can be read as “given that” or “among those for whom.” For example, if \(A\) means “uses a bus” and \(B\) means “attends a morning class,” then \(P(A\mid B)\) is the probability that a person uses a bus among morning-class attendees. It is not the probability that a person attends a morning class among bus users; that is \(P(B\mid A)\).

Why the Formula Uses the Conditioning Event as Its Denominator

The definition follows directly from restricting attention to \(B\). In a finite sample space with equally likely outcomes, suppose there are \(N\) possible outcomes, \(b\) of them in \(B\), and \(k\) in both \(A\) and \(B\). Once we know that \(B\) occurred, outcomes outside \(B\) are no longer in the restricted sample space. Of the \(b\) remaining outcomes, \(k\) also satisfy \(A\). Therefore the conditional proportion is \(k/b\).

The same conclusion follows by substituting the ordinary probabilities for equally likely outcomes. Since \(P(A\cap B)=k/N\) and \(P(B)=b/N\), with \(b>0\),

$$ \frac{P(A\cap B)}{P(B)} = \frac{k/N}{b/N} = \frac{k}{b}. $$

This is why the denominator is the probability of the conditioning event, not the probability of the event whose chance is being asked about. For outcomes that are not equally likely, the general definition still uses the ratio of probabilities \(P(A\cap B)/P(B)\); the count argument is only an intuitive explanation for equally likely outcomes.

Worked Example: Probability of Bus Use Among Morning Attendees

Consider a hypothetical group of 80 students. Of these, 36 attend a morning class, and 15 of the morning-class attendees use a bus to get there. Let \(M\) be the event that a student attends a morning class, and let \(U\) be the event that a student uses a bus. Find and interpret \(P(U\mid M)\).

The notation asks for bus use among morning-class attendees. The conditioning event is \(M\), so the denominator is the 36 students in that group. The 15 students who both attend a morning class and use a bus form the numerator:

$$ P(U\mid M)=\frac{P(U\cap M)}{P(M)} =\frac{15/80}{36/80} =\frac{15}{36} \approx 0.4167. $$

Thus, in this hypothetical group, about 41.67% of students who attend a morning class use a bus. The denominator is not all 80 students because the question specifies the morning attendees as the group of interest.

Now reverse the conditioning event. Suppose that 30 students in the group use a bus, including the same 15 who attend a morning class. Then

$$ P(M\mid U)=\frac{P(M\cap U)}{P(U)} =\frac{15/80}{30/80} =\frac{15}{30} =0.5. $$

This says that 50% of bus users attend a morning class. The two probabilities differ because the reference groups differ: 36 morning attendees for \(P(U\mid M)\), versus 30 bus users for \(P(M\mid U)\).

Translate from a Group Description to Notation

A question written in words often names the subgroup before the characteristic of interest. To translate it, identify what is being asked about and what is already specified. The specified group belongs after the vertical bar. The characteristic whose probability is requested belongs before it.

1
Name the events.
Write down what each event means in the situation, using clear labels such as \(A\) and \(B\).
2
Find the specified group.
Look for phrases such as “among people who,” “given that,” or “of the items that.” This event goes after the vertical bar.
3
Identify the event of interest.
Ask what outcome or characteristic the question wants the probability of. This event goes before the vertical bar.
4
Check the denominator in context.
The denominator must represent the specified group, not the full population unless the condition itself is the full population.

Worked Example: Translating “Among the Items From Machine 2”

A hypothetical production lot contains 200 items. A total of 120 items came from machine 2, and 6 of those items are defective. In all, 10 items in the lot are defective. Let \(M\) denote “the item came from machine 2” and \(D\) denote “the item is defective.” Translate and calculate: “What is the probability that an item is defective, among items from machine 2?”

The phrase “among items from machine 2” specifies the group \(M\), so the requested probability is \(P(D\mid M)\). There are 120 items in the specified group, and 6 are both from machine 2 and defective:

$$ P(D\mid M)=\frac{P(D\cap M)}{P(M)} =\frac{6/200}{120/200} =\frac{6}{120} =0.05. $$

The probability is 0.05, or 5%. In this hypothetical lot, 5% of the items from machine 2 are defective.

A different question would be: “What is the probability an item came from machine 2, among defective items?” This asks for \(P(M\mid D)\). The specified group is now the 10 defective items, of which 6 came from machine 2:

$$ P(M\mid D)=\frac{P(M\cap D)}{P(D)} =\frac{6/200}{10/200} =\frac{6}{10} =0.6. $$

This probability is 60%. It does not contradict the 5% result: the first percentage is calculated within the machine-2 group, while the second is calculated within the defective-item group.

Check That the Conditioning Event Is Possible

The definition requires \(P(B)>0\). If the conditioning event \(B\) has probability zero, the ratio \(P(A\cap B)/P(B)\) has a zero denominator, so this definition does not assign a conditional probability. In a count-based setting, the same issue arises if the specified subgroup contains no outcomes. For example, one cannot calculate a proportion “among machine-2 items” if the group being considered contains no machine-2 items.

For a valid conditional probability, the result lies between 0 and 1, inclusive. In a finite equally likely setting, this follows because the outcomes in \(A\cap B\) are part of the outcomes in \(B\), so the number in the numerator cannot exceed the number in the denominator. A result outside this range is a sign to check the group, the event intersection, or the arithmetic.

Worked Example: Choosing the Correct Group From a Sentence

In a hypothetical survey, 50 people report whether they walk to work and whether they work remotely. Of the 20 people who work remotely, 8 walk to work. Of the 30 people who do not work remotely, 12 walk to work. Let \(R\) mean “works remotely” and \(W\) mean “walks to work.” Find the probability that a person works remotely among those who walk to work.

The words “among those who walk to work” specify \(W\), so the expression is \(P(R\mid W)\), not \(P(W\mid R)\). There are \(8+12=20\) people who walk to work, and 8 of them work remotely. Therefore:

$$ P(R\mid W)=\frac{P(R\cap W)}{P(W)} =\frac{8/50}{20/50} =\frac{8}{20} =0.4. $$

So, among the people in this hypothetical survey who walk to work, 40% work remotely. The subgroup count \(20\), not the total count \(50\), is the denominator for the conditional proportion.

For comparison, the probability of walking to work among people who work remotely is \(P(W\mid R)\). There are 20 remote workers, and 8 walk to work:

$$ P(W\mid R)=\frac{P(W\cap R)}{P(R)} =\frac{8/50}{20/50} =\frac{8}{20} =0.4. $$

These two happen to be equal in this example because the two specified groups each contain 20 people. That equality is a feature of these particular counts, not a general property of conditional probabilities.

Common Mistake: Reversing “Given”

A frequent error is to read \(P(A\mid B)\) as “the probability of \(B\), given \(A\).” That reverses the roles of the events. Another version is to use the total population as the denominator even when the question says “among those with \(B\).”

The correction is to locate the vertical bar first. Whatever event appears immediately after it is the condition and defines the reference group. Then check that the denominator represents that group. For example, \(P(\text{defective}\mid\text{machine 2})\) uses the items from machine 2 as its denominator; \(P(\text{machine 2}\mid\text{defective})\) uses the defective items.

Key takeaway: Read \(P(A\mid B)\) as “the probability of \(A\), among outcomes where \(B\) occurs.” The event after the bar sets the subgroup and denominator. Reversing \(A\) and \(B\) generally changes the question.

Check Your Understanding

For each question, identify the conditioning event and describe the reference group before calculating or interpreting anything.

  1. Let \(A\) mean “has a library card” and \(B\) mean “is a first-year student.” In words, what does \(P(A\mid B)\) mean?
  2. Explain the difference between “the probability of being defective among items from machine 2” and “the probability of being from machine 2 among defective items.” Write notation for both.
  3. A group includes 40 people who exercise regularly, of whom 10 cycle to work. What denominator belongs in the calculation of the probability of cycling to work among regular exercisers?
  4. Can \(P(A\mid B)\) be defined by the ratio formula if \(P(B)=0\)? Explain why or why not.
  5. Two conditional probabilities have the same event intersection in their numerators. Why might their values still differ?