1 Bayes’ Theorem. 2 Let’s consider an example. Say you have 31 people who play golf. One way to divide up the people is to put them in groups based on.

Slides:



Advertisements
Similar presentations
Data Analysis for Two-Way Tables
Advertisements

1 Conditional Probability. 2 As we have seen, P(A) refers to the probability that event A will occur. P(A|B) refers to the probability that A will occur.
Probability.
1 One Tailed Tests Here we study the hypothesis test for the mean of a population when the alternative hypothesis is an inequality.
QUICK MATH REVIEW & TIPS 2
1 Conditional Probability When do you think the probability of snow is higher, in September or February? February, at least in Nebraska, right?
1 Price elasticity of demand and revenue implications Often in economics we look at how the value of one variable changes when another variable changes.
BCOR 1020 Business Statistics Lecture 8 – February 12, 2007.
The Normal Distribution
Whole Number Bingo. What is a whole number? A whole number is a number that does not contain fractions. A whole number is a number that does not contain.
1 Linear Programming Using the software that comes with the book.
1 The Sample Mean rule Recall we learned a variable could have a normal distribution? This was useful because then we could say approximately.
Class notes for ISE 201 San Jose State University
Multiplication and division: mental methods.
Systems of Linear Equations
Econ 140 Lecture 51 Bivariate Populations Lecture 5.
Solving Algebraic Equations
Positive & Negative Numbers. Adding and Subtracting.
Table of Contents Solving Linear Systems - Elementary Row Operations A linear system of equations can be solved in a new way by using an augmented matrix.
Dividing Polynomials.
Copyright © Cengage Learning. All rights reserved. Real Numbers and Their Basic Properties 1.
Unit 4: Mathematics Introduce the laws of Logarithms. Aims Objectives
Arithmetic of Positive Integer Exponents © Math As A Second Language All Rights Reserved next #10 Taking the Fear out of Math 2 8 × 2 4.
PBG 650 Advanced Plant Breeding
Written Calculation Methods for KS2
Extending the Definition of Exponents © Math As A Second Language All Rights Reserved next #10 Taking the Fear out of Math 2 -8.
Test 2 Review The test will consist of 3 sections. Section 1 is vocabulary matching. Section 2 is a Rate Per 100 problem. Section 3 is a Unit Rate Problem.
Click mouse. EQUATIONS The important thing to remember about equations is that both sides must balance (both sides must equal each other). This means.
Lesson #8.6: Geometric Sequence Objective: SWBAT form geometric sequences and use formulas when describing sequences.
11.5 Graphs of Equations 11.6 Introduction to Functions 11.7 Function Notation.
Mathematics By: Jordan Craver.
Topic 2: Intro to probability CEE 11 Spring 2002 Dr. Amelia Regan These notes draw liberally from the class text, Probability and Statistics for Engineering.
Analysis of two-way tables - Data analysis for two-way tables IPS chapter 2.6 © 2006 W.H. Freeman and Company.
Conceptual Mathematics How does it all work together? Lincoln County Schools Alycen Wilson Math Lead Teacher K-8.
Dividing Decimals # ÷ 3.5 next Taking the Fear out of Math
Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics Statistics & Econometrics.
1.6 Solving Compound and Absolute Value Inequalities.
1 1 Slide © 2004 Thomson/South-Western Assigning Probabilities Classical Method Relative Frequency Method Subjective Method Assigning probabilities based.
Copyright © 2014 by McGraw-Hill Higher Education. All rights reserved. Essentials of Business Statistics: Communicating with Numbers By Sanjiv Jaggia and.
Chapter 8: Introduction to Probability. Probability measures the likelihood, or the chance, or the degree of certainty that some event will happen. The.
Definition Section 4.1: Indefinite Integrals. The process of finding the indefinite integral of f(x) is called integration of f(x) or integrating f(x).
BASIC OPERATIONS The four basic mathematical operations are: + Addition - - Subtraction × Multiplication ÷ Division.
Addition & Subtraction of Decimals. Add and Subtract like Columns = _______ tens ones RULE: Only add and subtract LIKE.
Number Systems Natural Numbers. Where Our Numbers Came From The earliest known evidence for writing or counting are scratch marks on a bone from 150,000.
Long Multiplication ÷ ÷ + ÷ ÷ + Using the ‘Grid Method’
Fractions to Decimals. Notice that the denominator 4 can be written as 2 2, and the decimal representation has two decimal places; 8 can be written as.
Pre-Algebra Tutorial. Pre-Algebra Equations x + 3 = 5 What is the value of x? At first glance this may look easy since all you have to ask yourself is.
Welcome to Math 6 Our subject for today is… Divisibility.
If A and B are both m × n matrices then the sum of A and B, denoted A + B, is a matrix obtained by adding corresponding elements of A and B. add these.
Math 8 Unit 2: Integers. What you’ll learn: Multiply and divide integers Use the order of operations with integers Solve problems involving integers.
Second factor: education
Bivariate Data – Contingency Tables
A1 Algebraic manipulation
WARM-UP Write in Scientific Form Write in Standard Form
Dividing Polynomials.
Arithmetic operations & assignment statement
Factoring x2 + bx + c ax2 + bx + c when a=1
Multiplying by powers of 10 Decimals
a*(variable)2 + b*(variable) + c
Second factor: education
Representing Quantitative Data
a*(variable)2 + b*(variable) + c
Second factor: education
23 ×
a*(variable)2 + b*(variable) + c
What is an equation? An equation says that two things are equal. It will have an equals sign "=" like this: x + 2 = 6 This equation says: what is on the.
Multiply and divide Expressions
Starter.
Presentation transcript:

1 Bayes’ Theorem

2 Let’s consider an example. Say you have 31 people who play golf. One way to divide up the people is to put them in groups based on whether they hit a golf ball from the “right handed” side or the “left handed” side. Say X1 is group label for the right handed and X2 is for left handed duffers. Another way to divide them up is if they wear a golf glove or not. Say Y1 is for those that wear and Y2 is for those that do not wear a golf glove when they play. Say the following crosstabulation or contingency table results for the 31 people.Y1Y2Total X X Total From this table we can say something about a variety of probabilities – 20, in fact.

3 Now, from this table you could very naturally consider the following: 1) Marginal probabilities (using the relative frequency approach to probability – like the prob of X1.) P(X1) = 17/31, P(X2) = 14/17, P(Y1) = 15/31, P(Y2) = 16/31, 2) Conditional probabilities (like probability of X1 given that Y1 has occurred). In columns (like what is prob of being X1 given you have a Y1?) P(X1|Y1) = 5/15P(X1|Y2) = 12/16 P(X2|Y1) = 10/15P(X2|Y2) = 4/16 In rows P(Y1|X1) = 5/17P(Y2|X1) = 12/17 P(Y1|X2) = 10/14P(Y2|X2) = 4/14

4 3) Intersections (like what is prob of X1 and Y1) P(X1 ⋂ Y1) = 5/31 (which could have been written P(Y1 X1) P(X2 ⋂ Y1) = 10/31 P(X1 ⋂ Y2) = 12/31 P(X2 ⋂ Y2) = 4/31 4) Unions (like what is prob of X1 or Y1) P(X1 ⋃ Y1) = ( )/31 = ( – 5)/31 = 27/31 P(X2 ⋃ Y1) = ( )/31 = ( – 10)/31 = 19/31 P(X1 ⋃ Y2) = ( )/31 = ( – 12)/31 = 21/31 P(X2 ⋃ Y2) = ( )/31 = ( – 4)/31 = 26/31 This way seems more natural – just add the relevant boxes and divide by the grand total This way says add the totals and subtract the intersection so you only add the overlap once.

5 Now, let’s take the crosstabulation and construct the joint probability table by dividing by the grand total of 31. Y1Y2Total X15/3112/3117/31 X210/314/3114/31 Total15/3116/3131/31 On the next slide I show what this would be like in general terms. You will note in the joint probability table we have marginal probabilities and intersections.

6 Y1Y2Totals X1 P(X1 ⋂ Y1) P(X1 ⋂ Y2)P(X1) X2 P(X2 ⋂ Y1) P(X2 ⋂ Y2) P(X2) TotalsP(Y1) P(Y2)1.00 Again, from the table we have intersections and marginal probabilities already calculated. To get conditional probabilities and unions from this table we just follow the rules. For conditional probabilities, like prob of X1 given Y1 we have P(X1|Y1) = P(X1 ⋂ Y1)/P(Y1) = (5/31)/(15/31) = 5/15. For unions, like prob of X1 or Y1 we have P(X1 ⋃ Y1) = P(X1) + P(Y1) – P(X1 ⋂ Y1) = 17/ /31 – 5/31 = 27/31

7 Notice on slide 5 that, for example, in the Y2 column 12/31 + 4/31 = 16/31. On slide 6 this would be seen as P(X1 ⋂ Y2) + P(X2 ⋂ Y2) = P(Y2). In this example we have seen a whole bunch of information. In fact, you know the raw data and you have seen how we calculate many types of probability. Bayes’ Theorem is just a statement that if we know only some information we can still calculate some of the other parts based on what we know. As an example, say we know P(X1) = 17/31, P(X2) = 14/31, P(Y2|X1) = 12/17, and P(Y2|X2) = 4/14. From this we can calculate P(X1 ⋂ Y2), P(X2 ⋂ Y2), P(Y2), P(X1|Y2), P(X2|Y2).

8 Y1Y2Totals X1 P(X1 ⋂ Y1) P(X1 ⋂ Y2)P(X1) X2 P(X2 ⋂ Y1) P(X2 ⋂ Y2) P(X2) TotalsP(Y1) P(Y2)1.00 So, say we know P(X1), P(X2), P(Y2|X1), P(Y2|X2). In this context P(X1) and P(X2) are called prior probabilities. P(Y2|X1) and P(Y2|X2) would be considered additional information that has to be obtained from some source. Note the additional information is about Y2, conditionally. From the definition of conditional probability we can calculate what is under the Y2 column above and then we can calculate the conditional probabilities P(X1|Y2) and P(X2|Y2), here called posterior probabilities. Posterior probabilities are just conditional probabilities, but we do not construct them from raw data because we do not have the raw data. But we have gained enough information to exploit what is known about the relationships that exist in such a table.

9 Let’s think about an example. Say that in a group of golfers 17/31 are right handed and 14/31 are left handed. Also say that of those who are right handed, 12/17 play without a glove, while 4/14 of those who are left handed play without a glove. Of those who play without a glove, what percentage are right handed and what percentage are left handed? So, overall we know P(X1) and P(X2) (the prior probabilities), but we want to know P(X1|Y2) and P(X2|Y2) (the posterior probabilities). Now as an intermediate step we have to find from the previous slide what is under column Y2. To do this remember conditional probability is defined as P(B|A) = P(B ⋂ A)/P(A), so P(A ⋂ B) = P(B|A)P(A)

10 From the example, P(X1) = 17/31, P(X2) = 14/31, P(Y2|X1) = 12/17, and P(Y2|X2) = 4/14. Thus P(X1 ⋂ Y2) = P(Y2|X1)P(X1) = (12/17)(17/31) = 12/31, P(X2 ⋂ Y2) = P(Y2|X2)P(X2) = (4/14)(14/31) = 4/31, P(Y2) = P(X1 ⋂ Y2) + P(X2 ⋂ Y2) = 12/31 + 4/31 = 16/31, Thus, P(X1|Y2) = P(X1 ⋂ Y2)/P(Y2) = (12/31)/(16/31) = 12/16, and P(X2|Y2) = P(X2 ⋂ Y2)P(Y2) = (4/31)/(16/31) = 4/16. WOW, I need to put this away and go get a drink - - of water!

11 How can I summarize what I have done here? Well, 1)I had prior probabilities (marginal probs) 2) Multiplied the priors by known conditionals to get joint probs 3) Added the joint probs to get a marginal prob, 4) Calculated new conditionals by taking the calculated joint probabilities and dividing by the calculated marginal prob. Let’s do another example. Say A1 = parts to a company come from supplier 1, with P(A1) =.65 (65% of parts come from supplier 1), A2 = parts to the company come from supplier 2, with P(A2) =.35 (35% of parts come from supplier 2).

12 Now, say that given the part is from supplier 1 the part is good (G) 98 percent of the time and given that it is from supplier 2 the part is good 95 percent of the time. The joint probabilities are (by multiplication) P(A1 ⋂ G) =.65(.98) and P(A2 ⋂ G) =.35(.95), and And the marginal probability is found by adding these two together. So, P(G) =.65(.98) +.35(.95) = = Then get the new conditional probabilities by division P(A1|G) =.65(.98)/[(.65(.98)) + (.35(.95))] =.637/.9695 =.657, and P(A2|G) =.35(.95)/[(.65(.98)) + (.35(.95))] =.343. So, what does this all mean? We started out knowing that 65% of parts come from supplier 1. We find that 96.95% of the parts that are received are good. Of those that are good, 65.7% are from supplier 1 and 34.3% are from supplier 2.