Lecture 3 : Probability II. Jonathan Marchini

Similar documents
Lecture 3: Probability

Math for Liberal Studies

Set Notation and Axioms of Probability NOT NOT X = X = X'' = X

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

Chapter 1 Problem Solving: Strategies and Principles

Do in calculator, too.

10.1. Randomness and Probability. Investigation: Flip a Coin EXAMPLE A CONDENSED LESSON

Discrete Probability Distributions

12.1. Randomness and Probability

Lecture 4: DNA Restriction Mapping

9/2/2009 Comp /Comp Fall

8/29/13 Comp 555 Fall

Lecture 4: DNA Restriction Mapping

Finding extremal voting games via integer linear programming

Discrete Probability Distributions

arxiv: v1 [math.ra] 11 Aug 2010

discrete probability distributions

Stat 198 for 134 Instructor: Mike Leong

secretsaremadetobefoundoutwithtime UGETGVUCTGOCFGVQDGHQWPFQWVYKVJVKOG Breaking the Code

Mathematics for large scale tensor computations

CS 484 Data Mining. Association Rule Mining 2

MATH 1823 Honors Calculus I Permutations, Selections, the Binomial Theorem

4/17/2012. NE ( ) # of ways an event can happen NS ( ) # of events in the sample space

A Event has occurred

MAT2377. Ali Karimnezhad. Version September 9, Ali Karimnezhad

Discrete Probability. Chemistry & Physics. Medicine

Lecture 2. Conditional Probability

STA Module 4 Probability Concepts. Rev.F08 1

University of Technology, Building and Construction Engineering Department (Undergraduate study) PROBABILITY THEORY

Self Organization and Coordination

Lecture 2: Probability, conditional probability, and independence

CMPSCI 240: Reasoning about Uncertainty

ALGEBRAS, DIALGEBRAS, AND POLYNOMIAL IDENTITIES. Murray R. Bremner

Locally Connected Recurrent Networks. Lai-Wan CHAN and Evan Fung-Yu YOUNG. Computer Science Department, The Chinese University of Hong Kong

Chapter 15. Probability Rules! Copyright 2012, 2008, 2005 Pearson Education, Inc.

Some Structural Properties of AG-Groups

UNIT Explain about the partition of a sampling space theorem?

Probability Calculus

Slide 1 Math 1520, Lecture 21

Lecture Notes for Chapter 6. Introduction to Data Mining

Combinatorial Analysis

Prof. Thistleton MAT 505 Introduction to Probability Lecture 5

Planck blackbody function

DATA MINING - 1DL360

BHP BILLITON UNIVERSITY OF MELBOURNE SCHOOL MATHEMATICS COMPETITION, 2003: INTERMEDIATE DIVISION

Data Mining Concepts & Techniques

Conditional Probability. CS231 Dianna Xu

Combinatorics and probability

Fractional designs and blocking.

COMP 5331: Knowledge Discovery and Data Mining

ST3232: Design and Analysis of Experiments

DATA MINING - 1DL360

Dragan Mašulović. The Discrete Charm of Discrete Mathematics

Lecture 3. Probability and elements of combinatorics

STAT 201 Chapter 5. Probability

Review Counting Principles Theorems Examples. John Venn. Arthur Berg Counting Rules 2/ 21

STAT509: Probability

Identities relating the Jordan product and the associator in the free nonassociative algebra

arxiv: v1 [physics.chem-ph] 1 May 2018

CMPSCI 240: Reasoning about Uncertainty

Playing with Numbers. introduction. numbers in general FOrM. remarks (i) The number ab does not mean a b. (ii) The number abc does not mean a b c.

Permutation. Permutation. Permutation. Permutation. Permutation

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

Combinatorics. But there are some standard techniques. That s what we ll be studying.

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 ).

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

DATA MINING LECTURE 3. Frequent Itemsets Association Rules

Statistics for Engineers Lecture 2

Topic 3: Introduction to Probability

Lecture 4. Selected material from: Ch. 6 Probability

Dragan Mašulović. Introduction to Discrete Mathematics

Bargaining, Coalitions and Externalities: A Comment on Maskin

More on conditioning and Mr. Bayes

arxiv: v1 [q-bio.pe] 27 Oct 2011

ORF 245 Fundamentals of Engineering Statistics. Midterm Exam 1

2. Counting and Probability

With Question/Answer Animations. Chapter 7

Lecture 4 Bayes Theorem

Lecture 4 Bayes Theorem

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

Lecture 4: Probability and Discrete Random Variables

Computational Statistics and Data Analysis. Mixtures of weighted distance-based models for ranking data with applications in political studies

STAT 509: Statistics for Engineers Dr. Dewei Wang. Copyright 2014 John Wiley & Sons, Inc. All rights reserved.

Chapter. Probability

Probability Notes (A) , Fall 2010

If the objects are replaced there are n choices each time yielding n r ways. n C r and in the textbook by g(n, r).

Statistics for Business and Economics

Sixth Edition. Chapter 2 Probability. Copyright 2014 John Wiley & Sons, Inc. All rights reserved. Probability

MATH 118 FINAL EXAM STUDY GUIDE

Math 140 Introductory Statistics

2.4 Conditional Probability

Lecture 3 Probability Basics

Probability Year 9. Terminology

Announcements. Topics: To Do:

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

Geometry AIR Test. Mar 14-3:07 PM. coordinate/algebraic proofs, parallel and perpendicular lines, distance formula, midpoint formula.

Overview. More counting Permutations Permutations of repeated distinct objects Combinations

Chapter 1. Probability

MATH 556: PROBABILITY PRIMER

Chapter 1 Principles of Probability

Transcription:

Lecture 3 : Probability II Jonathan Marchini

Puzzle 1 Pick any two types of card that can occur in a normal pack of shuffled playing cards e.g. Queen and 6. What do you think is the probability that somewhere in the pack a Queen is next to a 6? Write down what you think the probability is. We ll conduct an experiment in lecture to collect data and in future lectures test to see if the data is consistent with your hypothesis.

The Partition Rule If P(A B) = 0.52 and P(A B c ) = 0.14 what is p(a)? P(A) is made up of two parts (i) the part of A contained in B (ii) the part of A contained in B c. A B A B c A B

So we have the rule P(A) = P(A B) + P(A B c ) and P(A) = P(A B) + P(A B c ) = 0.52 + 0.14 = 0.66 More generally, if E 1,..., E n are a set of mutually exclusive events then P(A) = n i=1 P(A E i ) = n i=1 P(A E i )P(E i ) A set of events are mutually exclusive if at most one of the events can occur in a given experiment.

Example 6 : Disease genes A gene has two possible types A 1 and A 2. 75% of the population have A 1. B is a disease that has 3 forms B 1 (mild), B 2 (severe) and B 3 (lethal). A 1 is a protective gene, with the probabilities of having the three forms given A 1 as 0.9, 0.1 and 0 respectively. People with A 2 are unprotected and have the three forms with probabilities 0, 0.5 and 0.5 respectively. What is the probability that a person has the severe disease B 2?

The first thing to do with such a question is decode the information, i.e. write it down in a compact form we can work with. P(A 1 ) = 0.75 P(A 2 ) = 0.25 P(B 1 A 1 ) = 0.9 P(B 2 A 1 ) = 0.1 P(B 3 A 1 ) = 0 P(B 1 A 2 ) = 0 P(B 2 A 2 ) = 0.5 P(B 3 A 2 ) = 0.5 What is P(B 2 )?

Since A 1 and A 2 are mutually exclusive events we can use the Partition Rule P(B 2 ) = P(B 2 A 1 ) + P(B 2 A 2 ) = P(B 2 A 1 )P(A 1 ) + P(B 2 A 2 )P(A 2 ) = 0.1 0.75 + 0.5 0.25 = 0.2

Bayes Rule Bayes Rule is a very powerful probability law. An example from medicine Let D be a disease and S a symptom. A doctor may be interested in P(D S). This is a hard probability to assign. A probability that is much easier to calculate is P(S D), i.e. from patient records.. The power of Bayes Rule is its ability to take P(S D) and calculate P(D S).

We have actually already seen a version of Bayes Rule before P(B A) = P(A B) P(A) Using the Multiplication Law we can re-write this as P(B A) = P(A B)P(B) P(A) (Bayes Rule)

What is the probability that a person has gene A 1 given they have the severe disease? P(A 1 ) = 0.75 P(A 2 ) = 0.25 P(B 1 A 1 ) = 0.9 P(B 2 A 1 ) = 0.1 P(B 3 A 1 ) = 0 P(B 1 A 2 ) = 0 P(B 2 A 2 ) = 0.5 P(B 3 A 2 ) = 0.5 We want P(A 1 B 2 )?

From Bayes Rule we know that P(A 1 B 2 ) = P(B 2 A 1 )P(A 1 ) P(B 2 ) We know P(B 2 A 1 ) and P(A 1 ) but what is P(B 2 )? We have already calculated it using the Partition Rule P(B 2 ) = 0.2! Thus P(A 1 B 2 ) = 0.1 0.75 0.2 = 0.375

Probability Trees A useful way of tackling many probability problems is to draw a probability tree. The branches of the tree represent different possible events. Each branch is labelled with the probability of choosing it given what has occurred before. The probability of a given route through the tree can then be calculated by multiplying all the probabilities along that route (using the Multiplication Rule)

0.9 B 1 P (A 1 B 1 ) = 0.75 0.9 = 0.675 A 1 0.1 B 2 P (A 1 B 2 ) = 0.75 0.1 = 0.075 0.75 0.0 B 3 P (A 1 B 3 ) = 0.75 0.0 = 0.0 0.0 B 1 P (A 2 B 1 ) = 0.25 0.0 = 0.0 0.25 A 2 0.5 B 2 P (A 2 B 2 ) = 0.25 0.5 = 0.125 0.5 B 3 P (A 2 B 3 ) = 0.25 0.5 = 0.125

We can calculate P(B 2 ) by adding up the probabilities of the paths that involve B 2. Thus, P(B 2 ) = 0.075 + 0.125 = 0.2. Also P(A 1 B 2 ) = P(A 1 B 2 ) P(B 2 ) = 0.075 0.2 = 0.375

Puzzle 2 You have reached the final of a game show. The host shows you 3 doors and tells you that there is a prize behind one of the doors. You pick a door. The host then opens one of the doors you didn t pick that contains no prize and asks you if you want to change from the door you chose to the other remaining door. Should you change? 1 2 3

Permutations and Combinations (Probabilities of patterns) In some situtaions we observe a specific pattern from a large number of possible patterns. To calculate the probability of the pattern we need to count the number of ways our pattern could have arisen. This is why we need to learn about permutations and combinations.

Permutations of n objects Consider 2 objects A B Q. How many ways can they be arranged? i.e. how many permutations are there? A. 2 ways AB BA

Consider 3 objects A B C Q. How many ways can they be arranged (permuted)? A. 6 ways ABC ACB BCA BAC CAB CBA Consider 4 objects A B C D Q. How many ways can they be arranged (permuted)? A. 24 ways ABCD ABDC ACBD ACDB ADBC ADCB BACD BADC BCAD BCDA BDAC BDCA CBAD CBDA CABD CADB CDBA CDAB DBCA DBAC DCBA DCAB DABC DACB

There is a pattern emerging here. No. of objects 2 3 4 5 6... No. of permutations 2 6 24 120 720... Can we find a formula for the number of permutations of n objects?

A good way to think about permutations is to think of putting objects into boxes. Suppose we have 5 objects. How many different ways can we place them into 5 boxes? There are 5 choices of object for the first box. 5

There are now only 4 objects to choose from for the second box. 5 4 There are 3 choices for the 3rd box, 2 for the 4th and 1 for the 5th box. 5 4 3 2 1 Thus, the number of permutations of 5 objects is 5 4 3 2 1

In general, the number of permutations of n objects is n(n 1)(n 2)... (3)(2)(1) We write this as n! (pronounced n factorial ). There should be a button on your calculator that calculates factorials.

Permutations of r objects from n Now suppose we have 4 objects and only 2 boxes. How many permutations of 2 objects are there when we have 4 to choose from? There are 4 choices for the first box and 3 choices for the second box 4 3 So there are 12 permutations of 2 objects from 4. We write this as 4 P 2 = 12

We say there are n P r permutations of r objects chosen from n. The formula for n P r is given by n P r = n! (n r)! To see why this works consider the example above 4 P 2. Using the formula we get 4 P 2 = 4! 2! = 4 3 2 1 2 1 = 4 3

Combinations of r objects from n Now consider the number of ways of choosing 2 objects from 4 when the order doesn t matter. We just want to count the number of possible combinations. We know that there are 12 permutations when choosing 2 objects from 4. These are AB AC AD BC BD CD BA CA DA CB DB DC Notice how the permutations are grouped in 2 s which are the same combination of letters.

Thus there are 12/2 = 6 possible combinations. AB AC AD BC BD CD We write this as 4 C 2 = 6 We say there are n C r combinations of r objects chosen from n. The formula for n C r is given by n C r = n! (n r)!r!

Another way of writing this formula that makes it clearer is n C r = n P r r! Effectively this says we count the number of permutions of r objects from n and then divide by r! because the n P r permutations will occur in groups of r! that are the same combination.