Probability. Patrick Breheny. September 1. Events and probability Working with probabilities Additional theorems/rules Summary

Similar documents
Probability II. Patrick Breheny. February 16. Basic rules (cont d) Advanced rules Summary

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

Data Analysis and Statistical Methods Statistics 651

Lecture Stat 302 Introduction to Probability - Slides 5

Chapter 2 Class Notes

1 The Basic Counting Principles

3.2 Probability Rules

Probability and the Second Law of Thermodynamics

2.6 Tools for Counting sample points

Statistics 1L03 - Midterm #2 Review

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

Probability and Probability Distributions. Dr. Mohammed Alahmed

What is the probability of getting a heads when flipping a coin

4. Conditional Probability

ELEG 3143 Probability & Stochastic Process Ch. 1 Probability

Two-sample Categorical data: Testing

Chapter 14. From Randomness to Probability. Copyright 2012, 2008, 2005 Pearson Education, Inc.

It applies to discrete and continuous random variables, and a mix of the two.

Formalizing Probability. Choosing the Sample Space. Probability Measures

Discrete Mathematics and Probability Theory Spring 2014 Anant Sahai Note 10

2) There should be uncertainty as to which outcome will occur before the procedure takes place.

Lectures Conditional Probability and Independence

STA Module 4 Probability Concepts. Rev.F08 1

Basic Concepts of Probability

Math 140 Introductory Statistics

Math 140 Introductory Statistics

Probability. Chapter 1 Probability. A Simple Example. Sample Space and Probability. Sample Space and Event. Sample Space (Two Dice) Probability

Lecture 1: Probability Fundamentals

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

Week 2: Probability: Counting, Sets, and Bayes

STAT Chapter 3: Probability

Preliminary Statistics Lecture 2: Probability Theory (Outline) prelimsoas.webs.com

Probability & Random Variables

If S = {O 1, O 2,, O n }, where O i is the i th elementary outcome, and p i is the probability of the i th elementary outcome, then

Grades 7 & 8, Math Circles 24/25/26 October, Probability

Probability Year 10. Terminology

Properties of Probability

Probability Year 9. Terminology

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

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

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

1 Probability Theory. 1.1 Introduction

Probability (special topic)

Probability (Devore Chapter Two)

MATH MW Elementary Probability Course Notes Part I: Models and Counting

7.1 What is it and why should we care?

tossing a coin selecting a card from a deck measuring the commuting time on a particular morning

V. Probability. by David M. Lane and Dan Osherson

Discrete Probability

ORF 245 Fundamentals of Statistics Chapter 5 Probability

2 Chapter 2: Conditional Probability

STOR Lecture 6. Conditional Probability and Independence - II

Probability, Statistics, and Bayes Theorem Session 3

Independence 1 2 P(H) = 1 4. On the other hand = P(F ) =

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

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

Single Maths B: Introduction to Probability

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

Statistics Primer. A Brief Overview of Basic Statistical and Probability Principles. Essential Statistics for Data Analysts Using Excel

Probabilistic models

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

STAT 201 Chapter 5. Probability

Probability Problems for Group 3(Due by EOC Mar. 6)

Intermediate Math Circles November 8, 2017 Probability II

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

Stat 225 Week 2, 8/27/12-8/31/12, Notes: Independence and Bayes Rule

Refresher on Discrete Probability

Announcements. Topics: To Do:

MATH2206 Prob Stat/20.Jan Weekly Review 1-2

18.05 Problem Set 5, Spring 2014 Solutions

A Event has occurred

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

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

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

MATH 10 INTRODUCTORY STATISTICS

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

STAT 430/510 Probability

Lecture 3: Probability

Chapter 6: Probability The Study of Randomness

Econ 325: Introduction to Empirical Economics

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

Intermediate Math Circles November 15, 2017 Probability III

Module 1. Probability

UNIT 5 ~ Probability: What Are the Chances? 1

With Question/Answer Animations. Chapter 7

Statistics 100 Exam 2 March 8, 2017

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 8: An Introduction to Probability and Statistics

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

where Female = 0 for males, = 1 for females Age is measured in years (22, 23, ) GPA is measured in units on a four-point scale (0, 1.22, 3.45, etc.

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

Problems from Probability and Statistical Inference (9th ed.) by Hogg, Tanis and Zimmerman.

Chance, too, which seems to rush along with slack reins, is bridled and governed by law (Boethius, ).

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

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

The Central Limit Theorem

Class 26: review for final exam 18.05, Spring 2014

ORF 245 Fundamentals of Statistics Chapter 1 Probability

Chapter 4: An Introduction to Probability and Statistics

Introducing Proof 1. hsn.uk.net. Contents

Transcription:

Probability Patrick Breheny September 1 Patrick Breheny University of Iowa Biostatistical Methods I (BIOS 5710) 1 / 52

Probability Events and probability Mathematical definitions Meaning and interpretation Statistical inference the idea of generalizing about a population from a sample inherently involves some degree of uncertainty, and the language of uncertainty is probability (James Berger) People talk loosely about probability all the time, but for scientific purposes, we need to be more specific in terms of defining and using probabilities Patrick Breheny University of Iowa Biostatistical Methods I (BIOS 5710) 2 / 52

Events Events and probability Mathematical definitions Meaning and interpretation A random process is a phenomenon whose outcome cannot be predicted with certainty The sample space is the collection of all possible outcomes of a random process An event is an outcome (or collection of outcomes) of a random process: Examples: Random process Flipping a coin Rolling a die Child receives a vaccine Patient takes Clofibrate Event Obtaining heads Obtaining an odd number Child contracts polio Patient survives Patrick Breheny University of Iowa Biostatistical Methods I (BIOS 5710) 3 / 52

Probability: Mathematical definition Mathematical definitions Meaning and interpretation Definition: Given a sample space S and collection of events F, a probability function is a function P with domain F that satisfies 1: P (A) 0 for all A F 2: P (S) = 1 3: If A, B F satisfy A B =, then P (A B) = P (A) + P (B) (Note that F has to satisfy certain properties for this definition to work e.g., if A and B are in F, then A B must be in F and that this can get tricky if F is an infinite collection; mathematical statistics courses such as STAT 4100/STAT 5100 discuss these issues in greater detail) Patrick Breheny University of Iowa Biostatistical Methods I (BIOS 5710) 4 / 52

Probability and long-run frequency Mathematical definitions Meaning and interpretation So a probability function takes an event and assigns it a number between 0 and 1; however, the mathematical definition doesn t tell us anything about how to assign probabilities to events Everyone agrees that the probability of rolling a 1 on a fair die is 1/6... but why? In many cases, probability has an uncontroversial interpretation as a long-run frequency: the probability of an event occurring is the fraction of time that it would happen if the random process occurs over and over again under the same conditions Thus, the probability of rolling a 1 is 1/6 because it happens 1/6 of the time when we roll a die Patrick Breheny University of Iowa Biostatistical Methods I (BIOS 5710) 5 / 52

Long-run frequency Events and probability Mathematical definitions Meaning and interpretation Suppose that the probability of developing polio for a child who receives a vaccine is 0.00031 By the long-run frequency interpretation, if we vaccinate 100,000 children, we would expect therefore that 31 of those children will develop polio This works the other way too: in our polio study, 28 per 100,000 children who got the vaccine developed polio Thus, the probability that a child in our sample who got the vaccine developed polio is 28/100,000=.00028 Of course, what we really want to know is the probability of a child in the population developing polio (not the sample) we ll get there Patrick Breheny University of Iowa Biostatistical Methods I (BIOS 5710) 6 / 52

Mathematical definitions Meaning and interpretation Probability for non-repeatable processes Not everyone agrees, however, on what probability means for non-repeatable random processes For example, what is the probability that Donald Trump wins the presidential election in 2016? Some would argue that it is valid to make probability statements about this event as a reflection of one s subjective belief that the event will happen; others would say that probabilities are not meaningful here because they cannot be objectively established We ll return to this point later Patrick Breheny University of Iowa Biostatistical Methods I (BIOS 5710) 7 / 52

The complement rule Events and probability The complement rule The addition rule The multiplication rule We are often interested in events that are derived from other events, such as complements, unions, and intersections of events; we will now cover the basic rules that allow us to calculate such probabilities, starting with complements Theorem (Complement rule): For any event A, P (A C ) = 1 P (A) This simple but useful rule is called the complement rule Example: Suppose the probability of developing polio is 0.0006. What is the probability of not developing polio? Patrick Breheny University of Iowa Biostatistical Methods I (BIOS 5710) 8 / 52

Introduction Events and probability The complement rule The addition rule The multiplication rule Next, we turn our attention to unions From the definition of probability, we can see that for two events satisfying A B =, we have P (A B) = P (A) + P (B) So, at least in some cases, we can find the probability of a union by just adding the probabilities of the two events However, this is not true in general Patrick Breheny University of Iowa Biostatistical Methods I (BIOS 5710) 9 / 52

A counterexample Events and probability The complement rule The addition rule The multiplication rule Let A denote rolling a number 3 or less and B denote rolling an odd number P (A) + P (B) = 0.5 + 0.5 = 1 Clearly, however, we could roll a 4 or a 6, which is neither A nor B Patrick Breheny University of Iowa Biostatistical Methods I (BIOS 5710) 10 / 52

The addition rule Events and probability The complement rule The addition rule The multiplication rule The issue, of course, is that we are double-counting events in A B Simply subtracting P (A B) from our answer corrects this problem Theorem (Addition rule): For any two events A and B, P (A B) = P (A) + P (B) P (A B) Patrick Breheny University of Iowa Biostatistical Methods I (BIOS 5710) 11 / 52

Mutually exclusive events The complement rule The addition rule The multiplication rule Note that P (A B) = P (A) + P (B) P (A B) holds for any two events, while P (A B) = P (A) + P (B) only holds when A B = A special term is given to the situation when A and B cannot both occur at the same time (i.e., when P (A B) = 0): such events are called mutually exclusive Patrick Breheny University of Iowa Biostatistical Methods I (BIOS 5710) 12 / 52

Example Events and probability The complement rule The addition rule The multiplication rule An article in the American Journal of Public Health reported that in a certain population, the probability that a child s gestational age is less than 37 weeks is 0.142 The probability that his or her birth weight is less than 2500 grams is 0.051 The probability of both is 0.031 Exercise: What is the probability that a child will weight less than 2500 grams or be born at less than 37 weeks? Patrick Breheny University of Iowa Biostatistical Methods I (BIOS 5710) 13 / 52

Failing to use the addition rule The complement rule The addition rule The multiplication rule In the 17th century, French gamblers used to bet on the event that in 4 rolls of the die, at least one ace would come up (an ace is rolling a one) In another game, they rolled a pair of dice 24 times and bet on the event that at least one double-ace would turn up The Chevalier de Méré, a French nobleman, thought that the two events were equally likely Patrick Breheny University of Iowa Biostatistical Methods I (BIOS 5710) 14 / 52

The complement rule The addition rule The multiplication rule Failing to use the addition rule (cont d) His reasoning was as follows: letting A i denote the event of rolling an ace on roll i and AA i denote the event of rolling a double-ace on roll i P (A 1 A 2 A 3 A 4 ) = P (A 1 ) + P (A 2 ) + P (A 3 ) + P (A 4 ) = 4 6 = 2 3 P (AA 1 AA 2 ) = P (AA 1 ) + P (AA 2 ) + = 24 36 = 2 3 This reasoning, of course, fails to recognize that A 1, A 2,... are not mutually exclusive Patrick Breheny University of Iowa Biostatistical Methods I (BIOS 5710) 15 / 52

Balls in urns Events and probability The complement rule The addition rule The multiplication rule We now turn our attention to the probabilities of intersections Imagine a random process in which balls are placed into an urn and picked out at random, so that each ball has an equal chance of being drawn For example, imagine an urn that contains 1 red ball and 2 black balls Let R i denote that the i th ball was red Clearly, P (R 1 ) = 1/3, but what about P (R 1 R 2 )? Patrick Breheny University of Iowa Biostatistical Methods I (BIOS 5710) 16 / 52

Sampling with replacement The complement rule The addition rule The multiplication rule First, suppose that after we draw a ball, we put it back in the urn before drawing the next ball (this method of drawing balls from the urn is called sampling with replacement) In this case, P (R 1 R 2 ) = 1 3 ( ) 1 = 1 3 9 On the surface, then, it would seem that P (A B) = P (A) P (B) However, this is not true in general Patrick Breheny University of Iowa Biostatistical Methods I (BIOS 5710) 17 / 52

Sampling without replacement The complement rule The addition rule The multiplication rule Now suppose we don t put the balls back after drawing them (this method of drawing balls from the urn is called sampling without replacement) Now, it is impossible to draw two red balls; instead of 11%, the probability is 0 Here, the outcome of the first event changed the random process; after R 1 occurs, P (R 2 ) is no longer 1/3, but 0 When we draw without replacement, P (R i ) depends on what has happened in the earlier draws Patrick Breheny University of Iowa Biostatistical Methods I (BIOS 5710) 18 / 52

Conditional probability The complement rule The addition rule The multiplication rule The notion that the probability of an event may depend on other events is called conditional probability The conditional probability of event A given event B is written as P (A B) For example, in our ball and urn problem, when sampling without replacement: P (R 2 ) = 1 3 P (R 2 R 1 ) = 0 P (R 2 R C 1 ) = 1 2 Some additional terms (we ll define these more formally later in the course): P (A) is known as the marginal probability of A P (A B) is known as the joint probability of A and B Patrick Breheny University of Iowa Biostatistical Methods I (BIOS 5710) 19 / 52

The multiplication rule The complement rule The addition rule The multiplication rule To determine P (A B) in general, we need to use the multiplication rule Multiplication rule: For any two events A and B, P (A B) = P (A)P (B A) Rearranging the formula, we have P (A B) = P (A B), P (B) which allows us to calculate conditional probabilities Patrick Breheny University of Iowa Biostatistical Methods I (BIOS 5710) 20 / 52

Gestational age example The complement rule The addition rule The multiplication rule Recall our earlier example, where the probability that a child s gestational age is less than 37 weeks is 14.2%, the probability that his or her birth weight is less than 2500 grams is 5.1%, and the probability of both is 3.1% Exercise: What is the probability that a child s birth weight will be less than 2500 grams, given that his/her gestational age is less than 37 weeks? Patrick Breheny University of Iowa Biostatistical Methods I (BIOS 5710) 21 / 52

Independence Events and probability The complement rule The addition rule The multiplication rule Note that sometimes, event B is completely unaffected by event A, and P (B A) = P (B) If this is the case, then events A and B are said to be independent This works both ways all the following are equivalent: P (A) = P (A B) P (B) = P (B A) A and B are independent Otherwise, if the probability of A depends on B (or vice versa), then A and B are said to be dependent Patrick Breheny University of Iowa Biostatistical Methods I (BIOS 5710) 22 / 52

Dependence and independence The complement rule The addition rule The multiplication rule Scientific questions often revolve around conditional probability and independence are two events independent, and if they are dependent, how dependent are they? Event A Patient survives Student is admitted Person develops lung cancer Patient will develop disease Event B Patient receives treatment Student is male Person smokes Mutation of a certain gene Patrick Breheny University of Iowa Biostatistical Methods I (BIOS 5710) 23 / 52

The complement rule The addition rule The multiplication rule Independence and the multiplication rule Note that if A and B are independent, the multiplication rule reduces to P (A B) = P (A)P (B), which is often much easier to work with, especially when more than two events are involved For example, consider an urn with 3 red balls and 2 black balls; what is the probability of drawing three red balls? With replacement: ( ) 3 3 P (R 1 R 2 R 3 ) = = 21.6% 5 Without replacement: P (R 1 R 2 R 3 ) = 3 5 2 4 1 3 = 10% Patrick Breheny University of Iowa Biostatistical Methods I (BIOS 5710) 24 / 52

The complement rule The addition rule The multiplication rule Independent versus mutually exclusive It is important to keep in mind that independent and mutually exclusive mean very different things For example, consider drawing a random card from a standard deck of playing cards A deck of cards contains 52 cards, with 4 suits of 13 cards each The 4 suits are: hearts, clubs, spades, and diamonds The 13 cards in each suit are: ace, king, queen, jack, and 10 through 2 If event A is drawing a queen and event B is drawing a heart, then A and B are independent, but not mutually exclusive If event A is drawing a queen and event B is drawing a four, then A and B are mutually exclusive, but not independent It is impossible for two events to be both mutually exclusive and independent Patrick Breheny University of Iowa Biostatistical Methods I (BIOS 5710) 25 / 52

The Chevalier de Méré, Part II The complement rule The addition rule The multiplication rule We can also use the rules of probability in combination to solve the problem that stumped the Chevalier de Méré Recall that we are interested in two probabilities: What is the probability of rolling four dice and getting at least one ace? What is the probability of rolling 24 pairs of dice and getting at least one double-ace? Patrick Breheny University of Iowa Biostatistical Methods I (BIOS 5710) 26 / 52

The complement rule The addition rule The multiplication rule The Chevalier de Méré, Part II (cont d) First, we can use the complement rule: P (At least one ace) = 1 P (No aces) Next, we can use the multiplication rule: P (No aces) =P (No aces on roll 1) P (No aces on roll 2 No aces on roll 1) Are rolls of dice independent? Yes; therefore, P (At least one ace) = 1 = 51.7% ( ) 5 4 6 Patrick Breheny University of Iowa Biostatistical Methods I (BIOS 5710) 27 / 52

The complement rule The addition rule The multiplication rule The Chevalier de Méré, Part II (cont d) By the same reasoning, P (At least one double-ace) = 1 = 49.1% ( ) 35 24 36 Note that this is a little smaller than the first probability, and that both are much smaller than the 2 3 probability reasoned by the Chevalier Patrick Breheny University of Iowa Biostatistical Methods I (BIOS 5710) 28 / 52

Caution Events and probability The complement rule The addition rule The multiplication rule With dice, independence is clear and we can multiply probabilities to get the right answer However, people often multiply probabilities when events are not independent, leading to incorrect answers A dramatic example of misusing the multiplication rule occurred during the 1999 trial of Sally Clark, on trial for the murder of her two children Clark had two sons, both of which died of sudden infant death syndrome (SIDS) Patrick Breheny University of Iowa Biostatistical Methods I (BIOS 5710) 29 / 52

The Sally Clark case Events and probability The complement rule The addition rule The multiplication rule One of the prosecution s key witnesses was the pediatrician Roy Meadow, who calculated that the probability of one of Clark s children dying from SIDS was 1 in 8543, so the probability that both children had died of natural causes was ( ) 1 2 = 8543 1 73, 000, 000 This figure was portrayed as though it represented the probability that Clark was innocent, and she was sentenced to life imprisonment Patrick Breheny University of Iowa Biostatistical Methods I (BIOS 5710) 30 / 52

The Sally Clark case (cont d) The complement rule The addition rule The multiplication rule However, this calculation is both inaccurate and misleading In a concerned letter to the Lord Chancellor, the president of the Royal Statistical Society wrote: The calculation leading to 1 in 73 million is invalid. It would only be valid if SIDS cases arose independently within families, an assumption that would need to be justified empirically. Not only was no such empirical justification provided in the case, but there are very strong reasons for supposing that the assumption is false. There may well be unknown genetic or environmental factors that predispose families to SIDS, so that a second case within the family becomes much more likely than would be a case in another, apparently similar, family. Patrick Breheny University of Iowa Biostatistical Methods I (BIOS 5710) 31 / 52

The Sally Clark case (cont d) The complement rule The addition rule The multiplication rule There are also a number of issues, also mentioned in the letter, with the accuracy of the calculation that produced the 1 in 8543 figure Finally, it is completely inappropriate to interpret the probability of two children dying of SIDS as the probability that the defendant is innocent The probability that a woman would murder both of her children is also extremely small; one needs to compare the probabilities of the two explanations The British court of appeals, recognizing the statistical flaws in the prosecution s argument, overturned Clark s conviction and she was released in 2003, having spent three years in prison Patrick Breheny University of Iowa Biostatistical Methods I (BIOS 5710) 32 / 52

The law of total probability The law of total probability Bayes rule Diagnostic testing A rule related to the addition rule is called the law of total probability, which states that if you divide A into the part that intersects B and the part that doesn t, then the sum of the probabilities of the parts equals P (A) Theorem (Law of total probability): For any events A and B, P (A) = P (A B) + P (A B C ) Patrick Breheny University of Iowa Biostatistical Methods I (BIOS 5710) 33 / 52

The law of total probability Bayes rule Diagnostic testing The law of total probability in action Again recall the gestational age problem: P (E) = 0.142, P (L) = 0.051, and P (E L) = 0.031 Exercise: What is the probability of low birth weight (L) given that the gestational age was greater than 37 weeks (E C )? How do the conditional probabilities P (L E) and P (L E C ) relate to the unconditional probability P (L)? Patrick Breheny University of Iowa Biostatistical Methods I (BIOS 5710) 34 / 52

Introduction Events and probability The law of total probability Bayes rule Diagnostic testing Conditional probabilities are often easier to reason through (or collect data for) in one direction than the other For example, suppose a woman is having twins Obviously, if she were having identical twins, the probability that the twins would be the same sex would be 1, and if her twins were fraternal, the probability would be 1/2 But what if the woman goes to the doctor, has an ultrasound performed, learns that her twins are the same sex, and wants to know the probability that her twins are identical? Patrick Breheny University of Iowa Biostatistical Methods I (BIOS 5710) 35 / 52

Bayes rule Events and probability The law of total probability Bayes rule Diagnostic testing So, we know P (Same sex Identical), but we want to know P (Identical Same sex) To flip these probabilities around, we can use something called Bayes rule Theorem (Bayes Rule): For any events A and B with nonzero probability, P (A B) = P (A)P (B A) P (A)P (B A) + P (A C )P (B A C ) Patrick Breheny University of Iowa Biostatistical Methods I (BIOS 5710) 36 / 52

Applying Bayes rule Events and probability The law of total probability Bayes rule Diagnostic testing To apply Bayes rule, we need to know one other piece of information: the unconditional probability that a pair of twins will be identical The proportion of all twins that are identical is roughly 1/3 Exercise: For the woman in question, what is the probability that her twins are identical? Patrick Breheny University of Iowa Biostatistical Methods I (BIOS 5710) 37 / 52

Meaning behind Bayes rule The law of total probability Bayes rule Diagnostic testing Let s think about what happened Before the ultrasound, P (Identical) = 1 3 This is called the prior probability After we learned the results of the ultrasound, P (Identical) = 1 2 This is called the posterior probability Patrick Breheny University of Iowa Biostatistical Methods I (BIOS 5710) 38 / 52

Bayesian statistics Events and probability The law of total probability Bayes rule Diagnostic testing In fact, this prior/posterior way of thinking can be used to establish an entire statistical framework known as Bayesian statistics In this way of thinking, we start out with an idea of the possible values of some quantity θ (note that this is an example of a non-repeatable event) This distribution of possibilities P (θ) is our prior belief about the unknown; we then observe data D and update those beliefs, arriving at our posterior beliefs about the unknown, P (θ D) Mathematically, this updating uses Bayes rule, hence the name for this line of inferential reasoning Patrick Breheny University of Iowa Biostatistical Methods I (BIOS 5710) 39 / 52

Bayesian statistics (cont d) The law of total probability Bayes rule Diagnostic testing As noted earlier, not everyone agrees with the notion of assigning prior probabilities to represent subjective beliefs At least for the present, the long-run frequency interpretation of probability has been adopted more widely and represents the most common approach to statistical inference Nevertheless, the Bayesian approach offers many advantages in particular, it offers a natural representation of human thought and allows us to quantify probabilities about non-repeatable events and has become more widespread in recent decades, although whether this trend will continue or not is anyone s guess We will focus primarily on frequentist statistics in this course, although we will return to Bayesian statistics again Patrick Breheny University of Iowa Biostatistical Methods I (BIOS 5710) 40 / 52

Testing and screening The law of total probability Bayes rule Diagnostic testing A common application of Bayes rule in biostatistics is in the area of diagnostic testing For example, older women in the United States are recommended to undergo routine X-rays of breast tissue (mammograms) to look for cancer Even though the vast majority of women will not have developed breast cancer in the year or two since their last mammogram, this routine screening is believed to save lives by catching the cancer while it is relatively treatable The application of a diagnostic test to asymptomatic individuals in the hopes of catching a disease in its early stages is called screening Patrick Breheny University of Iowa Biostatistical Methods I (BIOS 5710) 41 / 52

Terms involved in screening The law of total probability Bayes rule Diagnostic testing Let D denote the event that an individual has the disease that we are screening for Let + denote the event that their screening test is positive, and denote the event that the test comes back negative Ideally, both P (+ D) and P ( D C ) would equal 1 However, diagnostic tests are not perfect Patrick Breheny University of Iowa Biostatistical Methods I (BIOS 5710) 42 / 52

The law of total probability Bayes rule Diagnostic testing Terms involved in screening (cont d) Instead, there are always false positives, patients for whom the test comes back positive even though they do not have the disease Likewise, there are false negatives, patients for whom the test comes back negative even though they really do have the disease Suppose we test a person who truly does have the disease: P (+ D) is the probability that we will get the test right This probability is called the sensitivity of the test P ( D) is the probability that the test will be wrong (that it will produce a false negative) Patrick Breheny University of Iowa Biostatistical Methods I (BIOS 5710) 43 / 52

The law of total probability Bayes rule Diagnostic testing Terms involved in screening (cont d) Alternatively, suppose we test a person who does not have the disease: P ( D C ) is the probability that we will get the test right This probability is called the specificity of the test P (+ D C ) is the probability that the test will be wrong (that the test will produce a false positive) Patrick Breheny University of Iowa Biostatistical Methods I (BIOS 5710) 44 / 52

The law of total probability Bayes rule Diagnostic testing Terms involved in screening (cont d) The accuracy of a test is determined by these two factors: Sensitivity: P (+ D) Specificity: P ( D C ) One final important term is the probability that a person has the disease, regardless of testing: P (D) This is called the prevalence of the disease Patrick Breheny University of Iowa Biostatistical Methods I (BIOS 5710) 45 / 52

Values for mammography The law of total probability Bayes rule Diagnostic testing According to an article in Cancer (more about this later), The sensitivity of a mammogram is 0.85 The specificity of a mammogram is 0.80 The prevalence of breast cancer is 0.003 With these numbers, we can calculate what we really want to know: if a woman has a positive mammogram, what is the probability that she has breast cancer? Patrick Breheny University of Iowa Biostatistical Methods I (BIOS 5710) 46 / 52

The law of total probability Bayes rule Diagnostic testing Using Bayes rule for diagnostic testing Applying Bayes rule to this problem, P (D)P (+ D) P (D +) = P (D)P (+ D) + P (D C )P (+ D C ).003(.85) =.003(.85) + (1.003)(1.8) = 0.013 In the terminology of Bayes rule, the prior probability that a woman had breast cancer was 0.3% After the new piece of information (the positive mammogram), that probability jumps to 1.3% Patrick Breheny University of Iowa Biostatistical Methods I (BIOS 5710) 47 / 52

Controversy (Part 1) Events and probability The law of total probability Bayes rule Diagnostic testing So according to our calculations, for every 100 positive mammograms, only one represents an actual case of breast cancer Because P (D +) is so low, screening procedures like mammograms are controversial We are delivering scary news to 99 women who are free from breast cancer On the other hand, we may be saving that one other woman s life These are tough choices for public health organizations Patrick Breheny University of Iowa Biostatistical Methods I (BIOS 5710) 48 / 52

The law of total probability Bayes rule Diagnostic testing Two studies of mammogram accuracy In our example, we calculated that the probability that a woman has breast cancer, given that she has a positive mammogram, is 1.3% The numbers we used (sensitivity, specificity, and prevalence) came from the article Hulka B (1988). Cancer screening: degrees of proof and practical application. Cancer, 62: 1776-1780. A more recent study is Carney P, et al. (2003). Individual and combined effects of age, breast density, and hormone replacement therapy use on the accuracy of screening mammography. Annals of Internal Medicine, 138: 168-175. Patrick Breheny University of Iowa Biostatistical Methods I (BIOS 5710) 49 / 52

Comparing the two studies The law of total probability Bayes rule Diagnostic testing Hulka (1988) Carney (2003) Sensitivity.85.750 Specificity.80.923 Prevalence.003.005 P (D +) 1.3% 4.7% It would seem, then, that radiologists have gotten more conservative in calling a mammogram positive, and this has increased P (D +) However, the main point remains the same: a woman with a positive mammogram is much more likely not to have breast cancer than to have it Patrick Breheny University of Iowa Biostatistical Methods I (BIOS 5710) 50 / 52

Controversy (Part 2) Events and probability The law of total probability Bayes rule Diagnostic testing Based on these kinds of calculations, in 2009 the US Preventive Services Task Force changed its recommendations: It is no longer recommended for women under 50 to get routine mammograms Women over 50 are recommended to get mammograms every other year, as opposed to every year Of course, not everyone agreed with this change, and much debate ensued (my Google search for USPSTF breast cancer screening controversy returned over 20,000 hits) Patrick Breheny University of Iowa Biostatistical Methods I (BIOS 5710) 51 / 52

Events and probability Complement rule: P (A C ) = 1 P (A) Addition rule: P (A B) = P (A) + P (B) P (A B) Multiplication rule: P (A B) = P (A)P (B A) Law of total probability: P (A) = P (A B) + P (A B C ) Bayes Rule: P (A B) = P (A)P (B A) P (A)P (B A) + P (A C )P (B A C ) Important terms: mutually exclusive, independent, conditional probability, sensitivity, specificity, prevalence Patrick Breheny University of Iowa Biostatistical Methods I (BIOS 5710) 52 / 52