Академический Документы
Профессиональный Документы
Культура Документы
These materials are altered ones from copyrighted lecture slides ( 2009 W.H.
Freeman and Company) from the homepage of the book:
The Practice of Business Statistics Using Data for Decisions :Second Edition
by Moore, McCabe, Duckworth and Alwan.
Coin toss
Two events are independent if the probability that one event occurs
on any given trial of an experiment is not affected or changed by the
occurrence of the other event.
When are trials not independent?
Imagine that these coins were spread out so that half were heads up and half
were tails up. Close your eyes and pick one. The probability of it being heads is
0.5. However, if you dont put it back in the pile, the probability of picking up
another coin and having it be heads is now less than 0.5.
Probability models
Probability models describe mathematically the outcome of random
processes and consist of two parts:
1) S = Sample Space: This is a set, or list, of all possible outcomes
of a random process. An event is a subset of the sample space.
2) A probability for each possible event in the sample space S.
= 0.5
Sample spaces
Its the question that determines the sample space.
H -
HHH
M -
HHM
H
M
M
H -
HMH
M -
HMM
S = { 0, 1, 2, 3 }
S = { HHH, HHM,
HMH, HMM, MHH,
MHM, MMH, MMM }
Note: 8 elements, 23
Probability rules
1) Probabilities range from 0
(no chance of the event) to
1 (the event has to happen).
For any event A, 0 P(A) 1
P(sample space) = 1
Venn diagram:
Sample space made up of an
event A and its complementary
Ac, i.e., everything that is not A.
Venn diagrams:
A and B disjoint
Example: If you flip two coins, and the first flip does not affect the second flip:
S = {HH, HT, TH, TT}. The probability of each of these events is 1/4, or 0.25.
The probability that you obtain only heads or only tails is:
P(HH or TT) = P(HH) + P(TT) = 0.25 + 0.25 = 0.50
Venn diagrams:
A and B disjoint
What is the probability of randomly drawing either an ace or a heart from a deck of
52 playing cards? There are 4 aces in the pack and 13 hearts. However, 1 card is
both an ace and a heart. Thus:
P(ace or heart) = P(ace) + P(heart) P(ace and heart)
= 4/52 + 13/52 - 1/52 = 16/52 .3
Venn diagram:
Event A and event B. The intersection
represents the event {A and B} and
outcomes common to both A and B.
If two events A and B are independent, the event that A does not
occur is also independent of B.
If A and B are disjoint, then the fact that A occurs tells us that B
cannot occur. So A and B are not independent.
M&M candies
If you draw an M&M candy at random from a bag, the candy will have one
of six colors. The probability of drawing each color depends on the proportions
manufactured, as described here:
Color
Probability
Brown
Red
Yellow
Green
Orange
Blue
0.3
0.2
0.2
0.1
0.1
A 6-sided fair die: each side has the same chance of turning up
Dice
You toss two dice. What is the probability of the outcomes summing to 5?
This is S:
{(1,1), (1,2), (1,3),
etc.}
There are 36 possible outcomes in S, all equally likely (given fair dice).
Thus, the probability of any one of them is 1/36.
P(the roll of two dice sums to 5) =
P(1,4) + P(2,3) + P(3,2) + P(4,1) = 4 / 36 = 0.111
Example: A couple wants three children. What are the arrangements of boys (B)
and girls (G)?
Genetics tell us that the probability that a baby is a boy or a girl is the same, 0.5.
Sample space: {BBB, BBG, BGB, GBB, GGB, GBG, BGG, GGG}
All eight outcomes in the sample space are equally likely.
The probability of each is thus 1/8.
Each birth is independent of the next, so we can use the multiplication rule.
Example: P(BBB) = P(B)* P(B)* P(B) = (1/2)*(1/2)*(1/2) = 1/8
Conditional probability
Conditional probabilities reflect how the probability of an event can
change if we know that some other event has occurred/is occurring.
Example: The probability that a cloudy day will result in rain is different if
you live in Los Angeles than if you live in Seattle.
P ( A and B )
P ( B | A)
P ( A)
Independent Events
Recall: A and B are independent when they have no influence on each
others occurrence.
Two events A and B that both have positive probability are
independent if P(B|A) = P(B)
The
P(ace) = 4/52
Tree diagrams
Conditional probabilities can get complex, and it is often a good strategy
to build a probability tree that represents all possible outcomes
graphically and assigns conditional probabilities to subsets of events.
Tree diagram for chat room
habits for three adult age
groups A1, A2 & A3.
Internet
user
0.47
P(A1|C ) = 0.47
P(A1 and C) = P(C|A1)P(A1) = 0.136.
P(chatting) = P(C and A1) + P(C and A2) + P(C and A3)
= 0.136 + 0.099 + 0.017 = 0.252
About 25% of all adult Internet users visit chat rooms.
Disease
incidence
0.0004
Positive
Cancer
0.2
Mammography
0.9996
0.1
False positive
Positive
No cancer
Incidence of breast
cancer among
women ages 2030
0.9
Diagnosis
specificity
Negative
Mammography
performance
She could either have a positive test and have breast cancer or have a positive
test but not have cancer (false positive).
Diagnosis
sensitivity 0.8
Disease
incidence
Positive
Cancer
0.0004
0.2
Mammography
0.1
0.9996
Negative
False negative
Positive
False positive
No cancer
Incidence of breast
cancer among
women ages 2030
0.9
Diagnosis
specificity
Negative
Mammography
performance
Possible outcomes given the positive diagnosis: positive test and breast cancer
or positive test but no cancer (false positive).
0.3%
0.0004*0.8 0.9996*0.1
P (cancer | pos )
This value is called the positive predictive value, or PV+. It is an important piece
of information but, unfortunately, is rarely communicated to patients.
Bayess rule
An important application of conditional probabilities is Bayess rule. It is
the foundation of many modern statistical applications beyond the
scope of this textbook.
* If a sample space is decomposed in k disjoint events, A1, A2, , Ak
none with a null probability but P(A1) + P(A2) + + P(Ak) = 1,
* And if C is any other event such that P(C) is not 0 or 1, then:
If a woman in her 20s gets screened for breast cancer and receives a positive test
result, what is the
Disease
incidence
probability that
she does have
Diagnosis
sensitivity 0.8
Positive
Cancer
0.0004
breast cancer?
0.2
Mammography
0.1
0.9996
Negative
False negative
Positive
False positive
No cancer
Incidence of breast
cancer among
women ages 2030
0.9
Diagnosis
specificity
Negative
Mammography
performance
0.3%
0.8*0.0004 0.1*0.9996
P(cancer | pos)
Random variable
A random variable is a variable whose value is a numerical outcome
of a random phenomenon.
A couple want three children. We define the random variable X as the
number of girls they may get (or equivalently number of boys that they may
get).
Probability distributions
F(x)
1/8
1/8
3/8
4/8
3/8
7/8
1/8
8/8 =1
distribution function
A basketball player shoots three free throws. The random variable X is the
number of baskets successfully made.
H H
HHH
M -
HHM
H -
HMH
H
M
M
M -
HMM
Value of X
Probability
1/8
3/8
3/8
1/8
MMM
HMM
MHM
MMH
HHM
HMH
MHH
HHH
A basketball player shoots three free throws. The random variable X is the
number of baskets successfully made.
What is the probability that the player
Value of X
Probability
1/8
3/8
3/8
1/8
MMM
HMM
MHM
MMH
HHM
HMH
MHH
HHH
What is the probability that the player successfully makes fewer than three
baskets?
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
Example
To study the age structure of the people in Ume, a random sample of 90
people was taken and recorded their : 23 people were less than 21yrs, 30
people were less than 36yrs, 15 people were less than 51yrs, 12 people were
less than 71yrs and 10 people were 71yrs or older
Age
Frequency
Relative
frequency
Cumulative
relative
frequency
020
23
0.26
0.26
2135
30
0.33
0.59
3650
15
0.17
0.76
5170
12
0.13
0.89
71
10
0.11
1.00
Total
90
1.00
X=
Value of X
Probability f(x)
0.26
0.26
0.33
0.59
0.17
0.76
0.13
0.89
0.11
1.00
1.00
MMM
HMM
MHM
MMH
HHM
HMH
MHH
HHH
Value of X
Probability
1/8
3/8
3/8
1/8
A basketball player shoots three free throws. The random variable X is the
number of baskets successfully made.
Value of X
Probability
1/8
3/8
3/8
1/8
The mean of X is
= (0*1/8) + (1*3/8) + (2*3/8) + (3*1/8)
= 12/8 = 3/2 = 1.5
A basketball player shoots three free throws. The random variable X is the
number of baskets successfully made.
X = 1.5.
2
The variance of X is
Value of X
Probability
1/8
3/8
3/8
1/8
Binomial setting
Binomial distributions are models for some categorical variables,
typically representing the number of successes in a series of n trials.
The observations must meet these requirements:
Each observation falls into just one of 2 categories: success and failure.
Binomial distribution
The distribution of the count X of successes in the binomial setting is the
binomial distribution with parameters n and p: B(n,p).
The parameter n is the total number of observations.
The parameter p is the probability of success on each observation.
The count of successes X can be any whole number between 0 and n.
Binomial probabilities
The number of ways of arranging k successes in a series of n
observations (with constant probability p of success) is the number of
possible combinations (unordered sequences).
This can be calculated with the binomial coefficient:
n!
n n C
k
k
k!(n k )!
Where k = 0, 1, 2, ..., or n.
Binomial formulas
Note that 0! = 1.
P ( X k ) n p k (1 p ) n k
k
X
0
1
2
P(X)
n
C0 p0qn = qn
C1 p1qn-1
C2 p2qn-2
Total
Cx pkqn-k
Cn pnq0 = pn
1
The values of p that appear in Table C are all 0.5 or smaller. When
the probability of a success is greater than 0.5, restate the problem
in terms of the number of failures.
Color blindness
The frequency of color blindness (dyschromatopsia) in the
Caucasian American male population is estimated to be
about 8%. We take a random sample of size 25 from this population.
What is the probability that exactly five individuals in the sample are color blind?
a)
np
npq np(1 p)
b)
c)
Poisson distribution
where
e 2.72
e k
P( X k )
k!
e 2 2 0
P ( X 0)
e 2 0.135
0!
P ( X 1)
0!
0.271