1 Class Probability
1 Class Probability
1 Class Probability
Distributions
What is Probability?
Probability
Population Sample
Statistics
Basic Concepts…
• Law of large numbers - As the number of repetitions
of a probability experiment increases, the proportion
with which a certain outcome is observed gets closer
to the probability of the outcome.
• An experiment is the process by which an
observation (or measurement) is obtained. They can
be repeated in which the results are uncertain.
• An event is an outcome of an experiment, usually
denoted by a capital letter.
– simple event
– sample space
…Basic Concepts…
2!
6 6! 6(5) 2
C 2
The order of C2 15 1
1!1!
2!4! 2(1)
the choice is ways to choose
ways to choose 2 M & Ms.
not 1 green M & M.
important!
4 4!
C1 4 4 2 =8 ways to
1!3! P(exactly
ways to choose
choose 1 red and
one red) =
1 green M&M.
1 red M & M. 8/15
Example
52 52! 52(51)(50)(49)48
There are C 5 2,598,960
5!(52 5)! 5(4)(3)(2)1
possible hands
Example
Four of a kind: 4 of the 5 cards are the same
“kind”. What is the probability of getting
four of a kind in a five card hand?
There are 13 possible choices for the kind of
which to have four, and 52-4=48 choices for the
fifth card. Once the kind has been specified, the
four are completely determined: you need all
four cards of that kind. Thus there are
13×48=624 ways to get four of a kind.
The probability=624/2598960=.000240096
and
Example
One pair: two of the cards are of one kind, the
other three are of three different kinds.
What is the probability of getting one pair in a
five card hand?
A B A B
Event Relations
The intersection of two events, A and B, is
the event that both A and B occur when the
experiment is performed. We write A B.
S
A B A B
S
AC
A
Example
Select a student from the classroom and
record his/her hair color and gender.
– A: student has brown hair
– B: student is female
– C: student is male Mutually exclusive; B = CC
What is the relationship between events B and C?
•AC: Student does not have brown hair
•BC: Student is both male and female =
•BC: Student
is either male and female = all
students = S
Calculating Probabilities for
Unions and Complements
• There are special rules that will allow you to
calculate probabilities for composite events.
• The Additive Rule for Unions:
• For any two events, A and B, the probability of
their union, P(A B), is
P ( A B ) P ( A) P ( B ) P ( A B )
A B
Example: Additive Rule
Example: Suppose that there were 120
students in the classroom, and that they
could be classified as follows:
A: brown hair Brown Not Brown
P(A) = 50/120 Male 20 40
B: female Female 30 30
P(B) = 60/120
P(AB) = P(A) + P(B) – P(AB)
= 50/120 + 60/120 - 30/120
= 80/120 = 2/3 Check: P(AB)
= (20 + 30 + 30)/120
Example: Two Dice
A: dice add to 3
B: dice add to 6
P(AC) = 1 – P(A)
Example
Select a student at random from
the classroom. Define:
A: male Brown Not Brown
P(A) = 60/120 Male 20 40
B: female Female 30 30
P(B) = ?
“given”
Example 1
Toss a fair coin twice. Define
– A: head on second toss
– B: head on first toss
P(A|B) = ½
HH 1/4 P(A|not B) = ½
H 1/4
T P(A) does not A and B are
T 1/4 change, whether independent!
H B happens or
TT 1/4 not…
Example 2
A bowl contains five M&Ms®, two red and three blue.
Randomly select two candies, and define
– A: second candy is red.
– B: first candy is blue.
A Sk
A
A S1
Sk
S2….
We know: P( M ) P( H | M )
P( M | H )
P(F) = .4 P( M ) P( H | M ) P( F ) P( H | F )
P(M) = 9.5 .51 (.12)
.61
P(H|F) = 1.0 .51 (.12) .49 (.08)
P(H|M) = 8.1
2
Example
Suppose a rare disease infects one out of
every 1000 people in a population. And
suppose that there is a good, but not perfect,
test for this disease: if a person has the
disease, the test comes back positive 99% of
the time. On the other hand, the test also
produces some false positives: 2% of
uninfected people are also test positive. And
someone just tested positive. What are his
chances of having this disease?
Example
Define A: has the disease B: test positive
We know:
P(A) = .001 P(Ac) =.999
P(B|A) = .99 P(B|Ac) =.02
2
“Psychology of the Scientist: Work Related Attitudes of U.S. Scientists”
(Psychological Reports (1991): 443 – 450).
Example
If all the cells are divided by the total number
surveyed, 778, the resulting table is a table of
empirically derived probabilities.
Job Satisfaction
Satisfied Unsatisfied Total
L College 0.095 0.055 0.150
E
V High School 0.288 0.220 0.508
E
L Elementary 0.162 0.180 0.342
Total 0.545 0.455 1.000
Job Satisfaction
Satisfied Unsatisfied Total
P(C S) 0.095
P(C) 0.150 and P(C | S) 0.175
P(S) 0.545
P(CS)?
We must have
0 p ( x) 1 and p ( x) 1
Example
Toss a fair coin three times and
define x = number of heads.
x x p(x)
HH
1/8 3 P(x = 0) = 1/8 0 1/8
H
HHT P(x = 1) = 3/8 1 3/8
1/8 2 P(x = 2) = 3/8
HTH 2 3/8
1/8 2 P(x = 3) = 1/8
THH 3 1/8
HTT 1/8 2
Probability
THT 1/8 1
Histogram for
TTH 1/8 1 x
TTT 1/8 1
Example
Toss two dice and define
x = sum of two dice. x p(x)
2 1/36
3 2/36
4 3/36
5 4/36
6 5/36
7 6/36
8 5/36
9 4/36
10 3/36
11 2/36
12 1/36
Probability Distributions
Probability distributions can be used to describe
the population, just as we described samples in
Chapter 2.
– Shape: Symmetric, skewed, mound-shaped…
– Outliers: unusual or unlikely measurements
– Center and spread: mean and standard
deviation. A population mean is called and a
population standard deviation is called
The Mean
and Standard Deviation
Let x be a discrete random variable with
probability distribution p(x). Then the mean,
variance and standard deviation of x are given
as
Mean : xp( x)
2 2
Variance : ( x ) p ( x)
2
Standard deviation :
Example
Toss a fair coin 3 times and record x
the number of heads.
x p(x) xp(x) (x-2p(x) 12
0 1/8 0 (-1.5)2(1/8) xp( x) 8 1.5
1 3/8 3/8 (-0.5)2(3/8)
2 3/8 6/8 (0.5)2(3/8) 2 2
( x ) p ( x)
3 1/8 3/8 (1.5) (1/8)
2
2
.28125 .09375 .09375 .28125 .75
.75 .688
Example
The probability distribution for x the
number of heads in tossing 3 fair coins.
Symmetric;
• Shape?
mound-
• Outliers? shaped
None
• Center? = 1.5
• Spread? = .688
Key Concepts
I. Experiments and the Sample Space
1. Experiments, events, mutually exclusive events,
simple events
2. The sample space
II. Probabilities
1. Relative frequency definition of probability
2. Properties of probabilities
a. Each probability lies between 0 and 1.
b. Sum of all simple-event probabilities equals 1.
3. P(A), the sum of the probabilities for all simple events in A
Key Concepts
III. Counting Rules
1. mn Rule; extended mn Rule
2. Permutations: Prn n!
(n r )!
n!
Crn
3. Combinations: r!(n r )!
IV. Event Relations
1. Unions and intersections
2. Events
a. Disjoint or mutually exclusive: P(A B) 0
b. Complementary: P(A) 1 P(AC )
Key Concepts
P( A B)
P( A | B)
3. Conditional probability: P( B)
4. Independent and dependent events
5. Additive Rule of Probability:
P( A B) P( A) P( B) P( A B)