1
INTRODUCTION TO
STATISTICS & PROBABILITY
Chapter 4:
Probability: The Study of Randomness
Dr. Nahid Sultana
12/22/2022 Copyright© Nahid Sultana 2017-2018
Chapter 4
Probability: The Study of Randomness
2
4.1 Randomness
4.2 Probability Models
4.3 Random Variables
4.4 Means and Variances of Random Variables
4.5 General Probability Rules*
Copyright© Nahid Sultana 2017-2018 12/22/2022
4.1 Randomness
▪ The language of probability
▪ Thinking about randomness
▪ The uses of probability
3
4.1 Randomness
The Language of Probability
4
➢ Toss a coin, or choose an SRS.
The result can’t be predicted in advance (i.e., it’s uncertain),
because the result will vary when you toss the coin or choose
the sample repeatedly.
➢ But there is, however, a regular pattern in the results, a pattern
that comes out clearly only after many repetitions.
Definition: We call a phenomenon random if individual outcomes
are uncertain but there is however a regular distribution of outcomes
in a large number of repetitions.
This remarkable fact is the basis for the idea of probability.
Copyright© Nahid Sultana 2017-2018 12/22/2022
Thinking About Randomness
5
The result of any single coin toss is random. But the result over many tosses
is predictable as long as the trials are independent (i.e., the outcome of a
new coin flip is not influenced by the result of the previous flip).
The probability of
heads is 0.5 = the
proportion of times
you get heads in many
repeated trials.
First series of tosses
Second series
Copyright© Nahid Sultana 2017-2018 12/22/2022
The Language of Probability (Cont..)
6
Concept of Probability
1. Repeat an experiment (or observe a random phenomenon) a
large number of times.
2. Record the number of times a desirable outcome occurs.
3. Compute the ratio:
# of times the desirable outcome occurs
Total # of times the experiment was performed
Definition: The probability of any outcome of a random
phenomenon is the proportion of times the outcome would occur in a
very long series of repetitions.
Copyright© Nahid Sultana 2017-2018 12/22/2022
The Language of Probability (Cont..)
7
Example: The statistics of a particular basketball player state that
he makes 4 out of 5 free-throw attempts.
The basketball player is just about to attempt a free throw. What
do you estimate the probability that the player makes this next free
throw to be?
A. 0.16
B. 50-50. Either he makes it or he doesn’t.
C. 0.80
D. 1.2
Answer: C
Copyright© Nahid Sultana 2017-2018 12/22/2022
4.2 Probability Models
➢ Probability models
➢ Probability Rules
➢ Assigning Probabilities
➢ Independence and the Multiplication Rule
Copyright© Nahid Sultana 2017-2018 12/22/2022
8
Probability Models
9
Descriptions of chance behavior contain two parts:
1. List of possible outcomes and
2. A probability for each outcome.
➢ The set of all possible outcomes of a statistical experiment is
called the sample space and it is represented by the symbol S.
➢ An event is an outcome or a set of outcomes of a random
phenomenon. That is, an event is a subset of the sample space.
➢ A probability model is a description of some chance process that
consists of two parts: a sample space S and a probability for each
outcome.
Copyright© Nahid Sultana 2017-2018 12/22/2022
Probability Models (Cont…)
10
Example: Give a probability model for the chance
process of tossing of a coin.
Sample space , S = {Head, Tail}
Each of these outcomes has probability 1/2
Outcome Heads Tails
Probability 1/2 1/2
Copyright© Nahid Sultana 2017-2018 12/22/2022
Probability Models (Cont…)
11
Example: Give a probability model for the
chance process of tossing of a Die.
Each of these outcomes has probability 1/6
Copyright© Nahid Sultana 2017-2018 12/22/2022
Probability Models (Cont…)
12
Example: Give a probability model for the chance process of rolling
two fair, six-sided dice―one that’s red and one that’s green.
Sample Space
36 Outcomes Each outcome has probability 1/36.
12 Copyright© Nahid Sultana 2017-2018 12/22/2022
Probability Rules
13
Rule 1. The probability of each outcome is a number between 0 and 1.
The probability P(A) of any event A satisfies 0 ≤ P(A) ≤ 1
Rule 2. The sum of the probabilities of all the outcomes in a sample
space equals 1.
If S is the sample space in a probability model, then P(S) = 1.
Rule 3. If two events A and B are mutually exclusive or disjoint
( A ∩ B = Φ, i.e., if A and B have no element in common) , then
P(A or B) = P(A U B ) = P(A) + P(B).
This is the addition rule for disjoint events.
Rule 4: The complement of any event A is the event that consists of all
the outcomes not in A, written AC.
P(AC) = 1 – P(A)
Copyright© Nahid Sultana 2017-2018 12/22/2022
Probability Rules (Cont…)
Example:
14
If you draw an M&M candy at random from a bag of the candies,
the candy you draw will have one of six colors. The probability of
drawing each color depends on the proportion of each color among
all candies made. Assume the table below gives the probabilities
for the color of a randomly chosen M&M:
Color Brown Red Yellow Green Orange Blue
Probability 0.3 0.3 ? 0.1 0.1 0.1
What is the probability of drawing a yellow candy?
Answer. 0.1
What is the probability of not drawing a red candy?
Answer: 1-0.3 = 0.7
What is the probability that you draw neither a brown nor a green candy?
Answer: 1-(0.3+0.1) = 0.6 Copyright© Nahid Sultana 2017-2018 12/22/2022
Probability Rules (Cont…)
Example:
15
Distance-learning courses are rapidly gaining popularity among
college students. Randomly select an undergraduate student who is
taking distance-learning courses for credit and record the student’s
age. Here is the probability model:
Age group (yr): 18 to 23 24 to 29 30 to 39 40 or over
Probability: 0.57 0.17 0.14 0.12
(a)Show that this is a legitimate probability model.
Each probability is between 0 and 1 and
0.57 + 0.17 + 0.14 + 0.12 = 1
(b)Find the probability that the chosen student is not in the
traditional college age group (18 to 23 years).
P(not 18 to 23 years) = 1 – P(18 to 23 years)
Copyright© Nahid Sultana 2017-2018 = 1 – 0.57 = 0.43 12/22/2022
Finite Probability Models
16
One way to assign probabilities to events is to assign a probability to
every individual outcome, then add these probabilities to find the
probability of any event. This idea works well when there are only a finite
(fixed and limited) number of outcomes.
➢ A probability model with a finite sample space is called finite.
➢ To assign probabilities in a finite model, list the probabilities of all
the individual outcomes.
➢ These probabilities must be numbers between 0 and 1 that add up
to exactly 1.
➢ The probability of any event is the sum of the probabilities of the
outcomes making up the event.
Venn Diagrams
17
Sometimes it is helpful to draw a picture to display relations among
several events. A picture that shows the sample space S as a
rectangular area and events as areas within S is called a Venn
diagram. Two events that are not disjoint, and
Two disjoint events: the event {A and B} consisting of the
outcomes they have in common:
A probability model with a finite sample space is called finite.
Copyright© Nahid Sultana 2017-2018 12/22/2022
Multiplication Rule for Independent
18
Events
If two events A and B do not influence each other, and if
knowledge about one does not change the probability of the other,
the events are said to be independent of each other.
Multiplication Rule for Independent Events
If A and B are independent:
P(A and B) = P(A) P(B)
Copyright© Nahid Sultana 2017-2018 12/22/2022
4.3 Random Variables
19
➢ Random Variable
➢ Discrete Random Variables
➢ Continuous Random Variables
➢ Normal Distributions as Probability Distributions
Copyright© Nahid Sultana 2017-2018 12/22/2022
Random Variables
20
➢ A probability model: sample space S and probability for each outcome.
➢ A numerical variable that describes the outcomes of a chance process is
called a random variable.
➢ The probability model for a random variable is its probability distribution.
The probability distribution of a random variable gives its possible
values and their probabilities.
Example: Consider tossing a fair coin 3 times.
Define X = the number of heads obtained.
X= 0: TTT
X= 1: HTT THT TTH Value 0 1 2 3
X= 2: HHT HTH THH Probability 1/8 3/8 3/8 1/8
X= 3:20HHH
Copyright© Nahid Sultana 2017-2018 12/22/2022
Discrete Random Variable
Two main types of random variables: discrete and continuous.
21
A discrete random variable X takes a fixed set of possible values
with gaps between.
The probability distribution of a discrete random variable X lists the
values xi and their probabilities pi:
The probabilities pi must satisfy two requirements:
1. Every probability pi is a number between 0 and 1.
2. The sum of the probabilities is 1.
Copyright© Nahid Sultana 2017-2018 12/22/2022
Discrete Random Variable (Cont…)
22
Example: Consider tossing a fair coin 3 times. X= 0: TTT
Define X = the number of heads obtained. X= 1: HTT THT TTH
X= 2: HHT HTH THH
Value 0 1 2 3 X= 3: HHH
Probability 1/8 3/8 3/8 1/8
Q1: What is the probability of tossing at least two heads?
Ans: P(X ≥ 2 ) = P(X=2) + P(X=3) = 3/8 + 1/8 = 1/2
Q2: What is the probability of tossing fewer than three heads?
Ans: P(X < 3 ) = P(X=0) +P(X=1) + P(X=2) = 1/8 + 3/8 + 3/8
= 7/8
Or P(X < 3 ) = 1 – P(X = 3) = 1 – 1/8 = 7/8
Copyright© Nahid Sultana 2017-2018 12/22/2022
Discrete Random Variable (Cont…)
23
Example: North Carolina State University posts the grade distributions for its
courses online. Students in one section of English210 in the spring 2006
semester received 31% A’s, 40% B’s, 20% C’s, 4% D’s, and 5% F’s.
The student’s grade on a four-point scale (with A = 4) is a random
variable X. The value of X changes when we repeatedly choose students at
random , but it is always one of 0, 1, 2, 3, or 4. Here is the distribution of X:
Q1: What is the probability that the
student got a B or better?
Ans: P(X ≥ 3 ) = P(X=3) + P(X=4)
= 0.40 + 0.31 = 0.71
Q2: Suppose that a grade of D or F in English210 will not count as satisfying
a requirement for a major in linguistics. What is the probability that a
randomly selected student will not satisfy this requirement?
Ans: P(X ≤ 1 ) = 1 - P( X >1) = 1 – ( P(X=2) + P(X=3) + P(X=4) ) = 1- 0.91 = 0.09
Copyright© Nahid Sultana 2017-2018 12/22/2022
Continuous Random Variable
24
A continuous random variable Y takes on all values in an interval of
numbers.
Ex: Suppose we want to choose a number at random between 0 and 1.
-----There is infinitely many number between 0 and 1.
How do we assign probabilities to events in an infinite sample space?
➢ The probability distribution of Y is described by a density curve.
➢ The probability of any event is the area under the density curve and
above the values of Y that make up the event.
Copyright© Nahid Sultana 2017-2018 12/22/2022
Continuous Random Variable (Cont…)
25
➢ Discrete random variables commonly arise from situations that
involve counting something.
➢ Situations that involve measuring something often result in a
continuous random variable.
➢ A discrete random variable X has a finite number of possible values.
The probability model of a discrete random variable X assigns a
probability between 0 and 1 to each possible value of X.
➢ A continuous random variable Y has infinitely many possible values.
The probability of a single event (ex: X=k) is meaningless for a
continuous random variable. Only intervals can have a non-zero
probability; represented by the area under the density curve for that
Copyright© Nahid Sultana 2017-2018 12/22/2022
interval .
Continuous Probability Models
26
Example: This is a uniform density curve for the variable X. Find the
probability that X falls between 0.3 and 0.7.
Uniform
Distribution
Ans: P(0.3 ≤ X ≤ 0.7) = (0.7- 0.3) * 1 = 0.4
Copyright© Nahid Sultana 2017-2018 12/22/2022
Continuous Probability Models (Cont…)
27
Example: Find the probability of getting a random number that is
less than or equal to 0.5 OR greater than 0.8.
P(X ≤ 0.5 or X > 0.8)
Uniform
= P(X ≤ 0.5) + P(X > 0.8) Distribution
= 0.5 + 0.2
= 0.7
Copyright© Nahid Sultana 2017-2018 12/22/2022
Continuous Probability Models (Cont…)
28
General Form:
The probability of the event A is the shaded area under the density
curve. The total area under any density curve is 1.
Copyright© Nahid Sultana 2017-2018 12/22/2022
Normal Probability Model
29
The probability distribution of many random variables is a normal
distribution.
Example: Probability distribution
of Women’s height.
Here, since we chose a woman
randomly, her height, X, is a
random variable.
To calculate probabilities with the normal distribution, we standardize
the random variable (z score) and use the Table A.
Copyright© Nahid Sultana 2017-2018 12/22/2022
Normal Probability Model (Cont…)
Reminder: standardizing N(µ,σ)
30
We standardize normal data by calculating z-score so that any normal
curve can be transformed into the standard Normal curve N(0,1).
(x − )
z=
Copyright© Nahid Sultana 2017-2018 12/22/2022
Normal Probability
Model (Cont…)
31
Women’s heights are normally distributed
with µ = 64.5 and σ = 2.5 in.
What is the probability, if we pick one woman at random, that her height
will be between 68 and 70 inches i.e. P(68 ≤ X ≤ 70)? Here because the
woman is selected at random, X is a random variable.
The area under the curve for the interval
The z-scores for 68, z = (68 − 64.5) = 1.4 [68”,70”] is 0.9861-0.9192=0.0669.
2.5 Thus the probability that a randomly
chosen woman falls into this range is
(70 − 64.5)
And for x = 70", z = = 2.2 6.69%. i.e.
2.5
P(68 ≤ X ≤ 70)= 6.69%.
Copyright© Nahid Sultana 2017-2018 12/22/2022
4.4 Means and Variances of
Random Variables
32
➢The mean of a random variable
➢The law of large numbers
➢Rules for means
➢The variance of a random variable
➢Rules for variances and standard deviations
Copyright© Nahid Sultana 2017-2018 12/22/2022
The Mean of a Random Variable
33
➢ The mean of a set of observations is their arithmetic average.
➢ The mean µ of a random variable X (also called expected value of X)
is the weighted average of the possible values of X, reflecting that all
outcomes might not be equally likely.
Mean of a Discrete Random Variable
Suppose that X is a discrete random variable whose probability
distribution
The mean of X is found by multiplying each possible value of X by its
probability, then adding all the products:
μ x = E ( X ) = x1 p1 + x2 p2 + x3 p3 + ... + xk pk = xi pi
Copyright© Nahid Sultana 2017-2018 12/22/2022
The Mean of a Random Variable
(Cont…)
34
Consider tossing a fair coin 3 times. X= 0: TTT
Define X = the number of heads X= 1: HTT THT TTH
obtained. X= 2: HHT HTH THH
X= 3: HHH
Value 0 1 2 3
Probability 1/8 3/8 3/8 1/8
The mean µ of X is
μ x = x1 p1 + x2 p2 + x3 p3 + ... + xk pk
= (0 *1 / 8) + (1* 3 / 8) + (2 * 3 / 8) + (3 *1 / 8)
= 12 / 8 = 3 / 2 = 1.5
Copyright© Nahid Sultana 2017-2018 12/22/2022
Example: Babies’ Health at Birth
The probability distribution for X = Apgar scores is shown below:
35
[Link] that the probability distribution for X is legitimate.
[Link] a histogram of the probability distribution. Describe what you see.
[Link] scores of 7 or higher indicate a healthy baby. What is P(X ≥ 7)?
Value: 0 1 2 3 4 5 6 7 8 9 10
Probability: 0.001 0.006 0.007 0.008 0.012 0.020 0.038 0.099 0.319 0.437 0.053
(a) All probabilities are (c) P(X ≥ 7) = .908.
between 0 and 1, and We’d have a 91%
they add up to 1. This chance of randomly
is a legitimate choosing a healthy
probability distribution. baby.
(b) The left-skewed shape of the distribution suggests a randomly selected
newborn will have an Apgar score at the high end of the scale. There is a small
chance of getting a baby with a score of 5 or lower.
Example: Apgar Scores―What’s
Typical?
36
Consider the random variable X = Apgar Score.
Compute the mean of the random variable X and interpret it in
context.
Value: 0 1 2 3 4 5 6 7 8 9 10
Probability: 0.001 0.006 0.007 0.008 0.012 0.020 0.038 0.099 0.319 0.437 0.053
μx = E( X ) = xi pi
= (0)(0.001) + (1)(0.006) + (2)(0.007) + ...+ (10)(0.053)
= 8.128
The mean Apgar score of a randomly selected newborn is 8.128. This is the long-
term average Apgar score of many, many randomly chosen babies.
Note: The expected value does not need to be a possible value of X or an integer!
It is a long-term average over many repetitions.
The Mean of a Random Variable
37
(Cont…)
Mean of a Continuous Random Variable
If X is a continuous random variable with probability distribution f(x)
then the mean or expected value of X is found by:
μx = E ( X ) = xf ( x)dx
−
Example: Suppose we have a continuous random variable X with
probability density function given by
Calculate E(X).
Solution:
Copyright© Nahid Sultana 2017-2018 12/22/2022
Variance of a Random Variable
38
Since we use the mean as the measure of center for a discrete random
variable, we’ll use the standard deviation as our measure of spread.
Variance of a Discrete Random Variable
Suppose that X is a discrete random variable whose probability
distribution is:
And µX is the mean of X. The variance of X is found by multiplying each
squared deviation of X by its probability and then adding all the
products:
Var ( X ) = X2 = ( x1 − X ) 2 p1 + ( x2 − X ) 2 p2 + ... + ( xk − X ) 2 pk = ( xi − X ) 2 pi
The standard deviation of a random variable is the square root of the variance.
Copyright© Nahid Sultana 2017-2018 12/22/2022
Variance of a Random Variable
(Cont…)
39
Example: Consider tossing a fair coin 3 times. X = 0: TTT
Define X = the number of heads obtained. X = 1: HTT THT TTH
X = 2: HHT HTH THH
Value 0 1 2 3 X = 3: HHH
Probability 1/8 3/8 3/8 1/8
The mean µ of X , μX = 3 / 2
2 2 2 2
X = ( x1 − ) p1 + ( x2 − X ) p2 + ... + ( xk − X ) pk
X
2 2 2 2
= (0 − 3 / 2) * 1 / 8 + (1 − 3 / 2) * 3 / 8 + ( 2 − 3 / 2) * 3 / 8 + (3 − 3 / 2) * 1 / 8
= 9 / 4 *1 / 8 + 1 / 4 * 3 / 8 + 1 / 4 * 3 / 8 + 9 / 4 *1 / 8
= 2(9 / 32 ) + 2(3 / 32 ) = 2(12 / 32 ) = 24 / 32 = 3 / 4 = 0.75
Copyright© Nahid Sultana 2017-2018 12/22/2022
Variance of a Random Variable
40
(Cont…)
Variance of a Continuous Random Variable
If X is a continuous random variable with probability distribution f(x) then
the variance of X is given by:
Var ( X ) = X = ( X − x ) 2 f ( x)dx
2
−
X = E( X ) − ( E ( X ))
2 2 2
Theorem:
Example: Suppose we have a continuous random variable X with
probability density function given by
Calculate Var(X).
Solution:
Copyright© Nahid Sultana 2017-2018 12/22/2022
Rules for Means and Variance
41
Rules for Means and Variance
Rule 1: If X is a random variable and a and b are fixed numbers, then:
µa+bX = a + bµX
σ2a+bX = b2σ2X
Rule 2: If X and Y are two independent random variables, then:
µX+Y = µX + µY
σ2X+Y = σ2X + σ2Y
Rule 3: If X and Y are not independent but have correlation ρ, then:
µX+Y = µX + µY
σ2X+Y = σ2X + σ2Y + 2ρσXσY
Copyright© Nahid Sultana 2017-2018 12/22/2022
Rules for Means and Variance (Cont…)
Example:
42
You invest 20% of your funds in Treasury bills and 80% in an “index fund”
that represents all U.S. common stocks. Your rate of return of over time is the
proportional to that of the T-bills (X) and of the index fund (Y), such that
R = 0.2 X + 0.8 Y.
? ?
Copyright© Nahid Sultana 2017-2018 12/22/2022
The Law of Large Numbers
43
Suppose we would like to estimate an unknown mean µ.
We could select an SRS and calculate sample mean .
However, a different SRS would probably yield a different sample mean.
How can x be an accurate estimate of μ? After all, different
random samples would produce different values of x.
If we keep on taking larger and larger samples, the statistic
x is guaranteed to get closer and closer to the parameter .
The law of large numbers says that as the number of observations
drawn increases, the sample mean of the observed values gets
closer and closer to the mean µ of the population.
Copyright© Nahid Sultana 2017-2018 12/22/2022
4.5 General Probability Rules
44
➢ Rules of Probability
➢ General Addition Rules
➢ Conditional Probability
➢ General Multiplication Rules
➢ Bayes’s Rule
➢ Independence
Copyright© Nahid Sultana 2017-2018 12/22/2022
Probability Rules
45
Return to the laws of probabilities:
Rule 1. The probability P(A) of any event A satisfies 0 ≤ P(A) ≤ 1.
Rule 2. If S is the sample space in a probability model, then P(S) = 1.
Rule 3. If A and B are disjoint, P(A or B) = P(A) + P(B).
Rule 4. For any event A, P(AC) = 1 – P(A).
Rule 5. If A and B are independent, P(A and B) = P(A)P(B).
Copyright© Nahid Sultana 2017-2018 12/22/2022
The General Addition Rule
46
Addition Rule for Disjoint Events: If A, B, and C are disjoint in the
sense that no two have any in common, then:
P( A or B or C) = P(A) + P(B) + P(C)
Addition Rule for Unions of Two
Events
The probability that A occurs, B occurs,
or both occurs is:
P(A or B) = P(A) + P(B) – P(A and B)
Copyright© Nahid Sultana 2017-2018 12/22/2022
Conditional Probability
47
Rule 5. If A and B are independent, P(A and B) = P(A)P(B).
The probability of an event can change if we know that some other event
has occurred. This idea is the key to many applications of probability.
The conditional probability reflects how the probability of an event can
change if we know that some other event has already occurred.
When P(A) > 0, the conditional probability of B given A is
P ( A and B )
P ( B | A) =
P ( A)
Copyright© Nahid Sultana 2017-2018 12/22/2022
The General Multiplication Rule
P( A and B)
48 P( B | A) =
P( A)
Conditional probability → rule for the probability that both of two event
occur.
The probability that any two events A and B both occur is
P(A and B) = P(A) P(B | A)
This is the general multiplication rule, where P(B | A) is the conditional
probability that event B occurs given that event A has already occurred.
Note: If Two events A and B are independent, P(A and B) = P(A)P(B).
Therefore, If A and B that both have positive probability are
independent if:
P(B|A) = P(B)
Copyright© Nahid Sultana 2017-2018 12/22/2022
The General Multiplication Rule
49
Example:
Suppose 29% of Internet users download music files, and 67% of
downloaders say they don’t care if the music is copyrighted.
What is the percent of Internet users who download music and don’t care
about copyright.
Example:
Employed Unemployed Total
Male 460 40 500
Female 140 260 400
Total 600 300 900
Copyright© Nahid Sultana 2017-2018 12/22/2022
Probability Trees
50
Conditional probabilities can get complex, and it is often good strategy
to build a probability tree that represents all possible outcomes
graphically and assigns conditional probabilities to subsets of events..
Consider flipping a coin
twice.
What is the probability of
getting two heads?
Sample Space:
HH HT TH TT
So, P(two heads) = P(HH) = 1/4
Copyright© Nahid Sultana 2017-2018 12/22/2022
Probability Trees: Example
51 The Pew Internet and American Life Project finds that 93% of
teenagers (ages 12 to 17) use the Internet, and that 55% of online
teens have posted a profile on a social-networking site.
What percent of teens are online and have posted a profile?
P(online ) = 0.93
P(profile | online ) = 0.55
P(A and B) = P(A) P(B | A)
P (online and have profile)
= P (online) P (profile | online)
= (0.93)(0.55)
= 0.5115
51.15% of teens are online and have
posted a profile.
Copyright© Nahid Sultana 2017-2018 12/22/2022
Probability Trees: Example
52
29% of adult Internet users are 18 to 29 years old (event A1), another 47%
are 30 to 49 (event A2), and the remaining 24% are 50 and over (event A3).
47% of the 18 to 29 age group chat, as do 21% of the 30 to 49 age
group and just 7% of those 50 and over. What is the probability that a
randomly chosen user of the Internet participates in chat rooms?
P(C) = 0.1363 + 0.0987 + 0.0168
= 0.2518
About 25% of all adult Internet users take part in chat rooms.
Copyright© Nahid Sultana 2017-2018 12/22/2022
Bayes’s Rule
Example
53 Diagnosis
sensitivity
Disease 0.8
incidence Positive
Cancer
0.0004 False negative
Negative
0.2
Mammography
0.1
Positive False positive
0.9996
No cancer
Incidence of breast cancer
among women ages 20–30 Negative
0.9
Diagnosis
specificity Mammography
performance
If a woman in her 20s gets screened for breast cancer and receives a
positive test result, what is the probability that she does have breast
cancer? Copyright© Nahid Sultana 2017-2018 12/22/2022
Bayes’s Rule (Cont…) Diagnosis
Example Disease
incidence
sensitivity 0.8
Positive
54 Cancer
0.0004 Negative False negative
0.2
Mammography
0.1 False positive
0.9996 Positive
No cancer
Incidence of breast
Negative
cancer among 0.9
Diagnosis
women ages 20–30 specificity Mammography
performance
If a woman in her 20s gets screened for breast cancer and receives a positive test
result, what is the probability that she does have breast cancer?
A1 is cancer, A2 is no cancer, C is a positive test result.
P(pos | cancer ) P(cancer )
P(cancer | pos) =
P(pos | cancer ) P(cancer ) + P(pos | no cancer ) P(no cancer )
0.8(0.0004)
= 0.3%
0.8(0.004) + 0.1(0.9996)
Copyright© Nahid Sultana 2017-2018 12/22/2022
Bayes’s Rule (Cont…)
55
➢ If a sample space is decomposed in k disjoint events, A1, A2, … , Ak
none with a null probability and P(A1) + P(A2) + … + P(Ak) = 1
➢ And if C is any other event such that P(C) is not 0 or 1, then:
However, it is often intuitively much easier to work out answers with a
probability tree than with these lengthy formulas.
Copyright© Nahid Sultana 2017-2018 12/22/2022