CsC 203 Discrete Structures Week 11
CsC 203 Discrete Structures Week 11
2. Basic Definitions
• Experiment: An action or process that generates a set of outcomes.
• Sample Space (S): The set of all possible outcomes of an experiment.
• Event: A subset of the sample space.
• Probability of an Event (E):
|E|
P (E) = ,
|S|
where |E| is the number of favorable outcomes and |S| is the total number of
outcomes in the sample space.
If you toss a fair coin, the sample space is S = {Heads, Tails}. The probability of getting
heads is:
1
P (Heads) = .
2
3. Properties of Probability
• 0 ≤ P (E) ≤ 1.
• P (S) = 1 (the probability of the sample space is 1).
• If E1 , E2 , . . . , En are mutually exclusive events, then:
P (E1 ∪ E2 ∪ . . . ∪ En ) = P (E1 ) + P (E2 ) + . . . + P (En ).
1
4. Conditional Probability
The probability of an event A occurring given that event B has occurred is called con-
ditional probability and is denoted by P (A|B):
P (A ∩ B)
P (A|B) = ,
P (B)
What is the probability of drawing an Ace given that the card drawn is a Spade?
Solution:
1
P (Ace — Spade) = .
13
5. Independence of Events
P (A ∩ B) = P (A) · P (B).
If you roll two dice, the outcome of one die does not affect the outcome of the other.
Hence, the events are independent.
6. Bayes’ Theorem
Suppose a test for a disease is 99% accurate, and 1% of the population has the disease.
Bayes’ Theorem helps calculate the probability that a person who tested positive actually
has the disease.
2
7. Exercises
1. A fair die is rolled. What is the probability of getting an even number?
2. Two coins are tossed. What is the probability of getting at least one head?
4. A jar contains 5 red balls and 3 blue balls. If a ball is drawn at random, what is
the probability that it is red?
5. A box contains 10 items, 3 of which are defective. If two items are selected at
random, what is the probability that both are defective?