0% found this document useful (0 votes)
4 views

CH 04

Uploaded by

Aarav Gupta
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views

CH 04

Uploaded by

Aarav Gupta
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 41

CHAPTER 4

Probability and Probability


Distributions

Copyright ©2011 Nelson Education Limited.


What is Probability?
• In Chapters 2 and 3, we used graphs and
numerical measures to describe data sets
which were usually samples.
• We measured “how often” using
Relative frequency = frequency/sample size
=f/n
• As n gets larger,
Sample Population
And “How often”
= Relative frequency Probability
Copyright ©2011 Nelson Education Limited.
Basic Concepts
• An experiment is the process by which an
observation (or measurement) is obtained.
• Experiment: Record an age
• Experiment: Toss a die
• Experiment: Record an opinion (yes, no)
• Experiment: Toss two coins

Copyright ©2011 Nelson Education Limited.


Basic Concepts

• A simple event is the outcome that is observed


on a single repetition of the experiment.
– The basic element to which probability is applied.
– One and only one simple event can occur when the
experiment is performed.

• A simple event is denoted by E with a subscript.

Copyright ©2011 Nelson Education Limited.


Basic Concepts

• Each simple event will be assigned a


probability, measuring “how often (how
likely)” it occurs.
• The set of all simple events of an
experiment is called the sample space,
S.

Copyright ©2011 Nelson Education Limited.


Example
• The die toss:
• Simple events: Sample space:
1 E1
S ={E1, E2, E3, E4, E5, E6}
2 E2
S
Die 3 E3 •E1 •E3
face
4 E4 •E5
5 E5 •E2 •E4 •E6
6 E6
Copyright ©2011 Nelson Education Limited.
Basic Concepts
• An event is a collection of one or more
simple events (a subset of sample
space) S
•The die toss: •E1 •E3 •E5
–A: an odd number A
B
–B: a number > 2 •E6
•E2 •E4
A ={E1, E3, E5}

B ={E3, E4, E5, E6}


Copyright ©2011 Nelson Education Limited.
Basic Concepts
• Two events are mutually exclusive if,
when one event occurs, the other cannot,
and vice versa.
•Experiment: Toss a die Not Mutually
–A: observe an odd number Exclusive

–B: observe a number greater than 2


–C: observe a 6 B and C?
Mutually
–D: observe a 3 Exclusive B and D?
Copyright ©2011 Nelson Education Limited.
The Probability of an Event
• The probability of an event A measures
“how often” we think A will occur. We write
P(A).
• Suppose that an experiment is performed n
times. The relative frequency for an event A
is
Number of times A occurs f
=
n n
•If we let n get infinitely large,
f
P ( A) = lim
n→  n

Copyright ©2011 Nelson Education Limited.


The Probability of an Event
• P(A) must be between 0 and 1.
– If event A can never occur, P(A) = 0. If event
A always occurs when the experiment is
performed, P(A) =1.
• The sum of the probabilities for all simple
events in S equals 1.

•The probability of an event A is found


by adding the probabilities of all the
simple events contained in A.
Copyright ©2011 Nelson Education Limited.
Finding Probabilities
• Probabilities can be found using
– Estimates from empirical studies
– Common sense estimates based on
equally likely events.

•Examples:
–Toss a fair coin. P(Head) = 1/2
–77.1% of all Canadians are identified as
Christians (C). Select a person at random.
P(C)= .771
Copyright ©2011 Nelson Education Limited.
Example

• Toss a fair coin twice. What is the


probability of observing at least one head?

1st Coin 2nd Coin Ei P(Ei)


H HH 1/4 P(at least 1 head)
H
T HT 1/4 = P(E1) + P(E2) + P(E3)
H TH 1/4 = 1/4 + 1/4 + 1/4 = 3/4
T 1/4
T TT

Copyright ©2011 Nelson Education Limited.


Example
• A bowl contains three M&Ms®, one red, one blue
and one green. A child selects two M&Ms at
random. What is the probability that at least one
is red?
1st M&M 2nd M&M Ei P(Ei)
m RB
m 1/6
m RG
1/6 P(at least 1 red)
m BR
m 1/6 = P(RB) + P(BR)+ P(RG)
m + P(GR)
BG
1/6
m = 4/6 = 2/3
m GB
1/6
m GR
1/6
Copyright ©2011 Nelson Education Limited.
Counting Rules

• If the simple events in an experiment are


equally likely, you can calculate
n A number of simple events in A
P( A) = =
N total number of simple events
number of elements in A
=
number of elements in S
• You can use counting rules to find nA
and N.
Copyright ©2011 Nelson Education Limited.
The mn Rule
• If an experiment is performed in two stages,
with m ways to accomplish the first stage and n
ways to accomplish the second stage, then
there are mn ways to accomplish the
experiment.
• This rule is easily extended to k stages, with the
number of ways equal to
n1 n2 n3 … nk

Example: Toss two coins. The total number of


simple events is:
22=4
Copyright ©2011 Nelson Education Limited.
Examples
Example: Toss three coins. The total number of
simple events is:
222=8

Example: Toss two dice. The total number of


simple events is: 6  6 = 36

Example: Two M&Ms are drawn from a dish


containing two red and two blue candies. The total
number of simple events is:
4  3 = 12

Copyright ©2011 Nelson Education Limited.


Permutations
• The number of ways you can arrange
n distinct objects, taking them r at a time is
n!
Pr =
n

(n − r )!
where n!= n(n − 1)( n − 2)...(2)(1) and 0! 1.
Example: How many 3-digit lock combinations
can we make from the numbers 1, 2, 3, and 4?
4!
The order of the choice is
important!
P = = 4(3)( 2) = 24
3
4

1!
Copyright ©2011 Nelson Education Limited.
Examples
Example: A lock consists of five parts and
can be assembled in any order. A quality
control engineer wants to test each order for
efficiency of assembly. How many orders are
there?

The order of the choice is


important!
5!
P = = 5(4)(3)( 2)(1) = 120
5
5

0!
Copyright ©2011 Nelson Education Limited.
Combinations
• The number of distinct combinations of n
distinct objects that can be formed, taking
them r at a time is n! P n
n
Cr = r
=
r!(n − r )! r!

Example: Three members of a 5-person committee must


be chosen to form a subcommittee. How many different
subcommittees could be formed?
5! 5(4)(3)( 2)1 5(4)
The order of C =
5
= = = 10
3!(5 − 3)! 3(2)(1)( 2)1 (2)1
3
the choice is
not important!
Copyright ©2011 Nelson Education Limited.
Example m
m m
m mm
• A box contains six M&Ms®, four red
and two green. A child selects two M&Ms at
random. What is the probability that exactly one
is red?
2!
6! 6(5) C = 2
=2
The order of C2 =
6
= = 15 1
1!1!
2!4! 2(1)
the choice is ways to choose
not important! ways to choose 2 M & Ms.
1 green M & M.
4!
C =
1
4
=4 4  2 =8 ways to
1!3! choose 1 red and 1 P( exactly one
ways to choose green M&M. red) = 8/15
1 red M & M.
Copyright ©2011 Nelson Education Limited.
Event Relations
• The union of two events, A and B, is the
event that either A or B or both occur when
the experiment is performed. We write
AB
S

A B A B

Copyright ©2011 Nelson Education Limited.


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.

A B A B

• If two events A and B are mutually


exclusive, then P(A  B) = 0.
Copyright ©2011 Nelson Education Limited.
Event Relations
• The complement of an event A consists of
all outcomes of the experiment that do not
result in event A. We write AC.

S
AC

Copyright ©2011 Nelson Education Limited.


Example
• Select a student randomly from the
classroom and record his/her hair color
and gender.
– A: student has brown hair
– B: student is female Mutually exclusive; B = CC
– C: student is male
•What is the relationship between events B and C?
•AC: Student does not have brown hair
•BC: Student is both male and female = 
•BC: Student is either male or female = S
Copyright ©2011 Nelson Education Limited.
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

Copyright ©2011 Nelson Education Limited.


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
Male 20 40
P(A) = 50/120
B: female Female 30 30
P(B) = 60/120
P(AB) = P(A) + P(B) – P(AB)
= 50/120 + 60/120 - 30/120
= 80/120 = 2/3 Check: P(AB)
= (20 + 30 + 30)/120
Copyright ©2011 Nelson Education Limited.
A Special Case
When two events A and B are
mutually exclusive, P(AB) = 0
and P(AB) = P(A) + P(B).
A: male with brown hair Brown Not Brown
Male 20 40
P(A) = 20/120
B: female with brown hair Female 30 30
P(B) = 30/120
A and B are mutually P(AB) = P(A) + P(B)
= 20/120 + 30/120
exclusive, so that
= 50/120

Copyright ©2011 Nelson Education Limited.


Calculating Probabilities AC
A
for Complements

• We know that for any event A:


– P(A  AC) = 0
• Since either A or AC must occur,
P(A  AC) =1
• so that P(A  AC) = P(A)+ P(AC) - P(A  AC)
=1

P(AC) = 1 – P(A)
Copyright ©2011 Nelson Education Limited.
Example

Select a student at random from


the classroom. Define:
Brown Not Brown
A: male
Male 20 40
P(A) = 60/120
B: female Female 30 30

A and B are P(B) = 1- P(A)


complementary, so that = 1- 60/120 = 60/120

Copyright ©2011 Nelson Education Limited.


Calculating Probabilities for
Intersections
• In the previous example, we found P(A  B) directly
from the table. Sometimes this is impractical or
impossible. The rule for calculating P(A  B)
depends on the idea of independent and
dependent events.

Two events, A and B, are said to be


independent if and only if the probability that
event A occurs does not change, depending on
whether or not event B has occurred.

Copyright ©2011 Nelson Education Limited.


Conditional Probabilities
• The probability that A occurs, given
that event B has occurred is called
the conditional probability of A
given B and is defined as
P( A  B)
P( A | B) = if P( B)  0
P( B)
“given”
• If A and B are independent,
P( A | B) = P( A)  P( A  B) = P( A) P( B)
Copyright ©2011 Nelson Education Limited.
Example 1
• Toss a fair coin twice. Define
– A: head on second toss
– B: head on first toss

P(A|B) = (1/4)/(1/2)= ½
HH 1/4 P(A|not B) = (1/4)/(1/2) = ½
HT 1/4
P(A) does not A and B are
TH 1/4
change, whether independent!
1/4 B happens or
TT
not…
Copyright ©2011 Nelson Education Limited.
Example 2
• A bowl contains five M&Ms®, two red and three blue.
Randomly select two candies sequentially without
replacement, and define
– A: second candy is red.
– B: first candy is blue.
m P(A|B) =P(2nd red|1st blue)= (6/20)/(12/20) = 1/2
m m P(A|not B) = P(2nd red|1st red) = (2/20)/(8/20)=1/4
m m
P(A) does change,
depending on whether
A and B are
B happens or not… dependent!

6/20= P(A∩B) ≠ P(A)P(B) =(8/20)(12/20) = 6/25


Copyright ©2011 Nelson Education Limited.
Defining Independence
• We can redefine independence in terms of
conditional probabilities:
Two events A and B are independent if and only
if
P(A|B) = P(A) or P(B|A) = P(B)
Otherwise, they are dependent.
• Once you’ve decided whether or not two events
are independent, you can use the following rule
to calculate their intersection.
Copyright ©2011 Nelson Education Limited.
Random Variables
• A quantitative variable x is a random variable if
the value that it assumes, corresponding to the
outcome of an experiment is a chance or random
event.
• Random variables can be discrete or continuous.

• Examples:
✓x = SAT score for a randomly selected student
✓x = number of people in a room at a randomly
selected time of day
✓x = number on the upper face of a randomly
tossed die
Copyright ©2011 Nelson Education Limited.
Probability Distributions for Discrete
Random Variables
• The probability distribution for a
discrete random variable x resembles
the relative frequency distributions we
constructed in Chapter 1. It is a graph,
table or formula that gives the possible
values of x and the probability p(x)
associated with each value.
We must have
0  p( x)  1 and  p( x) = 1
Copyright ©2011 Nelson Education Limited.
Example
• Toss a fair coin three times and
define x = number of heads.
x
HHH P(x = 0) = 1/8 x p(x)
1/8 3 0 1/8
HHT P(x = 1) = 3/8
1/8 2 1 3/8
P(x = 2) = 3/8
HTH 2 3/8
1/8 2 P(x = 3) = 1/8
3 1/8
THH 1/8 2
HTT 1/8 1 Probability
Histogram for x
THT 1/8 1
TTH 1/8 1

TTT 1/8 0
Copyright ©2011 Nelson Education Limited.
Probability Distributions
• Probability distributions can be used to describe
the population, just as we described samples in
Chapter 1.
– Shape: Symmetric, skewed, mound-shaped…
– Outliers: unusual or unlikely measurements
– Center and spread: mean and standard deviation. A
population mean is called m and a population standard
deviation is called s.

Copyright ©2011 Nelson Education Limited.


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 : m =  xp ( x)
Variance : s = ( x − m ) p( x)
2 2

Standard deviation : s = s 2

Copyright ©2011 Nelson Education Limited.


Example
• Toss a fair coin 3 times and
record x the number of heads.
x p(x) xp(x) (x-m)2p(x)
12
0 1/8 0 (-1.5)2(1/8) m =  xp ( x) = = 1.5
1 3/8 3/8 (-0.5)2(3/8)
8
2 3/8 6/8 (0.5)2(3/8)
3 1/8 3/8 (1.5)2(1/8) s = ( x − m ) p ( x )
2 2

s = .28125 + .09375 + .09375 + .28125 = .75


2

s = .75 = .688
Copyright ©2011 Nelson Education Limited.
Example
• The probability distribution for x the
number of heads in tossing 3 fair
coins.

Symmetric;
• Shape? mound-shaped
• Outliers? None
• Center? m = 1.5
• Spread? s = .688

m
Copyright ©2011 Nelson Education Limited.

You might also like