Probability, Conditional Probability and Bayes Rule IE231 - Lecture Notes 3 Mar 6, 2018

Similar documents
Probability deals with modeling of random phenomena (phenomena or experiments whose outcomes may vary)

Example. What is the sample space for flipping a fair coin? Rolling a 6-sided die? Find the event E where E = {x x has exactly one head}

Chapter 7: Section 7-1 Probability Theory and Counting Principles

Properties of Probability

Chapter 2 PROBABILITY SAMPLE SPACE

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

Conditional Probability and Independence

2.3 Conditional Probability

Name: Exam 2 Solutions. March 13, 2017

Lecture 2: Probability. Readings: Sections Statistical Inference: drawing conclusions about the population based on a sample

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

Conditional Probability. CS231 Dianna Xu

3.2 Probability Rules

Outline Conditional Probability The Law of Total Probability and Bayes Theorem Independent Events. Week 4 Classical Probability, Part II

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

Problem # Number of points 1 /20 2 /20 3 /20 4 /20 5 /20 6 /20 7 /20 8 /20 Total /150

Slide 1 Math 1520, Lecture 21

Probability and Sample space

STA 2023 EXAM-2 Practice Problems. Ven Mudunuru. From Chapters 4, 5, & Partly 6. With SOLUTIONS

STA 2023 EXAM-2 Practice Problems From Chapters 4, 5, & Partly 6. With SOLUTIONS

Math P (A 1 ) =.5, P (A 2 ) =.6, P (A 1 A 2 ) =.9r

Econ 325: Introduction to Empirical Economics

STAT Chapter 3: Probability

ELEG 3143 Probability & Stochastic Process Ch. 1 Probability

PROBABILITY.

Conditional probability

Today we ll discuss ways to learn how to think about events that are influenced by chance.

STP 226 ELEMENTARY STATISTICS

Intermediate Math Circles November 8, 2017 Probability II

Conditional Probability (cont'd)

1 Preliminaries Sample Space and Events Interpretation of Probability... 13

Lecture notes for probability. Math 124

1. Discrete Distributions

UNIT 5 ~ Probability: What Are the Chances? 1

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

2011 Pearson Education, Inc

Business Statistics. Lecture 3: Random Variables and the Normal Distribution

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

Chapter 3 : Conditional Probability and Independence

Chapter 2: Probability Part 1

Outline. Probability. Math 143. Department of Mathematics and Statistics Calvin College. Spring 2010

1 The Basic Counting Principles

Probabilistic models

Probability 5-4 The Multiplication Rules and Conditional Probability

Math 140 Introductory Statistics

1 Probability Theory. 1.1 Introduction

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

Binomial Probability. Permutations and Combinations. Review. History Note. Discuss Quizzes/Answer Questions. 9.0 Lesson Plan

Lecture 1. ABC of Probability

Probability Experiments, Trials, Outcomes, Sample Spaces Example 1 Example 2

Mutually Exclusive Events

CMPSCI 240: Reasoning about Uncertainty

Lecture 8: Probability

Math 140 Introductory Statistics

( ) P A B : Probability of A given B. Probability that A happens

Elementary Discrete Probability

Probability and Statistics Notes

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

The set of all outcomes or sample points is called the SAMPLE SPACE of the experiment.

MS-A0504 First course in probability and statistics

Econ 113. Lecture Module 2

Chapter 2 Class Notes

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

STAT 516: Basic Probability and its Applications

MAT2377. Ali Karimnezhad. Version September 9, Ali Karimnezhad

Discrete Probability

Chapter 13, Probability from Applied Finite Mathematics by Rupinder Sekhon was developed by OpenStax College, licensed by Rice University, and is

Sum and Product Rules

Conditional Probability

P (E) = P (A 1 )P (A 2 )... P (A n ).

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

Topic 2 Probability. Basic probability Conditional probability and independence Bayes rule Basic reliability

Event A: at least one tail observed A:

Random processes. Lecture 17: Probability, Part 1. Probability. Law of large numbers

Chapter 6: Probability The Study of Randomness

Chapter. Probability

HW2 Solutions, for MATH441, STAT461, STAT561, due September 9th

2.6 Tools for Counting sample points

REPEATED TRIALS. p(e 1 ) p(e 2 )... p(e k )

Motivation. Stat Camp for the MBA Program. Probability. Experiments and Outcomes. Daniel Solow 5/10/2017

Mathematical Foundations of Computer Science Lecture Outline October 18, 2018

Chapter 7 Wednesday, May 26th

Chapter 5, 6 and 7: Review Questions: STAT/MATH Consider the experiment of rolling a fair die twice. Find the indicated probabilities.

Probability Theory. Introduction to Probability Theory. Principles of Counting Examples. Principles of Counting. Probability spaces.

Probability & Random Variables

9/6/2016. Section 5.1 Probability. Equally Likely Model. The Division Rule: P(A)=#(A)/#(S) Some Popular Randomizers.

Homework 8 Solution Section

2.4 Conditional Probability

Chapter 2.5 Random Variables and Probability The Modern View (cont.)

Exam 1 Review With Solutions Instructor: Brian Powers

an event with one outcome is called a simple event.

PLEASE MARK YOUR ANSWERS WITH AN X, not a circle! 1. (a) (b) (c) (d) (e) 2. (a) (b) (c) (d) (e) (a) (b) (c) (d) (e) 4. (a) (b) (c) (d) (e)...

CHAPTER 8: Polar 1. Convert to polar.

Topic 5: Probability. 5.4 Combined Events and Conditional Probability Paper 1

Math 493 Final Exam December 01

Dynamic Programming Lecture #4

Deep Learning for Computer Vision

QUIZ 1 (CHAPTERS 1-4) SOLUTIONS MATH 119 FALL 2012 KUNIYUKI 105 POINTS TOTAL, BUT 100 POINTS

TOPIC 12 PROBABILITY SCHEMATIC DIAGRAM

Random Signals and Systems. Chapter 1. Jitendra K Tugnait. Department of Electrical & Computer Engineering. James B Davis Professor.

Transcription:

Probability, Conditional Probability and Bayes Rule IE31 - Lecture Notes 3 Mar 6, 018 #Introduction Let s recall some probability concepts. Probability is the quantification of uncertainty. For instance in a coin toss, P (H) = 1/. Set of the union of all possible events is the sample space. For instance single coin toss sample space is S = {H, T }. Probability of an event is actually the relative size of the event to the sample space. In an experiment, that has equally likely outcomes, number of potential outcomes in an event relative to the total number of outcomes in the sample space corresponds to the probability of that event. Some events are mutually exclusive and some events are dependent. Sample space is not always easy to measure and is not always finite. Counting is one way of estimating a sample space (especially discrete ones). Estimation of probability of events is not always easy. One way to estimate is to repeat the experiment for a number of times. As we increase the number of repetitions, the probability will become more stable. For instance suppose we don t know the probability of getting (H)eads in a coin toss and we repeat coin tossing for a number of times. set.seed(31) coin_toss_probability<-function(repetitions){ experiment<-sample(c("h","t"),size=repetitions,replace=true) return(round(sum(experiment=="h")/repetitions,4)) } #Do the experiment with increasing repetitions coin_toss_probability(repetitions=10) ## [1] 0.6 coin_toss_probability(repetitions=100) ## [1] 0.7 coin_toss_probability(repetitions=1000) ## [1] 0.0 coin_toss_probability(repetitions=0000) ## [1] 0.4989 Some examples 1. In a sports bar, there are 10 football fans, 1 basketball fans, 1 tennis fans and 6 curling fans. Suppose there is a single TV and there are matches of football, basketball, tennis and curling at the same time. If the TV remote is handed to one of them randomly, what is the probability that curling will be the show on TV? Answer: There are a total of 43 fans in the sports bar and 6 curling fans. P(Curling) = 6/43.. Suppose there is a group of 0 people; 10 from Ankara, 10 from Istanbul. Suppose we randomly choose people from that group. 1

a. What is the probability that all of this subgroup is from Ankara? Answer: (# of combinations including people only from Ankara) / (# of total combinations) ( 10 ) ( 0 ) = 0.016387 Alternative answer is: (10/0) (9/19) (6/16) = 0.016387. b. What is the probability that at least two from Ankara and at least two from Istanbul? Answer: P(Ankara =, Istanbul = 3 OR Ankara = 3, Istanbul = ) = (P(Ankara =, Istanbul = 3) + P(Ankara = 3, Istanbul = )) = ((# of comb. Ank, Ist 3) + (# of comb. Ank 3, Ist ))/(# of total combinations) ( 10 10 3 + 10 3 10 ) ( 0 ) = 0.696944 3. ( Blackjack ) Suppose you are drawing two cards from the deck. Assume all number rank cards (-10) are points, Ace (A) is 11 points and (J)ack, (Q)ueen and (K)ing are 10 points. What is the probability that total points of these two cards exceed 0. Answer: Max score for two cards is (two Aces). To exceed 0, one needs Ace-9 pairs or any pair of 10-Ace-J-Q-K cards. We know that there are 4 of each rank. So P (Score 0) = P (Aand9) + P (any two of 10 Ace J Q K). We know that total number of hands is ( ) = 136. So # of combinations with either A-9 or 9-A is 4 4 = 16. # of combinations of getting two cards from 10-Ace-J-Q-K ranks is ( 0 ) 190 + 16 = 190. So P (Score 0) = = 0.1344 136 Alternative answer: P (A 9or9 A) = 4/ 4/1+4/ 4/1 = 0.0106637 and P (anytwoof 10 Ace J Q K) = 0/ 19/1 = 0.143881. Total probability is P (Score 0) = 0.0106637+0.143881 = 0.134 4. Suppose you are the gatekeeper of a playing ground for 10 year old boys and try to assess their age by their height. Height of 90% of boys aged 10 falls between 130 and 10 cms. It is equally likely that a boy aged 10 has the height lower than 130 cm or higher than 10 cm. What is the probability of rejecting a child because he s too long? Answer: P (130 X 10) = 0.9 and P (X 130) = P (X 10). So P (X 10) = 1 P (130 X 10) P (X 130)..P (X 10) = 0.1 and P (X 10) = 0.0. Conditional Probability Definition: P (A B) means that probability of event A given that event B already occured or probability of A conditional on B.

Example: What is the probability of getting two heads (HH) if we know that the first coin is H? (1/) Example: Suppose we are rolling two dice. a. What is the probability of getting the sum equal to 8? P (Sum = 8) = P (D 1 =, D = 6) + P (3, ) + P (4, 4) + P (, 3) + P (6, ) = 6/36 = 1/6 b. What is the probability of getting the sum more than or equal to 8 given the first roll is 3? P (Sum 8 D 1 = 3) = P (3, ) + P (3, 6) = /6 = 1/3 Conditional probability of event A given B, can be defined as P (A B) = P (A B) P (B) if P (B) > 0. Example: We asked 1000 people, 400 men and 600 women: Where do you want to visit this summer? Amsterdam or London?. The answers are as follows. ## Amsterdam London ## Men 10 0 ## Women 40 10 a. What is the probability of a randomly chosen person is a woman? Answer: P (W ) = (n(w L) + n(w P ))/n(s) = (10 + 40)/1000 = 0.6 b. What is the probability of a randomly chosen person chooses to to visit Amsterdam? Answer: P (A) = (n(a W ) + n(a M))/n(S) = (40 + 10)/1000 = 0.6 c. What is the probability of a London visitor is a man? Answer: P (M L) = P (M L) P (L) = n(m L)/n(S) n(l)/n(s) = 0/400 = 0.6 3

Independence Two events can be independent. It means P (A B) = P (A) or P (B A) = P (B). If the events (A i ) are independent then P (A 1 A... A k ) = P (A 1 )P (A )... P (A k ). Example: Suppose you rolled a die times and they all ended up 4. What is the probability that, at the 6th time, the die will get 4 again? Solution: Die rolls are independent events. So outcome of a roll does not affect the outcome of the other rolls. It is 1/6. Product rule If both P (A) > 0 and P (B) > 0, then P (A B) = P (A)P (B A). We can also say P (A B) = P (B A) = P (B)P (A B) Example: You draw two cards from a deck. What is the probability that you get two (A)ces? Solution: P (A B) = 4/ 3/ = 0.00443787 Example: You are at a tea shop. There are 10 (W)hite teas, 1 (B)lack teas and 8 (G)reen teas on the menu. According to the waiter all teas are equally tasty. You ask the waiter bring a tea but it should not be green tea. What is the probability that you will get a white tea? Solution: P (W G ) = P (W G )/P (G ) = P (W )/P (G ) = 10/30 /30 = 10/ Bayes Rule Theorem of total probability: Given the events B i are collective parts of the sample space and P (B i ) > 0, then for any event A, P (A) > 0 P (A) = k P (B i A) = i k P (B i )P (A B i ) i Bayes rule: Given the events B i are collective parts of the sample space and P (B i ) > 0, then for any event A, P (A) > 0 P (B r A) = P (B r A) k i P (B i A) = P (B r)p (A B r ) k i P (B i)p (A B i ) Example.41 from the book: In an assembly plant, there are three machines B 1, B and B 3. These machines make the 30%, 4% and % of the products. %, 3% and % of their output is known to be defective. So, what is the probability of getting a defective product at a random time? Solution: Say, event of getting a defective item is A and we want to know P (A). P (B i ) is the probability of a product being manufactured by machine i. P (B 1 ) = 0.3, P (B ) = 0.4, P (B 3 ) = 0.. The defect probabilities given the machine are P (A B 1 ) = 0.0, P (A B 1 ) = 0.03, P (A B 1 ) = 0.0. So, P (A) = 3 i=1 P (B i)p (A B i ) = 0.3 0.0 + 0.4 0.03 + 0. 0.0 = 0.04. Example.4: If the product is defective, what is the probability that it came from machine 3? 4

P (B 3 A) P (B 3 A) = 3 i=1 P (B i)p (A B i ) = P (B 3 )P (A B 3 ) 0. 0.0 3 i=1 P (B = = 10/49 i)p (A B i ) 0.04