








Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Community
Ask the community for help and clear up your study doubts
Discover the best universities in your country according to Docsity users
Free resources
Download our free guides on studying techniques, anxiety management strategies, and thesis advice from Docsity tutors
During the study of discrete mathematics, I found this course very informative and applicable.The main points in these lecture slides are:Probability of Odd Number, Discrete Probability, Probability of Element, Probability of Complement, Overlapping Events, Disjoint Events, Conditional Probability, Equivalent Statement, Probability of Intersection
Typology: Slides
1 / 14
This page cannot be seen from the preview
Don't miss anything!
s S
∈
( ) ( ) s E
p E p s ∈
p E ( ) = 1 − p E ( )
1 1
n n i i i i
=^ =
( ) 1 ( ) 1 ( ) 3 ( )^1 p E = 2 P F = 2 P E F = 4 P E F = 4
What is the probability of odd number of tails (i.e. of event E) if we know that the first flip was tails (i.e. F happened)?
If we know that F happened the total number of possible outcomes shrinks to |F| E = THH, THT, TTH, TTT. Of those there are two that make event E happen: THH, TTT. P(E|F) = 1/
( ) ( | ) ( )
p E F P E F P F
=
Theorem: If E and F are two events and p(F)>0, then the conditional probability of E given F is given by:
Example: What is the probability that a family with 2 kids has two boys, given that they have at least one boy? (all possibilities are equally likely).
S: all possibilities: {BB, GB, BG, GG}. E: family has two boys: {BB}. F: family has at least one boy: {BB, GB, BG}. E F = {BB}
p(E|F) = (1/4) / (3/4) = 1/
E^ BB
( ) ( | ) ( ) ( ) ( ) ( ) ( ) ( )
P E F P E F P E P E P E F P E P F P F
= ⇔ = ⇔ =
Equivalent statement: The probability of the intersection od 2 events is the product of the probabilities of the separate events.
Example: A family has 2 children (|S|=4). Is the event E that the family has children of both sexes independent from the event F that they have at most one boy?
E: {BG, GB} F: {GG, BG, GB}
E (^) F: {BG, GB}
( ) 1/ 2 ( ) ( ) 1/ 2 3 / 4 3 / 8
P E F P E P F
= = × =
dependent
What about a family with 3 kids?
|S| = 8 |E| = 8 – 2 = 6 (only BBB and GGG violate E). |F| =| {GGG, GBB, BGB, BBG} | = 4
( ) 3 / 8 ( ) ( ) 3 / 4 1/ 2 3 / 8
P E F P E P F
= = × =
independent! (again: it’s hard to get any intuition for this).
Does it sum to 1?
Recall:
! ( ) !( )!
p q n^ n p qk^ n^ k k n k
Use q = 1-p to prove the result.
Many problems deal with real numbers rather than set memberships. E.g. What is the sum of the outcomes of 2 dice? How many times do we expect to 7 1 in bit-strings of length 12?
We were able to answer those questions before, but we now introduce some formal machinery:
Definition: A random variable X is a function (not a variable!) from sample space to the real numbers. It assigns a real number to each possible outcome. (and is not random!).
Example: S={apple, pear, banana} X(apple) = 1, X(pear) = 2, X(banana) = 3.
X: the number of times heads comes up when we toss a coin 2 times: X(TT) = 0; X(HT) = 1; X(TH) = 1; X(HH) = 2;
Definition: The expected value of a random variable X(s) on the sample space S is given by: ( ) ( ) ( ) s S
E X X s p s ∈
= (^) ∑
Sometimes, it’s more efficient to compute expectations by clumping together all elements of S that result in the same value for X(s).
, ( )
s S X s r
∈ =
∑
number of elements in S such that X(s)=r
only true when all p(s) s.t. X(s)=r have equal probability.
generally true
Example: X is number of heads in 2 coin tosses. Expected value? E(X) = 0 x P(X=0) + 1 x P(X=1) + 2 x P(X=2) = 0 + ½ + 2x ¼ = 1. We expect on average that we see 1 head.
Example: X is the value of the number that comes up on a die. Expected value? E(X) = 1 x 1/6 + 2 x 1/6 + 3 x 1/6 + 4 x 1/6 + 5 x 1/6 + 6 x 1/6 = 21/6 = 7/2.
(matlab demo2)