CS 441 Discrete Mathematics for CS Lecture 19. Probabilities. CS 441 Discrete mathematics for CS. Probabilities

Similar documents
Monty Hall Puzzle. Draw a tree diagram of possible choices (a possibility tree ) One for each strategy switch or no-switch

CS 441 Discrete Mathematics for CS Lecture 20. Probabilities. CS 441 Discrete mathematics for CS. Probabilities

CSC Discrete Math I, Spring Discrete Probability

Chapter Summary. 7.1 Discrete Probability 7.2 Probability Theory 7.3 Bayes Theorem 7.4 Expected value and Variance

Sec$on Summary. Assigning Probabilities Probabilities of Complements and Unions of Events Conditional Probability

With Question/Answer Animations. Chapter 7

Lecture notes for probability. Math 124

Discrete Structures for Computer Science

A brief review of basics of probabilities

Axioms of Probability

Statistical Inference

Discrete Probability

AMS7: WEEK 2. CLASS 2

Review of probabilities

Topic 5 Basics of Probability

Discrete Probability

4 Lecture 4 Notes: Introduction to Probability. Probability Rules. Independence and Conditional Probability. Bayes Theorem. Risk and Odds Ratio

Lecture 1. Chapter 1. (Part I) Material Covered in This Lecture: Chapter 1, Chapter 2 ( ). 1. What is Statistics?

CMPSCI 240: Reasoning about Uncertainty

Recap. The study of randomness and uncertainty Chances, odds, likelihood, expected, probably, on average,... PROBABILITY INFERENTIAL STATISTICS

Counting Rules. Counting operations on n objects. Sort, order matters (perms) Choose k (combinations) Put in r buckets. None Distinct.

Section 13.3 Probability

The enumeration of all possible outcomes of an experiment is called the sample space, denoted S. E.g.: S={head, tail}

Chapter 5 : Probability. Exercise Sheet. SHilal. 1 P a g e

Topic -2. Probability. Larson & Farber, Elementary Statistics: Picturing the World, 3e 1

Compound Events. The event E = E c (the complement of E) is the event consisting of those outcomes which are not in E.

BASICS OF PROBABILITY CHAPTER-1 CS6015-LINEAR ALGEBRA AND RANDOM PROCESSES

STAT 430/510 Probability

Useful for Multiplication Rule: When two events, A and B, are independent, P(A and B) = P(A) P(B).

1 The Basic Counting Principles

LECTURE 1. 1 Introduction. 1.1 Sample spaces and events

Probability Notes. Definitions: The probability of an event is the likelihood of choosing an outcome from that event.

(6, 1), (5, 2), (4, 3), (3, 4), (2, 5), (1, 6)

Lecture 1 Introduction to Probability and Set Theory Text: A Course in Probability by Weiss

ECE 340 Probabilistic Methods in Engineering M/W 3-4:15. Lecture 2: Random Experiments. Prof. Vince Calhoun

I - Probability. What is Probability? the chance of an event occuring. 1classical probability. 2empirical probability. 3subjective probability

Probability: Axioms, Properties, Interpretations

Lecture 3. Probability and elements of combinatorics

Lecture Notes 1 Basic Probability. Elements of Probability. Conditional probability. Sequential Calculation of Probability

Lecture 3 Probability Basics

Countable and uncountable sets. Matrices.

Discrete Mathematics and Probability Theory Spring 2016 Rao and Walrand Note 14

UNIT 5 ~ Probability: What Are the Chances? 1

STAT:5100 (22S:193) Statistical Inference I

Lecture Lecture 5

P (A B) P ((B C) A) P (B A) = P (B A) + P (C A) P (A) = P (B A) + P (C A) = Q(A) + Q(B).

University of California, Berkeley, Statistics 134: Concepts of Probability. Michael Lugo, Spring Exam 1

Chapter Learning Objectives. Random Experiments Dfiii Definition: Dfiii Definition:

Fundamentals of Probability CE 311S

Example 1. The sample space of an experiment where we flip a pair of coins is denoted by:

Probability: Terminology and Examples Class 2, Jeremy Orloff and Jonathan Bloom

Introduction and basic definitions

Chapter 2: Probability Part 1

The probability of an event is viewed as a numerical measure of the chance that the event will occur.

Probability Rules. MATH 130, Elements of Statistics I. J. Robert Buchanan. Fall Department of Mathematics

Presentation on Theo e ry r y o f P r P o r bab a il i i l t i y

1. When applied to an affected person, the test comes up positive in 90% of cases, and negative in 10% (these are called false negatives ).

Probabilities and Expectations

Lecture 2: Probability

Probability- describes the pattern of chance outcomes

Chapter 2. Conditional Probability and Independence. 2.1 Conditional Probability

Probability Review Lecturer: Ji Liu Thank Jerry Zhu for sharing his slides

Chapter 2 PROBABILITY SAMPLE SPACE

Probability Theory and Applications

PERMUTATIONS, COMBINATIONS AND DISCRETE PROBABILITY

Stats Probability Theory

STA111 - Lecture 1 Welcome to STA111! 1 What is the difference between Probability and Statistics?

Review of probability

HW MATH425/525 Lecture Notes 1

Probability COMP 245 STATISTICS. Dr N A Heard. 1 Sample Spaces and Events Sample Spaces Events Combinations of Events...

Lecture 3 - Axioms of Probability

Basic Probability and Statistics

Chapter 3 : Conditional Probability and Independence

1 INFO 2950, 2 4 Feb 10

Chapter 2. Conditional Probability and Independence. 2.1 Conditional Probability

Mathematics. ( : Focus on free Education) (Chapter 16) (Probability) (Class XI) Exercise 16.2

TOPIC 12 PROBABILITY SCHEMATIC DIAGRAM

Lecture 8: Conditional probability I: definition, independence, the tree method, sampling, chain rule for independent events

Mean, Median and Mode. Lecture 3 - Axioms of Probability. Where do they come from? Graphically. We start with a set of 21 numbers, Sta102 / BME102

Introduction to Probability. Ariel Yadin. Lecture 1. We begin with an example [this is known as Bertrand s paradox]. *** Nov.

Week 2. Section Texas A& M University. Department of Mathematics Texas A& M University, College Station 22 January-24 January 2019

Number Theory and Counting Method. Divisors -Least common divisor -Greatest common multiple

Quantitative Methods for Decision Making

Review of Probability Mark Craven and David Page Computer Sciences 760.

Chap 4 Probability p227 The probability of any outcome in a random phenomenon is the proportion of times the outcome would occur in a long series of

Properties of Probability

Conditional Probability. CS231 Dianna Xu

EE126: Probability and Random Processes

Lecture 9: Naive Bayes, SVM, Kernels. Saravanan Thirumuruganathan

Probability 1 (MATH 11300) lecture slides

MATH 3C: MIDTERM 1 REVIEW. 1. Counting

Announcements. Topics: To Do:

14 - PROBABILITY Page 1 ( Answers at the end of all questions )

MATH/STATS 425 : Introduction to Probability. Boaz Slomka

Lecture 2 31 Jan Logistics: see piazza site for bootcamps, ps0, bashprob

4. Probability of an event A for equally likely outcomes:

Event A: at least one tail observed A:

CS 361: Probability & Statistics

Probabilistic models

2. Probability. Chris Piech and Mehran Sahami. Oct 2017

Transcription:

CS 441 Discrete Mathematics for CS Lecture 19 Milos Hauskrecht milos@cs.pitt.edu 5329 Sennott Square Experiment: a procedure that yields one of the possible outcomes Sample space: a set of possible outcomes Event: a subset of possible outcomes (E is a subset of S) Assuming the outcomes are equally likely, the probability of an event E, defined by a subset of outcomes from the sample space S is P(E)= E / S The cardinality of the subset divided by the cardinality of the sample space. 1

Event E, Sample space S, all outcomes equally likely, then P(E)= E / S roll of two dices What is the probability that the outcome is 7. All possible outcomes (sample space S): (1,6 ) (2,6) (6,1), (6,6) total: 36 Outcomes leading to 7 (event E) (1,6 ) (2,5) (6,1) total: 6 P(sum=7)= 6/36 = 1/6 Event E, Sample space S, all outcomes equally likely, then P(E)= E / S Odd of winning a lottery: 6 numbers out of 40. Total number of outcomes (sample space S): C(40,6) = 3,838,380 Winning combination (event E): 1 Probability of winning: P(E) =1/C(40,6)= 34! 6! / 40! = 1/3,838,380 2

Event E, Sample space S, all outcomes equally likely, then P(E)= E / S Example (cont): Odd of winning a second prize in lottery: hit 5 of 6 numbers selected from 40. Total number of outcomes (sample space S): C(40,6) = 3,838,380 Second prize (event E): C(6,5)*(40-6)= 6*34 Probability of winning: P(E) =6*34/C(40,6)= (6*34)/3,838,380 Event E, Sample space S, all outcomes equally likely, then P(E)= E / S Example (cont): Odd of winning a third prize in lottery: hit 4 of 6 numbers selected from 40. Total number of outcomes (sample space S): C(40,6) = 3,838,380 Third prize (event E): C(6,4)*C(40-6,2) = C(6,4)*C(34,2) Probability of winning: P(E) = C(6,4)*C(34,2) /C(40,6) 3

Event E, Sample space S, all outcomes equally likely, then P(E)= E / S Another lottery: 6 numbers (ordered) selected out of 40 numbers (with repetitions) Total number of outcomes: Permutations with repetitions: = 40 6 Number of winning configuration: 1 P(win) = 1/40 6 And its modification: If the winning combination is order independent: E.g. (1,5,17,25,5,13) is equivalent to (5,17,5,1,25,13) Number of winning permutations = number of permutations of 6 = 6! P(win)= 6! / 40 6 Theorem: Let E be an event and ~E its complement with regard to S. Then: P(~E) = 1 P(E) Sample space ~E E Proof. P(~E) = ( S - E ) / S = 1- E / S 4

10 randomly generated bits. What is the probability that there is at least one zero in the string. All strings No zero At least one zero Event: seeing no-zero string P(E) =? ~Event: seeing at least one zero in the string 10 randomly generated bits. What is the probability that there is at least one zero in the string. All strings No zero At least one zero Event: seeing no-zero string P(E) =1/ 2 10 ~Event: seeing at least one zero in the string P(~E)= 1-P(E)=1-1/2 10 5

Theorem. Let E1 and E2 be two events in the sample space S. Then: P(E1 E2) = P(E1) + P(E2) P(E1 E2) This is an example of the inclusion-exclusion principle U E1 E2 Theorem. Let E1 and E2 be two events in the sample space S. Then: P(E1 E2) = P(E1) + P(E2) P(E1 E2) Probability that a positive integer <= 100 is divisible either by 2 or 5. P(E1)= 50/100 P(E2)= 20/100 P(E1 E2) = 10/100 P(E1 E2) = (5+2-1)/10 = 6/10 6

Assumption applied so far: the probabilities of each outcome are equally likely. However in many cases outcomes may not be equally likely. a biased coin or a biased dice. Biased Coin: Probability of head 0.6, probability of a tail 0.4. Biased Dice: Probability of 6: 0.4, Probability of 1, 2, 3, 4, 5: 0.12 each Three axioms of the probability theory: (1) Probability of a discrete outcome is: 0 < = P(s) <= 1 (2) Sum of probabilities of all (disjoint) outcomes is = 1 (3) For any two events E1 and E2 holds: P(E1 E2) = P(E1) + P(E2) P(E1 E2) 7

Probability distribution Definition: A function p: S [0,1] satisfying the three conditions is called a probability distribution a biased coin Probability of head 0.6, probability of a tail 0.4 Probability distribution: Head 0.6 The sum of the probabilities sums to 1 Tail 0.4 Note: a uniform distribution is a special distribution that assigns equal probabilities to each outcome. Probability of an Event Definition: The probability of the event E is the sum of the probabilities of the outcomes in E. Note that now no assumption is being made about the distribution. 8

Probability of an event Example Suppose that a die is biased so that 3 appears twice as often as each other number, but that the other five outcomes are equally likely. What is the probability that an odd number appears when we roll this die? Solution: We want the probability of the event E = {1,3,5}. of outcomes: p(3) = 2/7 and p(1) = p(2) = p(4) = p(5) = p(6) = 1/7. Then, p(e) = p(1) + p(3) + p(5) = 1/7 + 2/7 + 1/7 4/7. of Complements and Unions Complements still hold. Since each outcome is in either E or but not both, Unions: also still holds under the new definition. 9

Conditional probability Definition: Let E and F be two events such that P(F) > 0. The conditional probability of E given F P(E F) = P(E F) / P(F) Conditional probability Definition: Let E and F be two events such that P(F) > 0. The conditional probability of E given F P(E F) = P(E F) / P(F) What is the probability that a family has two boys given that they have at least one boy. Assume the probability of having a girl or a boy is equal. Possibilities. BB BG GB GG Probability of having two boys P(BB) = ¼ Probability of having one boy P(one boy) = ¾ P(BB given a boy) = ¼ / ¾ = 1/3 10

Conditional probability Definition: Let E and F be two events such that P(F) > 0. The conditional probability of E given F P(E F) = P(E F) / P(F) What is the probability that a family has two boys given that they have at least one boy. Assume the probability of having a girl or a boy is equal. Possibilities. BB BG GB GG Probability of having two boys P(BB) = ¼ Probability of having a boy P(one boy) = ¾ P(BB given a boy) = ¼ / ¾ = 1/3 BB BG GB GG Conditional probability Corrolary: Let E and F be two events such that P(F) > 0. Then: P(E F) = P(E F) * P(F) Proof: From the definition of the conditional probability: P(E F) = P(E F) / P(F) P(E F) = P(E F) P(F) This result is also referred to as the product rule. 11

Conditional probability Corrolary: Let E and F be two events such that P(F) > 0. Then: P(E F) = P(E F) P(F) Assume the probability of getting a flu is 0.2 Assume the probability of having a high fever given the flu: 0.9 What is the probability of getting a flu with fever? P(flu fever) = P(fever flu)p(flu) = 0.9*0.2 = 0.18 Conditional probability Corrolary: Let E and F be two events such that P(F) > 0. Then: P(E F) = P(E F) P(F) Assume the probability of getting a flu is 0.2 Assume the probability of having a high fever given the flu: 0.9 What is the probability of getting a flu with fever? P(flu fever) = P(fever flu)p(flu) = 0.9*0.2 = 0.18 When is this useful? Sometimes conditional probabilities are easier to estimate. 12