Course: Statistics and Probability for Data Science (DS14270). Source deck: Samer El Kababji, SD03a — Probabilities.
This lesson develops the deck’s sample-space notation, probability axioms, event operations, and addition rules. The practice questions and the extra computational checks extend the deck’s concepts.
Experiments, outcomes, and sample spaces
An experiment is a process with more than one possible outcome. Its sample space\(S\) is the set of every possible outcome.
Suppose three welds are inspected in sequence. Write \(N\) for nondefective and \(D\) for defective. Each outcome is a string of length three, so
\[
S=\{NNN,NND,NDN,NDD,DNN,DND,DDN,DDD\}.
\]
There are \(2^3=8\) outcomes because each of the three positions has two possibilities.
An event is a subset of \(S\). The event that all three welds are nondefective is the simple event \(\{NNN\}\). The compound event that exactly two welds are defective is
For any event \(E\subseteq S\), add the probabilities of the outcomes it contains:
\[
P(E)=\sum_{O_i\in E}P(O_i).
\]
Worked example — three independent weld results. If \(N\) and \(D\) are equally likely for each inspection, all eight sequences have probability \(1/8\). Therefore
The complement rule is especially useful for probabilities such as “at least one,” whose complement is often a single simpler event.
Intersection and union
For events \(A\) and \(B\):
\[
A\cap B=\{\text{outcomes in both }A\text{ and }B\},
\]
\[
A\cup B=\{\text{outcomes in }A\text{ or }B\text{ or both}\}.
\]
Thus, \(P(A\cap B)\) is the probability that both events occur, while \(P(A\cup B)\) is the probability that at least one occurs.
The addition rule prevents outcomes in the intersection from being counted twice:
\[
P(A\cup B)=P(A)+P(B)-P(A\cap B).
\]
If \(A\cap B=\varnothing\), the events are mutually exclusive or disjoint, and the rule reduces to
\[
P(A\cup B)=P(A)+P(B).
\]
Worked example: rolling two dice
Roll two fair six-sided dice. Let
\[
A=\{\text{the sum is }6\},
\qquad
B=\{\text{at least one die is }6\}.
\]
There are 36 equally likely ordered outcomes. Event \(A\) has five outcomes:
\[
(1,5),(2,4),(3,3),(4,2),(5,1).
\]
Event \(B\) has \(6+6-1=11\) outcomes; \((6,6)\) is subtracted once because it was counted twice. No outcome can have sum 6 and contain a die showing 6, so \(A\cap B=\varnothing\). Therefore
The final triple-intersection term is added back because subtracting all three pairwise intersections removes outcomes shared by all three too many times.
Practice questions
Toss two fair coins. Write the sample space and the event that exactly one head occurs. Find its probability.
In the weld experiment, find the probability of at least one defective weld under the equal-probability assumption.
Roll one fair die. Let \(C=\{1,2,3\}\) and \(D=\{3,4,5\}\). Find \(P(C\cap D)\) and \(P(C\cup D)\).
Are \(C\) and \(D\) in Question 3 mutually exclusive? Explain using their intersection.
For two fair dice, let \(E\) be “the first die is even” and \(F\) be “the sum is even.” Compute \(P(E\cup F)\) using the addition rule.
NoteCheck your answers
\(S=\{HH,HT,TH,TT\}\), the event is \(\{HT,TH\}\), and its probability is \(2/4=1/2\).
The complement is \(\{NNN\}\), so the probability is \(1-P(NNN)=1-1/8=7/8\).
\(C\cap D=\{3\}\), so \(P(C\cap D)=1/6\). Also, \(C\cup D=\{1,2,3,4,5\}\), so \(P(C\cup D)=5/6\).
No. Their intersection contains the outcome 3.
\(P(E)=1/2\), \(P(F)=1/2\), and \(P(E\cap F)=1/4\). Hence \(P(E\cup F)=1/2+1/2-1/4=3/4\).