35.4. Total Probability and Bayes Theorem. Introduction. Prerequisites. Learning Outcomes

Similar documents
Lecture Note 1 Set and Probability Theory. MIT Spring 2006 Herman Bennett

Math 141. Lecture 2: More Probability! Albyn Jones 1. jones/courses/ Library 304. Albyn Jones Math 141

Statistics and Data Analysis B

A Few Basics of Probability

Definition and Calculus of Probability

Math 370, Actuarial Problemsolving Spring 2008 A.J. Hildebrand. Problem Set 1 (with solutions)

Probability. a number between 0 and 1 that indicates how likely it is that a specific event or set of events will occur.

Statistics 100A Homework 2 Solutions

Homework 8 Solutions

Bayesian Tutorial (Sheet Updated 20 March)

PROBABILITY. The theory of probabilities is simply the Science of logic quantitatively treated. C.S. PEIRCE

Chapter 5 A Survey of Probability Concepts

Basic Probability Concepts

Basic Probability. Probability: The part of Mathematics devoted to quantify uncertainty

Lecture 1 Introduction Properties of Probability Methods of Enumeration Asrat Temesgen Stockholm University

Statistics in Geophysics: Introduction and Probability Theory

ECE302 Spring 2006 HW1 Solutions January 16,

Conditional Probability, Independence and Bayes Theorem Class 3, 18.05, Spring 2014 Jeremy Orloff and Jonathan Bloom

Section Probability (p.55)

MAS113 Introduction to Probability and Statistics

3. From among 8 students how many committees consisting of 3 students can be selected?

MATH 140 Lab 4: Probability and the Standard Normal Distribution

IAM 530 ELEMENTS OF PROBABILITY AND STATISTICS INTRODUCTION

E3: PROBABILITY AND STATISTICS lecture notes

EXAM. Exam #3. Math 1430, Spring April 21, 2001 ANSWERS

STA 371G: Statistics and Modeling

STAT 319 Probability and Statistics For Engineers PROBABILITY. Engineering College, Hail University, Saudi Arabia

Probability definitions

Chapter 13 & 14 - Probability PART

Math 210 Lecture Notes: Ten Probability Review Problems

Statistics E100 Fall 2013 Practice Midterm I - A Solutions

CONTINGENCY (CROSS- TABULATION) TABLES

Chapter 3. Cartesian Products and Relations. 3.1 Cartesian Products

2. How many ways can the letters in PHOENIX be rearranged? 7! = 5,040 ways.

OPRE504 Chapter Study Guide Chapter 7 Randomness and Probability. Terminology of Probability. Probability Rules:

Math/Stats 425 Introduction to Probability. 1. Uncertainty and the axioms of probability

Probability. Section 9. Probability. Probability of A = Number of outcomes for which A happens Total number of outcomes (sample space)

Homework 3 Solution, due July 16

Chapter 7 Probability. Example of a random circumstance. Random Circumstance. What does probability mean?? Goals in this chapter

STAT 35A HW2 Solutions

Bayesian Updating with Discrete Priors Class 11, 18.05, Spring 2014 Jeremy Orloff and Jonathan Bloom

6.3 Conditional Probability and Independence

Conditional Probability, Hypothesis Testing, and the Monty Hall Problem

First-year Statistics for Psychology Students Through Worked Examples. 2. Probability and Bayes Theorem

Reliability Applications (Independence and Bayes Rule)

AP Stats - Probability Review

SCHOOL OF ENGINEERING & BUILT ENVIRONMENT. Mathematics

For a partition B 1,..., B n, where B i B j = for i. A = (A B 1 ) (A B 2 ),..., (A B n ) and thus. P (A) = P (A B i ) = P (A B i )P (B i )

Math 3C Homework 3 Solutions

Probability & Probability Distributions

PROBABILITY. Chapter. 0009T_c04_ qxd 06/03/03 19:53 Page 133

Chapter What is the probability that a card chosen from an ordinary deck of 52 cards is an ace? Ans: 4/52.

Elements of probability theory

The normal approximation to the binomial

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

1 Combinations, Permutations, and Elementary Probability

COUNTING SUBSETS OF A SET: COMBINATIONS

The mathematical branch of probability has its

AP STATISTICS TEST #2 - REVIEW - Ch. 14 &15 Period:

5. Probability Calculus

Unit 19: Probability Models

Normal and Binomial. Distributions

2. Three dice are tossed. Find the probability of a) a sum of 4; or b) a sum greater than 4 (may use complement)

People have thought about, and defined, probability in different ways. important to note the consequences of the definition:

The Calculus of Probability

Week 2: Conditional Probability and Bayes formula

Probabilities. Probability of a event. From Random Variables to Events. From Random Variables to Events. Probability Theory I

Cartesian Products and Relations

Characteristics of Binomial Distributions

Review for Test 2. Chapters 4, 5 and 6

Homework #2 Solutions COR1-GB.1305 Statistics and Data Analysis

TOPPER Sample Paper - I. Class : XI MATHEMATICS. Questions. Time Allowed : 3 Hrs Maximum Marks: 100

1. Prove that the empty set is a subset of every set.

Formal Languages and Automata Theory - Regular Expressions and Finite Automata -

CHAPTER 2 Estimating Probabilities

INSURANCE REGULATORY AUTHORITY FACTORS AFFECTING INSURANCE UPTAKE BY TEACHERS IN PUBLIC PRIMARY SCHOOLS: CASE STUDY KISII COUNTY

Chapter 4 & 5 practice set. The actual exam is not multiple choice nor does it contain like questions.

4. How many integers between 2004 and 4002 are perfect squares?

You must have: Ruler graduated in centimetres and millimetres, protractor, compasses, pen, HB pencil, eraser, calculator. Tracing paper may be used.

AP Statistics 7!3! 6!

Discrete Mathematics and Probability Theory Fall 2009 Satish Rao, David Tse Note 10

If, under a given assumption, the of a particular observed is extremely. , we conclude that the is probably not

Probability. Sample space: all the possible outcomes of a probability experiment, i.e., the population of outcomes

Equations, Inequalities & Partial Fractions

MATRIX ALGEBRA AND SYSTEMS OF EQUATIONS

If A is divided by B the result is 2/3. If B is divided by C the result is 4/7. What is the result if A is divided by C?


MASSACHUSETTS INSTITUTE OF TECHNOLOGY 6.436J/15.085J Fall 2008 Lecture 5 9/17/2008 RANDOM VARIABLES

1 Calculus of Several Variables

Solutions to Homework 6 Mathematics 503 Foundations of Mathematics Spring 2014

STA 256: Statistics and Probability I

Name: Date: Use the following to answer questions 2-4:

STATISTICS 8: CHAPTERS 7 TO 10, SAMPLE MULTIPLE CHOICE QUESTIONS

Using Proportions to Solve Percent Problems I

The normal approximation to the binomial

2Probability CHAPTER OUTLINE LEARNING OBJECTIVES

Math Compute C(1000,2) (a) (b) (c) 2. (d) (e) None of the above.

Transcription:

Total Probability and Bayes Theorem 35.4 Introduction When the ideas of probability are applied to engineering (and many other areas) there are occasions when we need to calculate conditional probabilities other than those already known. For example, if production runs of ball bearings involve say, four machines, we might well know the probability that any given machine produces faulty ball bearings. If we are inspecting the total output prior to distribution to users, we might need to know the probability that a faulty ball bearing came from a particular machine. Even though we do not address the area of statistics known as Bayesian Statistics here, it is worth noting that Bayes Theorem is the basis of this branch of the subject. Prerequisites Before starting this Section you should... Learning Outcomes After completing this Section you should be able to... 1 understand the ideas of sets and subsets. (Section 35.1) 2 understand the concepts of probability and events. (Section 35.2) 3 understand the addition and multiplication laws and the concept of conditional probability. (Section 35.3) understand the term partition of a sample space understand the special case of Bayes Theorem arising when a sample space is partitioned by a set and its complement be able to apply Bayes Theorem to solve basic engineering related problems

The Theorem of Total Probability To establish this result we start with the definition of a partition of a sample space. APartition of a Sample Space The collection of events A 1,A 2,...A n is said to partition a sample space S if (a) A 1 A 2 A n = S (b) A i A j = for all i, j (c) A i for all i In essence, a partition is a collection of non-empty, non-overlapping subsets of a sample space whose union is the sample space itself. The definition is illustrated by the diagram below. A 1 A 4 A 3 S A 5 A 2 A 6 If B is any event within S then we can express B as the union of subsets: B =(B A 1 ) (B A 2 ) (B A n ) The definition is illustrated in the diagram below in which an event B in S is represented by the shaded region. S A 1 A 4 A 3 B A 5 A 2 A 6 The bracketed events (B A 1 ), (B A 2 )...(B A n ) are mutually exclusive (if one occurs then none of the others can occur) and so, using the addition law of probability for mutually exclusive sets: P (B) =P (B A 1 )+P (B A 2 )+ + P (B A n ) Each of the probabilities on the right hand side may be expressed in terms of conditional probabilities: P (B A i )=P (B A i )P (A i ) for all i Using these in the expression for P (B), above, gives: P (B) = P (B A 1 )P (A 1 )+P(B A 2 )P (A 2 )+ + P (B A n )P (A n ) n = P (B A i )P (A i ) i=1 This is the Theorem of Total Probability. A related theorem with many applications in statistics can be deduced from this, known as Bayes Theorem. HELM (VERSION 1: March 18, 2004): Workbook Level 1 2

Bayes Theorem We again consider the conditional probability statement: P (A B) = P (A B) P (B) = P (A B) P (B A 1 )P (A 1 )+P (B A 2 )P (A 2 )+ + P (B A n )P (A n ) in which we have used the Theorem of Total Probability to replace P (B). Now P (A B) =P (B A) =P (B A) P (A) Substituting this in the expression for P (A B) we immediately obtain the result P (B A) P (A) P (A B) = P (B A 1 )P (A 1 )+P(B A 2 )P (A 2 )+ + P (B A n )P (A n ) This is true for any event A and so, replacing A by A i gives the result, known as Bayes Theorem as P (A i B) = P (B A i ) P (A i ) P (B A 1 )P (A 1 )+P (B A 2 )P (A 2 )+ + P (B A n )P (A n ) Special Cases In the case where we consider A to be an event in a sample space S (the sample space is partitioned by A and A )wecan state simplified versions of the Theorem of Total Probability and Bayes Theorem as shown below. The Theorem of Total Probability: Special Case This special case enables us to find the probability that an event B occurs taking into account the fact that another event A may or may not have occurred. The theorem becomes P (B) =P (B A) P (A)+P (B A ) P (A ) The result is easily seen by considering the general result already derived or it may be derived directly as follows. Consider the following diagram. A B A B A B B A S It is easy to see that the event B consists of the union of the (disjoint) events A B and B A so that we may write B as the union of these disjoint events. We have B =(A B) (B A ) Since the events A B and B A are disjoint, they must be independent and so P (B) =P (A B)+P (B A ) 3 HELM (VERSION 1: March 18, 2004): Workbook Level 1

Using the conditional probability results we already have we may write P (B) = P (A B)+P (B A ) = P (B A)+P (B A ) = P (B A) P (A)+P(B A ) P (A ) The result we have derived is P (B) =P (B A) P (A)+P(B A ) P (A ) Bayes Theorem: Special Case This result is obtained by supposing that the sample space S is partitioned by event A and its complement A to give: P (A B) = P (B A) P (A) P (B A) P (A)+P (B A ) P (A ) Example At a certain university, 4% of men are over 6 feet tall and 1% of women are over 6 feet tall. The total student population is divided in the ratio 3:2 in favour of women. If a student is selected at random from among all those over six feet tall, what is the probability that the student is a woman? Solution Let M={Student is Male}, F ={Student is Female}, (note that M and F partition the sample space of students), T ={Student is over 6 feet tall}. Weknow that P (M) =2/5, P (F )=3/5, P (T M) =4/100 and P (T F )=1/100. We require P (F T ). Using Bayes Theorem we have: P (F T ) = = P (T F )P (F ) P (T F )P (F )+P(T M)P (M) 1 100 3 5 1 3 + 4 2 100 5 100 5 = 3 11 Example A factory production line is manufacturing bolts using three machines, A, B and C. Ofthe total output, machine A is responsible for 25%, machine B for 35% and machine C for the rest. It is known from previous experience with the machines that 5% of the output from machine A is defective, 4% from machine B and 2% from machine C. Abolt is chosen at random from the production line and found to be defective. What is the probability that it came from (a) machine A (b) machine B (c) machine C? HELM (VERSION 1: March 18, 2004): Workbook Level 1 4

Solution Let D={bolt is defective}, A={bolt is from machine A}, B={bolt is from machine B}, C={bolt is from machine C}. We know that P (A) = 0.25, P (B) = 0.35 and P (C) = 0.4. Also P (D A) = 0.05,P(D B) = 0.04,P(D C) = 0.02. A statement of Bayes Theorem for three events A, B and C is Similarly P (A D) = P (D A)P (A) P (D A)P (A)+P(D B)P(B)+P(D C)P(C) = 0.05 0.25 0.05 0.25 + 0.04 0.35 + 0.02 0.4 = 0.362 P (B D) = 0.04 0.35 0.05 0.25+0.04 0.35+0.02 0.4 = 0.406 P (C D) = 0.02 0.4 0.05 0.25 + 0.04 0.35 + 0.02 0.4 = 0.232 An engineering company advertises a job in three papers, A, B and C. It is known that these papers attract undergraduate engineering readerships in the proportions 2:3:1. The probabilities that an engineering undergraduate sees and replies to the job advertisement in these papers are 0.002, 0.001 and 0.005 respectively. Assume that the undergraduate sees only one job advertisement. (a) If the engineering company receives only one reply to it advertisements, calculate the probability that the applicant has seen the job advertised in place A. i. in A ii. in B iii. in C (b) If the company receives two replies, what is the probability that both applicants saw the job advertised in paper A? 5 HELM (VERSION 1: March 18, 2004): Workbook Level 1

Your solution Let A = {Person is a reader of paper A}, B = {Person is a reader of paper B}, C = {Person is a reader of paper C} and let R = {Reader applies for the job}. Wehave the probabilities (a) P (A) =1/3 P (R A) =0.002 P (B) =1/2 P (R B) =0.001 P (C) =1/6 P (R C) =0.005 P (A R) = P (R A)P (A) P (R A)P (A)+P(R B)P(B)+P(R C)P(C) Similarly = 1 3 P (B R) = 1 and P (C R) = 5 4 12 (b) Now, assuming that the replies and readerships are independent P(Both applicants read papera) = P (A R) P (A R) = 1 3 1 3 = 1 9 HELM (VERSION 1: March 18, 2004): Workbook Level 1 6

Exercises 1. Obtain the sample space of an experiment that consists of a fair coin being tossed four times. Consider the following events: A is the event all four results are the same. B is the event exactly one Head occurs. C is the event at least two Heads occur. Show that P (A)+P(B)+P(C) = 17 and explain why P (A)+P(B)+P(C) > 1. 16 2. The table below, show the number of complete years a group of people have been working in their current employment. Years of Employment Number of People 0or1year 15 2or3years 12 4or5years 9 6or8years 6 8to11years 6 12 years and over 2 What is the probability that a person from the group, selected at random; (a) falls in the modal group; (b) has been working there for less than 4 years; (c) has been working there for at least 8 years. 3. From a batch of 100 items of which 20 are defective, exactly two items are chosen, one at a time, without replacement. Calculate the probabilities that: (a) the first item chosen is defective; (b) both items chosen are defective; (c) the second item chosen is defective. 4. A garage mechanic keeps a box of good springs to use as replacements on customers cars. The box contains 5 springs. A colleague, thinking that the springs are for scrap, tosses three faulty springs into the box. The mechanic picks two springs out of the box while servicing a car. Find the probability that: (a) the first spring drawn is faulty; (b) the second spring drawn is faulty. 5. It is a fact that if A and B are independent events then it is also true that A and B are independent events. If A and B are independent events such that the probability that they both occur simultaneously is 1 and the probability that neither of them will occur is 8 3, find: 8 (a) the probability that event A will occur; 7 HELM (VERSION 1: March 18, 2004): Workbook Level 1

(b) the probability that event B will occur. 6. Two coins are tossed. Find the conditional probability that two Heads will occur given that at least one occurs. 7. If A and B are two events associated with an experiment and P (A) =0.4, P (A B) =0.7 and P (B) =p, find: (a) the choice of p for which A and B are Mutually Exclusive; (b) the choice of p for which A and B are Independent. 8. The probability that each relay closes in the circuit shown below is p. Assuming that each relay functions independently of the others, find the probability that current can flow from L to R. A B L R C D 9. Machines A and B produce 10% and 90% respectively of the production of a component intended for the motor industry. From experience, it is known that the probability that machine A produces a defective component is 0.01 while the probability that machine B produces a defective component is 0.05. If a component is selected at random from a day s production and is found to be defective, find the probability that it was made by (a) machine A; (b) machine B. 1. P (A) = 2 16,P(B) = 4 16 Answers,P(C) =11, P(A)+P (B)+P(C) =17 16 16 A, B and C are not Mutually Exclusive since events A and C have outcomes in common. This is the reason why P (A)+P(B)+P(C) = 17 ;weare adding the probabilities 16 corresponding to common outcomes more than once. 2. (a) P(person falls in the modal group) = 15 50 (b) P(person has been working for less than 4 years) = 27 50 (c) P(person has been working for more than 8 years) = 8 50 3. Let A={first item chosen is defective}, B ={second item chosen is defective} (a) P (A) = 20 100 = 1 5 (b) P (A B) =P (A B)P (A) = 19 99 20 100 = 19 495 (c) P (B) =P (B A)P (A)+P (B A )P (A )= 19 99 20 100 + 20 99 80 100 = 198 990 = 1 5 HELM (VERSION 1: March 18, 2004): Workbook Level 1 8

4. Let A ={first spring chosen is faulty}, B ={second spring chosen is faulty} (a) P (A) = 3 8 (b) P (B) =P (B A)P (A)+P (B A )P (A )= 2 7 3 8 + 3 7 5 8 = 21 56 = 3 8 5. P (A) P (B) = 1 8 and (1 P (A)) (1 P (B)) = 3 8 Treat these equations as xy = 1 8 and (1 x)(1 y) = 3 8 and solve to get: P (A) = 1 2 (or 1 4 ) and P (B) = 1 4 (or 1 2 ) 6. Let A = {at least one Head occurs}, B = {two Heads occur} P (B) = P (A B) P (A B) = P (A) P (B) = 1 1 2 2 P (A)+P (B) P (A) P (B) 1 = 1 2 + 1 2 1 2 1 3 2 7. (a) P (A B) =P (A)+P(B) so 0.7 =0.4+p implying p =0.3 (b) P (A B) =P (A)+P(B) P(A) P(B) so 0.7 =0.4+p 0.4 p implying p =0.5. 8. P ((A B) (C D)) = P (A B)+P (C D) P (A B C D) = p 2 + p 2 p 4 =2p 2 p 4 9. Let A = {item from machine A}, B = {item from machine B}, D = {item is defective}. We know that: P (A) = 0.1, P(B) = 0.9, P(D A) = 0.01, P(D B) = 0.05. (a) (b) Similarly P (B D) = 0.98 P (A D) = P (D A)P (A) P (D A)P (A)+P(D B)P(B) = 0.01 0.1 0.01 0.1+0.05 0.9 = 0.02 9 HELM (VERSION 1: March 18, 2004): Workbook Level 1