Presentation is loading. Please wait.

Presentation is loading. Please wait.

CSE 321 Discrete Structures

Similar presentations


Presentation on theme: "CSE 321 Discrete Structures"— Presentation transcript:

1 CSE 321 Discrete Structures
Winter 2008 Lecture 20 Probability: Bernoulli, Random Variables, Bayes’ Theorem TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: AAAAA

2 Announcements Readings Probability Theory
6.3 (New material!) Bayes’ Theorem 6.4 (5.3) Expectation Advanced Counting Techniques – Ch 7. Not covered Relations Chapter 8 (Chapter 7)

3 Highlights from Lecture 19
Conditional Probability Independence Let E and F be events with p(F) > 0. The conditional probability of E given F, defined by p(E | F), is defined as: The events E and F are independent if and only if p(E F) = p(E)p(F)

4 Bernoulli Trials and Binomial Distribution
Success probability p, failure probability q The probability of exactly k successes in n independent Bernoulli trials is

5 Random Variables A random variable is a function from
a sample space to the real numbers

6 Bayes’ Theorem Suppose that E and F are events from a sample
space S such that p(E) > 0 and p(F) > 0. Then

7 False Positives, False Negatives
Let D be the event that a person has the disease Let Y be the event that a person tests positive for the disease

8 Testing for disease Disease is very rare: p(D) = 1/100,000
Testing is accurate: False negative: 1% False positive: 0.5% Suppose you get a positive result, what do you conclude? P(YC|D) P(Y|DC)

9 P(D|Y) Answer is about 0.002

10 Spam Filtering From: Zambia Nation Farmers Union Subject: Letter of assistance for school installation To: Richard Anderson Dear Richard, I hope you are fine, Iam through talking to local headmen about the possible assistance of school installation. the idea is and will be welcome. I trust that you will do your best as i await for more from you. Once again Thanking you very much Sebastian Mazuba.

11 Bayesian Spam filters Classification domain Criteria for spam
Cost of false negative Cost of false positive Criteria for spam v1agra, ONE HUNDRED MILLION USD Basic question: given an message, based on spam criteria, what is the probability it is spam

12 Email message with phrase “Account Review”
250 of messages known to be spam 5 of messages known not to be spam Assuming 50% of messages are spam, what is the probability that a message with “Account Review” is spam

13 Proving Bayes’ Theorem

14 Expectation The expected value of random variable X(s) on
sample space S is:

15 Expectation examples Number of heads when flipping a coin 3 times
Sum of two dice Successes in n Bernoulli trials with success probability p


Download ppt "CSE 321 Discrete Structures"

Similar presentations


Ads by Google