TEC-DATA85-02 · Lesson 3 · 11 clock hours · theory
Probability Fundamentals
Objective. Students apply the addition rule, multiplication rule, and conditional probability to calculate event probabilities in data-context scenarios.
⚠ Pending professional review
This lesson, its worked examples and its practice questions has not yet been verified by an industry-certified professional or by a certification or approval body. It is a study draft and may contain errors. Do not use it as instructions for work on a job site or on live equipment. Always follow your instructor, your supervising professional, and current official references and regulations.
VoTechWorks program approval and accreditation are still in progress. Credentials are issued only by the certifying bodies named in each program, after their own exams.
What Is Probability?
Probability is the numerical measure of how likely an event is to occur. It is expressed as a number between 0 and 1, where 0 means the event cannot happen and 1 means it is certain to happen. In data science, probability underpins everything from predictive models to anomaly detection to algorithmic fairness audits. Mastering a few core rules lets you calculate the likelihood of complex events from simpler building blocks.
Sample Spaces and Events
A sample space (S) is the complete set of all possible outcomes of an experiment. Rolling a standard six-sided die produces S = {1, 2, 3, 4, 5, 6}. An event is any subset of the sample space. For example, event A = "roll an even number" = {2, 4, 6}.
The complement of event A, written A′ or Aᶜ, contains every outcome in S that is not in A. Because every outcome must either be in A or not in A:
> P(A′) = 1 − P(A)
If a manufactured batch has a 0.08 defect rate, the probability of a non-defective item is 1 − 0.08 = 0.92.
Union and Intersection
- Union (A ∪ B): the event that A or B (or both) occurs.
- Intersection (A ∩ B): the event that A and B both occur.
The Addition Rule
The addition rule gives the probability that at least one of two events occurs:
> P(A ∪ B) = P(A) + P(B) − P(A ∩ B)
Subtracting P(A ∩ B) corrects for double-counting outcomes that fall in both events.
Mutually exclusive events (also called disjoint events) cannot occur at the same time, so P(A ∩ B) = 0. The rule simplifies to:
> P(A ∪ B) = P(A) + P(B) [mutually exclusive only]
Example: drawing a King or a Queen from a standard deck. These are mutually exclusive, so P(King ∪ Queen) = 4/52 + 4/52 = 8/52 ≈ 0.154.
The Multiplication Rule
The multiplication rule gives the probability that two events both occur:
> P(A ∩ B) = P(A) × P(B|A)
where P(B|A) is the conditional probability of B given A (explained below).
Independent events are events where the occurrence of one does not affect the probability of the other. When A and B are independent:
> P(A ∩ B) = P(A) × P(B) [independent events only]
Do not assume independence without justification. In data contexts, features are rarely truly independent, and mistakenly treating them as such leads to incorrect model assumptions.
Conditional Probability
Conditional probability measures the probability of event B given that event A has already occurred:
> P(B|A) = P(A ∩ B) / P(A), provided P(A) > 0
This concept is central to Bayesian reasoning, decision trees, and fairness analysis. When you evaluate whether an algorithm treats groups differently, you are essentially comparing conditional probabilities across subgroups — for example, P(loan approved | applicant in group X) versus P(loan approved | applicant in group Y).
Mutually Exclusive vs. Independent: A Common Confusion
These two concepts are often mixed up.
- Mutually exclusive: the events cannot both happen; if one occurs, the other cannot. P(A ∩ B) = 0.
- Independent: knowing one occurred gives no information about the other. P(B|A) = P(B).
If two events are mutually exclusive and each has nonzero probability, they are not independent — knowing A occurred tells you B definitely did not.
Probability in Data Quality and Ethics
Probability calculations appear throughout the data analytics workflow:
- Quality control: estimating the chance that a sampled batch contains defective units.
- Risk scoring: computing the joint probability of multiple risk indicators.
- Algorithmic fairness: conditional probabilities reveal whether a model's decisions differ systematically across demographic groups. Disparities in P(outcome | group) can signal bias that must be investigated before a model is deployed.
When working with sensitive data in these analyses, always follow your organization's data governance policies and applicable privacy regulations. Protect individual-level data; use aggregated or anonymized tables whenever the task permits.
Connecting Theory to Simulation
Theoretical probability tells you what should happen in the long run; observed (empirical) frequency tells you what did happen in a finite number of trials. As the number of trials increases, empirical frequency converges toward theoretical probability — a principle called the Law of Large Numbers. In today's simulation activity you will see this directly: pooling the class data produces a result closer to the theoretical value than any single pair's 50 trials alone.
Reading Recommendations
For additional depth, read Chapters 2 and 3 of OpenIntro Statistics (Diez et al.), available as a free PDF. Pay particular attention to the section on probability rules and the worked examples using contingency tables.
Key terms9
Sample spaceThe complete set of all possible outcomes of a probability experiment, usually written S.
EventAny subset of the sample space; a collection of one or more outcomes to which a probability can be assigned.
ComplementAll outcomes in the sample space that are NOT in event A; its probability equals 1 − P(A).
Mutually exclusive eventsTwo events that cannot both occur at the same time; their intersection has probability 0.
Independent eventsTwo events where the occurrence of one does not change the probability of the other; P(A ∩ B) = P(A) × P(B).
Addition ruleP(A ∪ B) = P(A) + P(B) − P(A ∩ B); gives the probability that at least one of two events occurs.
Multiplication ruleP(A ∩ B) = P(A) × P(B|A); gives the probability that both events occur.
Conditional probabilityThe probability that event B occurs given that event A has already occurred: P(B|A) = P(A ∩ B) / P(A).
Law of Large NumbersAs the number of trials of a random experiment increases, the empirical frequency of an event converges to its theoretical probability.
Worked examples4
1. A quality-control inspector draws one item at random from a production batch. Based on historical records, the probability of a paint defect is 0.12 and the probability of a dimensional defect is 0.07. The probability of having both defects is 0.02. What is the probability that a randomly selected item has at least one type of defect?
- Identify the rule: 'at least one' means union, so use the addition rule: P(A ∪ B) = P(A) + P(B) − P(A ∩ B).
- Substitute the given values: P(paint) = 0.12, P(dimensional) = 0.07, P(both) = 0.02.
- Calculate: 0.12 + 0.07 − 0.02 = 0.17.
Answer: P(at least one defect) = 0.17, or 17%.
2. A data center runs two independent backup servers, A and B. Server A fails on any given day with probability 0.05, and Server B fails independently with probability 0.03. What is the probability that both servers fail on the same day?
- Because the servers fail independently, use the multiplication rule for independent events: P(A ∩ B) = P(A) × P(B).
- Substitute: P(A fails) = 0.05, P(B fails) = 0.03.
- Calculate: 0.05 × 0.03 = 0.0015.
Answer: P(both servers fail) = 0.0015, or 0.15%.
3. A bank's contingency table shows that 240 loan applications came from Group X, of which 180 were approved. What is the conditional probability that an applicant is approved, given that they are in Group X?
- Identify the rule: this is a conditional probability, P(approved | Group X).
- Apply the formula: P(approved | Group X) = P(approved ∩ Group X) / P(Group X).
- Using counts directly (equivalent): number approved in Group X = 180; total in Group X = 240.
- Calculate: 180 / 240 = 0.75.
Answer: P(approved | Group X) = 0.75, or 75%.
4. A deck of 52 standard playing cards is shuffled. What is the probability of drawing a card that is either a Heart or a face card (Jack, Queen, or King of any suit)? Note: there are 13 Hearts and 12 face cards; 3 of the face cards are Hearts.
- Identify the rule: the events overlap (Hearts and face cards are not mutually exclusive), so use the general addition rule.
- P(Heart) = 13/52; P(face card) = 12/52; P(Heart and face card) = 3/52.
- Apply the addition rule: P(Heart ∪ face card) = 13/52 + 12/52 − 3/52 = 22/52.
- Simplify: 22/52 = 11/26 ≈ 0.423.
Answer: P(Heart or face card) = 22/52 = 11/26 ≈ 0.423, or about 42.3%.
The math in this lesson2
Learners compute conditional probabilities with the multiplication rule.
S-CP.3S-CP.7
In class: Lecture with worked examples: sample spaces, events, complement, union, intersection, mutually exclusive vs. independent events; students complete 8 guided practice problems on probability of combined events using a defective-products scenario. · Card and dice simulation: pairs of students run 50 trials of a two-event experiment, record observed frequencies, compare to theoretical probabilities, and compute the absolute difference; class data is pooled in a shared spreadsheet. · Conditional probability case study: given a contingency table of loan approvals by applicant category, students compute P(approved | category) for each group and discuss implications for algorithmic fairness (previewing the Ethics & Privacy course).
Materials: Standard playing cards, six-sided dice, shared Google Sheet, printed contingency table handout, OpenIntro Statistics (free PDF, Diez et al.) Chapters 2–3
Check: 10-item in-class probability quiz; students must correctly apply at least one of each rule type (addition, multiplication, conditional); pass mark 70%.
Practice check8
Answer each question, then check it. Nothing is recorded; this is your own practice.
Record this lesson on my transcript. Sign in with your key and enrollment email to record lessons (enroll free if you have no key). This page stays open to read and practise.