AI VIETNAM
All-in-One Course
Basic Probability
Quang-Vinh Dinh
Ph.D. in Computer Science
Year 2023
Outline
Basic Concepts
Bayes’ Theorem
Total Probability Theorem
Examples
Basic Probability
Toss a coin
Some concepts
Sample space: S = {heads, tails}
Experiment: implementation of set of basic
conditions for observing a certain phenomenon
Roll a dice
An outcome is a result of an experiment
Sample space: S = {1, 2, 3, 4, 5, 6}
The set of all possible outcomes is called the
sample space
An event is a subset of the sample space
1
Event
Certain event: An event that always occurs in an
experiment, denoted by Ω
Impossible event: An event that never occurs when
the experiment is executed, denoted by ∅.
Random event: An event that may or may not occur
when performing the experiment Roll a dice:
Random Experiment: An experiment whose Ω = “dots ≤ 6 and ≥ 1” is a certain
outcomes are random events event
For convenience, events are usually denoted with ∅ = “7-dot” is an impossible event
capital letters: A, B, C, . . .
A = “even-dot” is a random event
2
AI VIETNAM
All-in-One Course
Experiment and Event
Example
A family with 2 children. Events:
A = “A family has 1 boy and 1 girl”
B = “A family has 3 children”
C = “A family has 2 children”
Which event is certain random, impossible event?
A box contains 8 balls: 6 blue and 2 red. Pick randomly 3 balls:
A = “get 3 blue balls”
B = “get 3 red balls”
C = “get 3 balls”
Which event is certain random, impossible event?
3
AI VIETNAM
All-in-One Course
Operations with Events
Intersection of events
In the experiment of rolling a single dice
Event A: “the number rolled is even”
=> A = {2, 4, 6}
Event B: “the number rolled is divisible by 3”
=> B = {3, 6 }
A ∩ B = {6}
4
AI VIETNAM
All-in-One Course
Operations with Events
Mutually exclusive event
Events A and B are mutually exclusive (cannot both
occur at once) if they have no elements in common.
For A and B to have no outcomes in common means
precisely that it is impossible for both A and B to
occur on a single trial of the random experiment.
A ∩ B = {∅} Mutually exclusive
Event A: “the number rolled is even”
=> A = {2, 4, 6}
Example Event B: “the number rolled is odd”
=> B = {1, 3, 5}
A∩B=∅ Non-mutually exclusive 5
In the experiment of rolling a single dice
Operations with Events
Union of events
Event A: “the number rolled is even”
The union of events A and B, => A = {2, 4, 6}
denoted A ∪ B Event B: “the number rolled is divisible
by 3”
The collection of all outcomes
=> B = {3, 6 }
that are elements of one or the
other of the sets A and B, or Find the union of A and B?
of both of them.
6
In the experiment of rolling a single dice
Operations with Events
Union of events
Event A: “the number rolled is even”
The union of events A and B, => A = {2, 4, 6}
denoted A ∪ B Event B: “the number rolled is divisible
by 3”
The collection of all outcomes
=> B = {3, 6 }
that are elements of one or the
other of the sets A and B, or Find the union of A and B?
of both of them. => A ∪ B = {2, 3, 4, 6}
7
AI VIETNAM
All-in-One Course
Operations with Events
Complements
Example:
The complement of an event A in A: “the number rolled is greater than 4.”
a sample space S, denoted A’, or
Ac. => A = {5, 6}
=> A’ = {1, 2, 3, 4}
The collection of all outcomes in
S that are not elements of the set A
Complement of an event A An event A
A’ +A= Ω
AI VIETNAM
All-in-One Course
Rules of probability
Complements
For any event A
P(Ac) = 1 – P(A)
P(A) = 1 – P(Ac)
Example
Find the probability that when we roll a dice we get a number different from 1 and 6?
Let’s A: “Getting the number 1 and 6” => A = {1, 6}
“Getting a number different from 1 and 6” = Ac
Since P(A) = P(1) + P(6) = 1/6 + 1/6 = 2/6 = 1/3
P(“Getting a number different than 1 and 6”) = 1 – P(A) = 1 – 1/3 = 2/3
9
AI VIETNAM
All-in-One Course
Operations with Events
Quizzes
The region colored in the In the experiment of rolling a single dice
figure below is represented
A: “the number rolled is even number.”
A. (A.B’).(A’.B) B: “the number rolled is greater than or equal 4.”
C: “the number rolled is greater than 2.”
B. (A + B’)(A’ + B)
1. Event A’ is
C. A.B’ + A’.B A. {} B. {1, 3, 5} C. {1, 3} D. {2, 4, 6}
2. Event A.B is
A. {5, 7} B. {4, 6} C. {5} D. {1, 3, 5, 6}
3. Event B + C is
A. {2, 4} B. {1, 4, 5, 6} C. {3, 4, 5, 6} D. {1, 2, 5, 6}
AI VIETNAM
All-in-One Course
Probability
Definition
The probability of an event A is P(A) - a number between 0 and 1 that shows how
likely the event is
P(A) => 0: very unlikely that the event A occurs
P(A) => 1: very likely to occur
Some properties:
0≤𝑃 𝐴 ≤1
P(Ω) = 1
P(∅) = 0
11
AI VIETNAM
All-in-One Course
Probability
Classical Probability
The theoretical probability of an event A is the number of ways the event can occur divided by
the total number of possible outcomes:
𝑛𝑢𝑚𝑏𝑒𝑟 𝑜𝑓 𝑓𝑎𝑣𝑜𝑟𝑎𝑏𝑙𝑒 𝑜𝑢𝑡𝑐𝑜𝑚𝑒𝑠 𝑛𝐴
𝑃 𝐴 = =
𝑡𝑜𝑡𝑎𝑙 𝑛𝑢𝑚𝑏𝑒𝑟 𝑜𝑓 𝑝𝑜𝑠𝑠𝑖𝑏𝑙𝑒 𝑜𝑢𝑡𝑐𝑜𝑚𝑒𝑠 𝑛Ω
Example
What is the probability of rolling a number is even on a regular dice?
- There are 6 faces on a fair dice, numbered 1 to 6
=> 𝑛Ω = 6
- A : “even number” => A = {2, 4, 6} => 𝑛𝐴 = 3
=> P(A) = 3/6 = 0.5
12
AI VIETNAM
Drawing a black card
All-in-One Course
Probability
Classical Probability Drawing a king
Example
Drawing a card from a well-
shuffled deck. Find the
probability of some events
Drawing a king Drawing a black card
- A: “Drawing a king from a deck of cards” - A: “Drawing a black card from a deck of cards”
- There are 52 cards in a deck of cards - There are 52 cards in a deck of cards
=> 𝑛Ω = 52 => 𝑛Ω = 52
- There are 4 kings in a deck - There are 26 black cards in a deck
=> 𝑛𝐴 = 4 => 𝑛𝐴 = 26
=> P(A) = 4/52 = 1/13 => P(A) = 26/52 = 1/2
13
AI VIETNAM
All-in-One Course
Probability
Geometric Probability
When a variable is continuous, classical probability
becomes impossible to “count” the outcomes.
𝑚𝑒𝑎𝑠𝑢𝑟𝑒 𝑜𝑓 𝑑𝑜𝑚𝑎𝑖𝑛 𝐴
𝑃 𝐴 =
𝑚𝑒𝑎𝑠𝑢𝑟𝑒 𝑜𝑓 𝑑𝑜𝑚𝑎𝑖𝑛 Ω
X is a random real number between 0 and 3.
𝑙𝑒𝑛𝑔𝑡ℎ 𝑜𝑓 𝑠𝑒𝑔𝑚𝑒𝑛𝑡 𝑤ℎ𝑒𝑟𝑒 0 < 𝑋 < 0.5 0.5 1
𝑃 𝐴 = = =
𝑙𝑒𝑛𝑔𝑡ℎ 𝑜𝑓 𝑠𝑒𝑔𝑚𝑒𝑛𝑡 𝑤ℎ𝑒𝑟𝑒 0 < 𝑋 < 3 3 6
14
AI VIETNAM
All-in-One Course
Probability
Geometric Probability
A dart is thrown at a circular dartboard such that it will land randomly over the area of
the dartboard.
What is the probability that it lands closer to the center “success” than to the edge?
=> A: “A dart is thrown at the center area”
Measure of the areas in this 2D case:
𝜋𝑟2
𝑎𝑟𝑒𝑎 𝑜𝑓 𝑑𝑒𝑠𝑖𝑟𝑒𝑑 𝑜𝑢𝑡𝑐𝑜𝑚𝑒𝑠 4 1
𝑃 𝐴 = = =
𝑎𝑟𝑒𝑎 𝑜𝑓 𝑡𝑜𝑡𝑎𝑙 𝑜𝑢𝑡𝑐𝑜𝑚𝑒𝑠 𝜋𝑟 2 4
15
AI VIETNAM
All-in-One Course
Rules of probability
The additive rule Example
Rolling a fair dice. What is the probability of A = {1, 5}?
Mutually exclusive events
P(A+B) = P(A) + P(B) The die is fair => all six possible outcomes are equally likely
P(A or B) = P(A) + P(B) P({1}) = P({2}) = P({3}) = P({4}) = P({5}) = P({6})
where A and B are mutually exclusive
In general The events {1},…,{6} are disjoint
P(A+B) = P(A) + P(B) – P(AB) 1 = P(S) = P({1}) + P({2}) + … + P({6}) = 6P({1})
P(A or B) = P(A) + P(B) – P(A and B) P({1}) = P({2}) = P({3}) = P({4}) = P({5}) = P({6}) = 1/6
Since {1} and {5} are disjoint
=> P(A) = P({1, 5}) = P({1}) + P({5}) = 2/6 = 1/3
16
Rules of probability
Example
Suppose we have the following information:
1.There is a 60 percent that Ad visits Ha Noi.
2.There is a 50 percent that Ad visits Ho Chi Minh.
3.There is a 30 percent that Ad visits 2 cities: Ha Noi and Ho Chi Minh
Find the probability that Ad visits Ha Noi or Ho Chi Minh?
Let’s define
A: “Ad visits Ha Noi” => P(A) = 0.6
B: “Ad visits Ho Chi Minh” => P(B) = 0.5
P(A and B) = 0.3
=> P(A or B) = P(A) + P(B) – P(A and B) = 0.6 + 0.5 – 0.3 = 0.8
17
AI VIETNAM
All-in-One Course
Conditional Probability
Definition
Conditional Probability Formula
𝑃(𝐴 ∩ 𝐵)
𝑃 𝐴𝐵 =
𝑃(𝐵)
Probability that A occurs given
that B has already occurred
A fair die is rolled
a) Find the probability that the number rolled is a five, given that it is odd.
b) Find the probability that the number rolled is odd, given that it is a five.
18
AI VIETNAM
All-in-One Course
Conditional Probability
Conditional probability formula
Example 𝑃(𝐴∩𝐵)
𝑃 𝐴𝐵 =
𝑃(𝐵)
A fair dice is rolled
• Sample space S = {1, 2, 3, 4, 5, 6}, consisting of 6 equally likely outcomes
• A: “a five is rolled” => A = {5} => P(A) = 1/6
• B: “an odd number is rolled” => B = {1, 3, 5} => P(B) = 3/6 = 1/2
=> A and B = {5} => P(A and B) = 1/6
a) Find the probability that the number rolled is a five, given that it is odd.
P(A|B) = P(A and B)/P(B) = (1/6)/(1/2) = 1/3
b) Find the probability that the number rolled is odd, given that it is a five.
P(B|A) = P(B and A)/P(A) = P(A and B)/P(A) = (1/6)/(1/6) = 1
19
AI VIETNAM
All-in-One Course
Multiplication Rule
Multiplication rule:
P(AB) = P(A).P(B|A) = P(B).P(A|B)
General:
P(A1A2…An) = P(A1).P(A2|A1).P(A3|A1A2)…P(An|A1A2…An-1)
Example
In a factory there are 100 units of a certain product, 5 of which are
defective.
We pick three units from the 100 units at random.
What is the probability that none of them are defective?
20
AI VIETNAM
All-in-One Course
Multiplication Rule
P(A1A2…An) = P(A1).P(A2|A1).P(A3|A1A2)…P(An|A1A2…An-1)
Example
Let’s Ai as the event ith chosen unit is not defective, for i =1, 2, 3
=> Compute P(A1A2A3)
P(A1) = 95/100
Given that the first chosen item was good, the second item will be chosen from 94 good units and
5 defective units, thus: P(A2|A1) = 94/99
Given that the first and second chosen items were okay, the third item will be chosen from 93
good units and 5 defective units, thus: P(A3|A2A1) = 93/98
=> P(A1A2A3) = 95/100*94/99*93/98 = 0.8560
21
AI VIETNAM
All-in-One Course
Independent events
• Events A and B are independent if:
P(AB) = P(A) P(B)
• If A and B are not independent, they are dependent.
Roll a dice
Sample space: S = {1, 2, 3, 4, 5, 6}
Example
A single fair dice is rolled. Let A={3} and B={1,3,5}.
Are A and B independent?
Compute: P(A) = 1/6
P(B) = 1/2
P(A and B) = 1/6
Since P(A)P(B) = (1/6)*(1/2) = 1/12 ≠ P(A and B) = 1/6
=> Events A and B: not independent
22
AI VIETNAM
All-in-One Course
Total Probability Theorem
Let A1, A2, …, An – complete system of events. Consider any event H such that H occurs only
when one of the events A1, A2, . . . , An occurred
P H = P H1 + P H2 + P H3
= P A1 . P(H|A1 ) + P A2 . P(H|A2 ) + P A3 . P(H|A3 )
23
AI VIETNAM
All-in-One Course
Total Probability Theorem
In general
n
P H = P Ai . P(H|Ai )
i=1
24
AI VIETNAM
All-in-One Course
Total Probability Theorem
In general: P H = σni=1 P Ai . P(H|Ai )
Example
Company M supplies 80% of widgets for a car shop and only 1% of their widgets turn out to be
defective. Company N supplies the remaining 20% of widgets for the car shop and 3% of their
widgets turn out to be defective. If a customer randomly purchases a widget from the car shop,
what is the probability that it will be defective?
Company M Supplies 80% of widgets
1% are defective
Company N Supplies 20% of widgets
3% are defective
25
AI VIETNAM
All-in-One Course
Total Probability Theorem
In general: P H = σni=1 P Ai . P(H|Ai )
Company M Supplies 80% of widgets
1% are defective
Example Company N Supplies 20% of widgets
3% are defective
H: “Widget being defective”
AM: “Widget came from company M”
AN: “Widget came from company N”
Events AM and AN : complete system of events
=> P(AM) = 0.8; P(AN) = 0.2; P(H|AM) = 0.01; P(H|AN) = 0.03
The probability that it will be defective:
P(H) = P(H|AM). P(AM) + P(H|AN). P(AN)
= 0.01*0.8 + 0.03*0.2 = 0.014
26
AI VIETNAM
All-in-One Course
Total Probability Theorem
In general: P H = σni=1 P Ai . P(H|Ai )
Example
I have three bags that each contain 100 marbles:
- Bag 1 has 75 red and 25 blue marbles
- Bag 2 has 60 red and 40 blue marbles
- Bag 3 has 45 red and 55 blue marbles.
I choose one of the bags at random and then pick a marble from the chosen bag, also at random.
What is the probability that the chosen marble is red?
27
AI VIETNAM
All-in-One Course
Total Probability Theorem
In general: P H = σni=1 P Ai . P(H|Ai )
Example
H: “the chosen marble is red”
Ai : the event that I choose Bag I
=> P(H|A1) = 0.75; P(H|A2) = 0.6; P(H|A3) = 0.45
Each bag contain 100 marbles and because their union is the entire sample space
P(A1 ∪ A2 ∪ A3) = 1
The probability that the chosen marble is red:
P H = P A1 . P(H|A1 ) + P A2 . P(H|A2 ) + P A3 . P(H|A3 )
= 1/3*0.75 + 1/3*0.60 + 1/3*0.45 = 0.60
28
AI VIETNAM
All-in-One Course
Bayes’ Rule
For any two events A and B, where P(A) ≠ 0:
PRIOR
LIKELIHOOD The probability of “B” being
The probability of “A” being True. This is the knowledge
True, given “B” True
P(A|B)P(B)
P BA =
P(A)
POSTERIOR MARGINALIZATION
The probability of “B” being The probability of “A” being
True. Given “A” True True.
29
AI VIETNAM
All-in-One Course
Bayes’ Rule
𝑃(𝐴|𝐵)𝑃(𝐵)
For any two events A and B, where P(A) ≠ 0: 𝑃 𝐵 𝐴 =
𝑃(𝐴)
If C1, C2,.. Cn: complete system of events and X is any event with P(X) ≠ 0
P Ci P(X|Ci ) P Ci P(X|Ci )
P Ci X = = n , i = 1, 2, … , n
P(X) σj=1 P Cj P(X|Cj )
C1 C2 C3
30
AI VIETNAM
All-in-One Course
Bayes’ Rule
Example: Detect Spam E-Mail (Simple NLP problem)
Assume that the word ‘offer’ occurs in 80% of the spam messages in my account. Also, let’s
assume ‘offer’ occurs in 10% of my desired e-mails. If 30% of the received e-mails are
considered as a spam. I will receive a new message which contains ‘offer’, what is the probability
that it is spam?
Assume that I received 100 e-mails
100 e-mails
100*0.3=30 100*0.7=70
Spam Desired
Contains ‘offer’ NOT contains ‘offer’ Contains ‘offer’ NOT contains ‘offer’
30*0.8=24 30*0.2=6 70*0.1=7 70*0.9=63
31
AI VIETNAM
All-in-One Course
Bayes’ Rule
Example: Detect Spam E-Mail (Simple NLP problem)
Let C1: “Spam” and C2: “Not spam”
=> C1, C2 : complete system of events
X: “contains the word ‘offer’”
If a new message which contains ‘offer’, the probability that it is spam is:
P C1 P(X|C1 )
P C1 X =
P(X)
P(C1) = 0.3; P(C2) = 1 – P(C1) = 0.7
P(X|C1) = 0.8; P(X|C2) = 0.1
P(X) = P(C1)P(X|C1) + P(C2)P(X|C2) = 0.3*0.8 + 0.7*0.1 = 0.31
=> P(C1|X) = (0.8*0.3)/(0.31) = 0.774
32
AI VIETNAM
All-in-One Course
Simple Classification
Example: One feature
P Ci P(X|Ci )
P Ci X =
P(X)
Let C and X are random variables
One feature: Studies
𝑝 𝑋 = 𝑥 𝐶 = 𝑐 ∗ 𝑝(𝐶 = 𝑐)
Two classes: Fail and Pass 𝑝 𝐶 = 𝑐|𝑋 = 𝑥 =
𝑝(𝑋 = 𝑥)
33
AI VIETNAM
All-in-One Course
Simple Classification
Example: One feature
𝑝 𝑋 = 𝑥 𝐶 = 𝑐 ∗ 𝑝(𝐶 = 𝑐)
𝑝 𝐶 = 𝑐|𝑋 = 𝑥 =
𝑝(𝑋 = 𝑥)
𝑝 𝐶 = c1 |𝑋 = 𝑥 =? 𝑝 𝐶 = c2 |𝑋 = 𝑥 =?
𝑝 𝑠𝑡𝑢𝑑 = 𝑦𝑒𝑠 𝑟𝑒𝑠 = 𝑝𝑎𝑠𝑠 ∗ 𝑝(𝑟𝑒𝑠 = 𝑝𝑎𝑠𝑠)
𝑝 𝑟𝑒𝑠 = 𝑝𝑎𝑠𝑠 | 𝑠𝑡𝑢𝑑 = 𝑦𝑒𝑠 =
𝑝(𝑠𝑡𝑢𝑑 = 𝑦𝑒𝑠)
𝑝 𝑠𝑡𝑢𝑑 = 𝑦𝑒𝑠 𝑟𝑒𝑠 = 𝑓𝑎𝑖𝑙 ∗ 𝑝(𝑟𝑒𝑠 = 𝑓𝑎𝑖𝑙)
𝑝 𝑟𝑒𝑠 = 𝑓𝑎𝑖𝑙 | 𝑠𝑡𝑢𝑑 = 𝑦𝑒𝑠 =
𝑝(𝑠𝑡𝑢𝑑 = 𝑦𝑒𝑠)
34
3 1
𝑝 𝑟𝑒𝑠 = 𝑝𝑎𝑠𝑠 = =
6 2
3 1
𝑝 𝑟𝑒𝑠 = 𝑓𝑎𝑖𝑙 = =
6 2
𝑝 𝑠𝑡𝑢𝑑 = 𝑦𝑒𝑠 𝑟𝑒𝑠 = 𝑝𝑎𝑠𝑠 ∗ 𝑝(𝑟𝑒𝑠 = 𝑝𝑎𝑠𝑠)
𝑝 𝑟𝑒𝑠 = 𝑝𝑎𝑠𝑠 | 𝑠𝑡𝑢𝑑 = 𝑦𝑒𝑠 =
𝑝(𝑠𝑡𝑢𝑑 = 𝑦𝑒𝑠)
𝑝 𝑠𝑡𝑢𝑑 = 𝑦𝑒𝑠 𝑟𝑒𝑠 = 𝑓𝑎𝑖𝑙 ∗ 𝑝(𝑟𝑒𝑠 = 𝑓𝑎𝑖𝑙)
𝑝 𝑟𝑒𝑠 = 𝑓𝑎𝑖𝑙 | 𝑠𝑡𝑢𝑑 = 𝑦𝑒𝑠 =
𝑝(𝑠𝑡𝑢𝑑 = 𝑦𝑒𝑠)
35
3
𝑝 𝑟𝑒𝑠 = 𝑝𝑎𝑠𝑠 = = 0.5
6
3
𝑝 𝑟𝑒𝑠 = 𝑓𝑎𝑖𝑙 = = 0.5
6
2
𝑝 𝑠𝑡𝑢𝑑 = 𝑦𝑒𝑠 𝑟𝑒𝑠 = 𝑝𝑎𝑠𝑠 =
3
1
𝑝 𝑠𝑡𝑢𝑑 = 𝑦𝑒𝑠 𝑟𝑒𝑠 = 𝑓𝑎𝑖𝑙 =
3
𝑝 𝑠𝑡𝑢𝑑 = 𝑦𝑒𝑠 𝑟𝑒𝑠 = 𝑝𝑎𝑠𝑠 ∗ 𝑝(𝑟𝑒𝑠 = 𝑝𝑎𝑠𝑠)
𝑝 𝑟𝑒𝑠 = 𝑝𝑎𝑠𝑠 | 𝑠𝑡𝑢𝑑 = 𝑦𝑒𝑠 =
𝑝(𝑠𝑡𝑢𝑑 = 𝑦𝑒𝑠)
𝑝 𝑠𝑡𝑢𝑑 = 𝑦𝑒𝑠 𝑟𝑒𝑠 = 𝑓𝑎𝑖𝑙 ∗ 𝑝(𝑟𝑒𝑠 = 𝑓𝑎𝑖𝑙)
𝑝 𝑟𝑒𝑠 = 𝑓𝑎𝑖𝑙 | 𝑠𝑡𝑢𝑑 = 𝑦𝑒𝑠 =
𝑝(𝑠𝑡𝑢𝑑 = 𝑦𝑒𝑠)
36
3 1 2
𝑝 𝑟𝑒𝑠 = 𝑝𝑎𝑠𝑠 = = 𝑝 𝑠𝑡𝑢𝑑 = 𝑦𝑒𝑠 𝑟𝑒𝑠 = 𝑝𝑎𝑠𝑠 =
6 2 3
3 1 1
𝑝 𝑟𝑒𝑠 = 𝑓𝑎𝑖𝑙 = = 𝑝 𝑠𝑡𝑢𝑑 = 𝑦𝑒𝑠 𝑟𝑒𝑠 = 𝑓𝑎𝑖𝑙 =
6 2 3
𝑝(𝑠𝑡𝑢𝑑 = 𝑦𝑒𝑠)
= 𝑝 𝑠𝑡𝑢𝑑 = 𝑦𝑒𝑠 𝑟𝑒𝑠 = 𝑝𝑎𝑠𝑠 ∗ 𝑝(𝑟𝑒𝑠 = 𝑝𝑎𝑠𝑠) + 𝑝 𝑠𝑡𝑢𝑑 = 𝑦𝑒𝑠 𝑟𝑒𝑠 = 𝑓𝑎𝑖𝑙 ∗ 𝑝(𝑟𝑒𝑠 = 𝑓𝑎𝑖𝑙)
2 1 1 1 1
= ∗ + ∗ =
3 2 3 2 2
𝑝 𝑠𝑡𝑢𝑑 = 𝑦𝑒𝑠 𝑟𝑒𝑠 = 𝑝𝑎𝑠𝑠 ∗ 𝑝(𝑟𝑒𝑠 = 𝑝𝑎𝑠𝑠)
𝑝 𝑟𝑒𝑠 = 𝑝𝑎𝑠𝑠 | 𝑠𝑡𝑢𝑑 = 𝑦𝑒𝑠 =
𝑝(𝑠𝑡𝑢𝑑 = 𝑦𝑒𝑠)
𝑝 𝑠𝑡𝑢𝑑 = 𝑦𝑒𝑠 𝑟𝑒𝑠 = 𝑓𝑎𝑖𝑙 ∗ 𝑝(𝑟𝑒𝑠 = 𝑓𝑎𝑖𝑙)
𝑝 𝑟𝑒𝑠 = 𝑓𝑎𝑖𝑙 | 𝑠𝑡𝑢𝑑 = 𝑦𝑒𝑠 =
𝑝(𝑠𝑡𝑢𝑑 = 𝑦𝑒𝑠)
37
3 1 2
𝑝 𝑟𝑒𝑠 = 𝑝𝑎𝑠𝑠 = = 𝑝 𝑠𝑡𝑢𝑑 = 𝑦𝑒𝑠 𝑟𝑒𝑠 = 𝑝𝑎𝑠𝑠 =
6 2 3
3 1 1
𝑝 𝑟𝑒𝑠 = 𝑓𝑎𝑖𝑙 = = 𝑝 𝑠𝑡𝑢𝑑 = 𝑦𝑒𝑠 𝑟𝑒𝑠 = 𝑓𝑎𝑖𝑙 =
6 2 3
1
𝑝(𝑠𝑡𝑢𝑑 = 𝑦𝑒𝑠) =
2
𝑝 𝑠𝑡𝑢𝑑 = 𝑦𝑒𝑠 𝑟𝑒𝑠 = 𝑝𝑎𝑠𝑠 ∗ 𝑝(𝑟𝑒𝑠 = 𝑝𝑎𝑠𝑠)
𝑝 𝑟𝑒𝑠 = 𝑝𝑎𝑠𝑠 | 𝑠𝑡𝑢𝑑 = 𝑦𝑒𝑠 =
𝑝(𝑠𝑡𝑢𝑑 = 𝑦𝑒𝑠)
2 1 2 2
= ∗ ∗ =
3 2 1 3
𝑝 𝑠𝑡𝑢𝑑 = 𝑦𝑒𝑠 𝑟𝑒𝑠 = 𝑓𝑎𝑖𝑙 ∗ 𝑝(𝑟𝑒𝑠 = 𝑓𝑎𝑖𝑙)
𝑝 𝑟𝑒𝑠 = 𝑓𝑎𝑖𝑙 | 𝑠𝑡𝑢𝑑 = 𝑦𝑒𝑠 =
𝑝(𝑠𝑡𝑢𝑑 = 𝑦𝑒𝑠)
1 1 2 1
= ∗ ∗ =
3 2 1 3 38