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

Discrete Probability - 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:Discrete Probability, Probabilities Theory, Complexity of Algorithms, Applications in Error-Correcting Coding, Data Compression, Data Restoration, Medical Expert Systems, Search Engines, Context of Gambling

Typology: Slides

2012/2013

Uploaded on 04/27/2013

atmaja
atmaja 🇮🇳

4.2

(45)

182 documents

1 / 15

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

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

Partial preview of the text

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

Lecture 7

5.1 5.2 Discrete Probability

5.1 Probabilities

  • Important in study of complexity of algorithms.
  • Modeling the uncertain world: information, data.
  • Applications in error-correcting coding, data compression, data restoration, medical expert systems, search engines, etc.
  • Modern AI deals with uncertainty in the world (was my measurement correct, were my assumptions correct). Probability theory is the answer to that.
  • Developed in the context of gambling.

It’s all counting again!

example: A lottery has a big price if you correctly guess four digits out of 4 in the right order. A small price is won if you have guessed 3 digits correctly at the correct location.

 |S| = 10^4. |E-big| = 1 |E-small| =? There are 4 ways to have 3 digits correct (and one digit wrong therefore). For each of these the number of possibilities are: 1 x 1 x 1 x 9 (9 for incorrect digit). |E-small| = 4 x 9 = 36. p(E-small) = 36 / 10^4.

Examples:

  1. What is the probability to draw a full house from a deck of cards (2 of one kind & 3 of one kind)?

 First draw the 3 of a kind, then the 2 of a kind (order matters). P(13,2) is number of ways to draw 2 different kinds out of 13 kinds. C(4,3) is number of ways to pick 3 cards among 4 (order doesn’t matter). C(4,2) is number of ways to pick 2 cards among 4 (order doesn’t matter). C(52,5) is total number of 5 cards drawn from a deck of 52.

solution: P(13,2) x C(4,3) x C(4,2) / C(52,5).

  1. Probability of sequence 11,4,17,39,23 out of 50 when sampling a) without replacement, b) with replacement.

a) |E| = 1, |S| = P(50,5)  P(E) = 1/P(50,5). (sorry - different P’s !)

b) |E| = 1, |S| = 50^5  P(E) = 1/50^

Set S1 is the set of all Irish citizens with blue eyes. Set S2 is the set of all Irish citizens with black hair. Set S3 is the set of all Irish citizens.

|S1| = 1000, |S2|=3000, |S3|=10,000, |^ S 1^  S^ 2 |^ =^200

Q: If we meet a random Irish citizen in the streets of Dublin, what is the probability that he/she has blue eyes OR black hair?

A: Total number of possibilities |S3| = 10,000. Total “area covered” by S1 U S2 is: |E| = |S1 U S2| = |S1| + |S2| -

p(E) = p(S1 U S2) = |S1| + |S2| - / |S|

= p(S1) + p(S2) – p( )

U
S
S

| S 1 (^)  S 2 |

S

| S 1  S 2 |

| S 1  S 2 |

| S 1  S 2 |

Theorem: p(E1 U E2) = p(E1) + p(E2) – p( E 1  E 2 )

A famous example: You participate in a game where there are 3 doors with only one hiding a big price. You pick a door. The game show host (who knows where the price is), opens another empty door and offers you to switch. Should you?

 You don’t switch: You have probability 1/3 to pick the correct door. If you don’t switch that doesn’t change (imagine doing the experiment a million times with this strategy).

 You switch: If you got the correct door (prob. 1/3) and you switch you lost. If you got the wrong door (prob. 2/3) and you switch you win!

p(s) is called a probability distribution.

This is a generalization of the definition of probability in the previous section because there it was assumed that all elements were equally likely: p(s) = 1 / |S|. This is called the uniform distribution.

Definition: assume that E is a subset of S with |E| elements. The total probability of the event is now given by:

s E

p E p s

= (^) ∑

Example: We have a loaded die such that 3 appears twice as often and the other side appear equally often. What is the probability of finding an odd number when we roll the die?

p(1)=p(2)=p(4)=p(5)=p(6) = q p(3) = 2q

s S

p s

∑ = ^ 5q + 2q.^ ^ q = 1/

odd outcomes: E = {1 3 5} p(E) = p(1)+p(2)+p(3) = 4/7.

Theorem: When E1, E2, ...,En etc are disjoint subsets of S we have:

1

1 1 1

( ) ( ) ( ) ( ) n (^) i i i

n n n i i i (^) s E i^ s^ E^ i

p E p s p s p E

=

= (^) ∈ =^ ∈^ =

= (^) ∑ = (^) ∑ ∑ =∑ 

Situation is more difficult if we have overlaps in the subsets: For 2 subsets we have:

Theorem: p(E1 U E2) = p(E1) + p(E2) – p( E 1  E 2 )

1 2 1 2

1 2

1 2 1 2

( ) ( ) ( ) ( )

( ) ( ) ( )

s E s E s E E

p E E p s p s p s

p E p E p E E

∈ ∈ ∈

= + − =

∑ ∑ ∑ 

5.2 Exercises

Ex. 20 p. 377: Find the smallest number of people in a room such that the probability that someone has its birthday today is larger than ½. assuming: a year has 366 days and all birthdays are equally likely.

Let’s say there are n people. S = {all combinations of birthdays for n people} |S| = 366^n

E1 = {one person has his/her birthday today} E2 = {two people have their birthday today} E3 =....

E none of the people has their birthday today.

| E |^ = 365^n ( ) 1 ( ) 1 | | / | | 1 365 0. 366 log 2 / log(366 / 365) 253.

n p E p E E S n n

= − = − = − > ⇒ > =

n=