Conditional Probability

Learning Objectives

  • Define conditional probability and understand how it reduces the sample space.
  • Apply the general multiplication rule to find the probability of joint events.
  • Distinguish between independent and dependent events in engineering contexts.
  • Calculate total probability when events occur through mutually exclusive pathways.
  • Utilize Bayes' Theorem to update probabilities based on new evidence.

Overview of Conditional Probability

In engineering, we rarely evaluate risks in isolation. Our assessment of a structure's failure probability changes if we already know that a defect was present during construction. This updating of probabilities based on prior knowledge is called conditional probability. It effectively adjusts the probability of an event given that another event has already occurred.

The Concept of Conditional Probability

Adjusting Probability

Adjusting the probability of an event given that another event has already occurred.

Conditional Probability, P(B∣A)P(B|A)

The probability that event BB occurs, given that event AA has already occurred. It effectively reduces the sample space from SS to just the outcomes in AA.

Conditional Probability Formula

Calculates the probability of event B occurring given that event A has already occurred.

P(B∣A)=P(A∩B)P(A)for P(A)>0P(B|A) = \frac{P(A \cap B)}{P(A)} \quad \text{for } P(A) > 0

Variables

SymbolDescriptionUnit
P(B∣A)P(B|A)Conditional probability of event B given event A-
P(A∩B)P(A \cap B)Joint probability of both events A and B occurring-
P(A)P(A)Probability of event A occurring-

The Multiplication Rule (General)

Used to find the probability that two events AA and BB occur simultaneously (A∩BA \cap B). It is a direct rearrangement of the conditional probability formula.

General Multiplication Rule

Determines the joint probability of two dependent events.

P(A∩B)=P(A)β‹…P(B∣A)P(A \cap B) = P(A) \cdot P(B|A)

Variables

SymbolDescriptionUnit
P(A∩B)P(A \cap B)Joint probability of both events A and B occurring-
P(A)P(A)Probability of event A occurring-
P(B∣A)P(B|A)Conditional probability of event B given event A-

Symmetric Multiplication Rule

The general multiplication rule can also be symmetrically expressed as P(A∩B)=P(B)β‹…P(A∣B)P(A \cap B) = P(B) \cdot P(A|B).

Independent Events

Independent Events in Engineering

When the occurrence of one event has absolutely no effect on the probability of another, the events are considered independent. In structural engineering, deciding whether the failure of one column affects the failure probability of an adjacent column is a critical assessment of independence.

Independence

Two events AA and BB are independent if and only if the knowledge that AA occurred does not change the probability of BB occurring. Mathematically, this is expressed as P(B∣A)=P(B)P(B|A) = P(B) and P(A∣B)=P(A)P(A|B) = P(A).

Special Multiplication Rule for Independent Events

Determines the joint probability of two independent events.

P(A∩B)=P(A)β‹…P(B)P(A \cap B) = P(A) \cdot P(B)

Variables

SymbolDescriptionUnit
P(A∩B)P(A \cap B)Joint probability of both independent events A and B occurring-
P(A)P(A)Probability of event A occurring-
P(B)P(B)Probability of event B occurring-

Independence of Multiple Events

For three events AA, BB, and CC to be mutually independent, they must be pairwise independent (P(A∩B)=P(A)β‹…P(B)P(A \cap B) = P(A) \cdot P(B), etc.), AND their joint probability must equal the product of their individual probabilities: P(A∩B∩C)=P(A)β‹…P(B)β‹…P(C)P(A \cap B \cap C) = P(A) \cdot P(B) \cdot P(C).

The Theorem of Total Probability and Bayes' Theorem

Advanced Probability Concepts

Advanced tools like the Theorem of Total Probability and Bayes' Theorem are necessary for calculating probabilities when an event can occur through multiple, distinct pathways.

The Theorem of Total Probability

If a sample space SS is partitioned into nn mutually exclusive and collectively exhaustive events (B1,B2,…,BnB_1, B_2, \dots, B_n), then the probability of any event AA occurring is the sum of the probabilities of AA occurring in conjunction with each partition.

Engineering Application of Total Probability

If a concrete batch AA can fail due to poor mixing (B1B_1), improper curing (B2B_2), or bad aggregates (B3B_3), the total probability of failure P(A)P(A) is the sum of the probabilities of failure given each specific cause, weighted by how frequently each cause occurs. This allows engineers to assess overall risk across a supply chain or construction sequence.

Theorem of Total Probability

Calculates the overall probability of an event based on a partition of the sample space.

P(A)=βˆ‘i=1nP(Bi∩A)=βˆ‘i=1nP(Bi)β‹…P(A∣Bi)P(A) = \sum_{i=1}^{n} P(B_i \cap A) = \sum_{i=1}^{n} P(B_i) \cdot P(A|B_i)

Variables

SymbolDescriptionUnit
P(A)P(A)Total probability of event A-
nnNumber of mutually exclusive and collectively exhaustive events-
P(Bi)P(B_i)Probability of the i-th partition event-
P(A∣Bi)P(A|B_i)Conditional probability of event A given the i-th partition event-
P(Bi∩A)P(B_i \cap A)Joint probability of the i-th partition event and event A-

Bayes' Theorem

A powerful mathematical formula used to update the probabilities of hypotheses when given new evidence. It essentially reverses the conditional probability. For example, if an engineer observes cracking in a foundation (the effect) and knows the probability of such cracks under various soil conditions (the causes), Bayes' Theorem lets them calculate the likelihood that a specific soil condition caused the observed cracking.

Bayes' Theorem

Calculates the posterior probability of a cause given an observed effect.

P(Bi∣A)=P(Bi)β‹…P(A∣Bi)βˆ‘j=1nP(Bj)β‹…P(A∣Bj)P(B_i|A) = \frac{P(B_i) \cdot P(A|B_i)}{\sum_{j=1}^{n} P(B_j) \cdot P(A|B_j)}

Variables

SymbolDescriptionUnit
P(Bi∣A)P(B_i|A)Posterior probability (updated probability of cause given evidence A)-
P(Bi)P(B_i)Prior probability (initial estimate of cause before evidence)-
P(A∣Bi)P(A|B_i)Likelihood (probability of observing evidence A given cause B_i)-
P(Bj)P(B_j)Prior probability of any given partition event-
P(A∣Bj)P(A|B_j)Likelihood of evidence A given partition event B_j-
nnNumber of mutually exclusive causes/partitions-

Interactive Simulation

Interact with the simulation below to explore conditional probability and Bayes' Theorem.

Engineering Data Analysis

Bayes' Theorem & Diagnostic Testing

Visualize conditional probability and Bayes' theorem using a probability tree. Adjust the prior probability and test accuracy to see how they impact the posterior probability.

5.0%

Probability of a random component being defective.

90.0%

Sensitivity: Test is positive when defect is present.

10.0%

False Alarm: Test is positive when NO defect is present.

Probability Tree Diagram

P(D)P(D) = 5.0%
P(G)P(G) = 95.0%
P(T∣D)P(T|D) = 90.0%
P(∼T∣D)P(\sim T|D) = 10.0%
P(T∣G)P(T|G) = 10.0%
P(∼T∣G)P(\sim T|G) = 90.0%
Start
Defective (D)
Good (G)
Positive (T)
=4.50%
Negative (~T)
=0.50%
Positive (T)
=9.50%
Negative (~T)
=85.50%

Total Positives P(T)P(T)

14.00%

Sum of True Positives and False Positives

Posterior P(D∣T)P(D|T)

32.1%

Prob. it is defective GIVEN a positive test

Bayes' Theorem Calculation

P(D∣T)=P(T∣D)β‹…P(D)P(T∣D)β‹…P(D)+P(T∣G)β‹…P(G)P(D|T) = \frac{P(T|D) \cdot P(D)}{P(T|D) \cdot P(D) + P(T|G) \cdot P(G)}
P(D∣T)=0.90β‹…0.0500.90β‹…0.050+0.10β‹…0.950P(D|T) = \frac{0.90 \cdot 0.050}{0.90 \cdot 0.050 + 0.10 \cdot 0.950}
P(D∣T)β‰ˆ32.1%P(D|T) \approx 32.1\%

Interactive Simulation

Explore the application of Bayes' Theorem to diagnostic testing by adjusting prevalence, sensitivity, and specificity in the simulation below.

Engineering Data Analysis β€’ Topic 4

Bayes' Theorem in Diagnostic Testing

Prevalence P(D)P(D)10%
Sensitivity P(+∣D)P(+\mid D)90%
Specificity P(βˆ’βˆ£Dc)P(-\mid D^c)90%
Population Grid (N = 100)
True Positive (TP: 9)
False Negative (FN: 1)
False Positive (FP: 9)
True Negative (TN: 81)
PPV (Post-test prob of disease | positive test)
50.0%
P(D∣+)=P(+∣D)P(D)P(+∣D)P(D)+P(+∣Dc)P(Dc)P(D\mid +) = \frac{P(+\mid D)P(D)}{P(+\mid D)P(D) + P(+\mid D^c)P(D^c)}
NPV (Post-test prob of healthy | negative test)
98.8%
P(Dcβˆ£βˆ’)=P(βˆ’βˆ£Dc)P(Dc)P(βˆ’βˆ£Dc)P(Dc)+P(βˆ’βˆ£D)P(D)P(D^c\mid -) = \frac{P(-\mid D^c)P(D^c)}{P(-\mid D^c)P(D^c) + P(-\mid D)P(D)}
Key Takeaways
  • Conditional Probability (P(B∣A)P(B|A)): The probability of BB given that AA has occurred; shrinks the sample space to AA.
  • Multiplication Rule: Used for "A AND B" scenarios (A∩BA \cap B).
  • Independence: If AA and BB are independent, P(A∩B)=P(A)β‹…P(B)P(A \cap B) = P(A) \cdot P(B).
  • Theorem of Total Probability: Useful for finding the total probability of an event that can occur across multiple mutually exclusive pathways.
  • Bayes' Theorem: Allows engineers to "work backward" from an observed effect (e.g., structural failure) to determine the most likely cause, updating prior beliefs with new evidence.