Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

Probability of Odd Number - Discrete Mathematics and its Applications - Lecture Slides, Slides of Discrete Mathematics

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

2012/2013

Uploaded on 04/27/2013

atmaja
atmaja 🇮🇳

4.2

(45)

182 documents

1 / 14

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Lecture 8
5.2 Discrete Probability
Docsity.com
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe

Partial preview of the text

Download Probability of Odd Number - Discrete Mathematics and its Applications - Lecture Slides and more Slides Discrete Mathematics in PDF only on Docsity!

Lecture 8

5.2 Discrete Probability

5.2 Recap

  • Sample space: space of all possible outcomes.
  • Event: subset of of S.
  • p(s) : probability of element s of S:
  • Probability of complement
  • Disjoint events:
  • Overlapping events:
  • Three doors problem (see ex. 39 p. 362 + matlab demo)

∀ s 0 ≤ p s ( ) ≤ 1 ( ) 1

s S

p s

( ) ( ) s E

p E p s

p E ( ) = 1 − p E ( )

1 1

n n i i i i

p E p E

=^ =

 =^ ∑

p E ( 1  E 2 ) = p E ( 1 ) + p E ( 2 ) − p E ( 1  E 2 )

HHH
HHT
HTH
HTT
THH
TTH
THT
TTT
E
F
S

( ) 1 ( ) 1 ( ) 3 ( )^1 p E = 2 P F = 2 P EF = 4 P EF = 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/

THH
TTT
THT
TTH
F
E|F

( ) ( | ) ( )

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

F
GB
BG
GG

( ) ( | ) ( ) ( ) ( ) ( ) ( ) ( )

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

| E 1  E 2 |=| {GBB, BGB, BBG}| = 3

( ) 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.

5.2 Random Variables

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

p X r p s

K r p s

∈ =

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)