Ch02 - Probability
Ch02 - Probability
A
Examples
What is A B ?
S
B
A
Basic Rules of Probability
To any event A, we assign a number P(A) called the
probability of the event A
0 P(A) 1
P(A) = 0 (null or impossible event – cannot occur)
P(A) = 1 (certain event – occurs every time)
P(S) = 1 (something in the sample space must occur!)
If S consists of N equally likely outcomes, then each outcome
must have probability 1/N, and an event A consisting of k
outcomes has P(A) = k/N
P(AC) = 1 – P(A)
Ex: for two 6-sided dice,
P(at least one six) = 11/36
Example: Aluminum Rods
An extrusion die is used to produce aluminum rods. Specifications are given
for the length and diameter of the rods. For each rod, the length is classified
as too short, too long, or OK, and the diameters is classified as too thin, too
thick, or OK. In a population of N = 1000 rods, the number of rods in each
class are as follows:
Diameter
Length Too Thin OK Too Thick
Too Short 10 3 5
OK 38 900 4
Too Long 2 25 13
If a rod is sampled at random, what is the probability that the rod is:
too short?
B
Use with union (A or B):
P ( A B ) P ( A) P ( B ) P ( A B )
If A and B are disjoint events, then P ( A B ) 0
so
P ( A B ) P ( A) P ( B )
Addition Rule (Example)
Ex: For two 6-sided dice, let
A = {get a “6” on the first die} and
B = {get a “6” on the second die}
0.2 0.3
A
B
0.2 A
0.3
Diameter
Length Too Thin OK Too Thick
Too Short 10 3 5
OK 38 900 4
Too Long 2 25 13
What is the probability that a rod will have a diameter that is OK,
given that the length is too long?
Independent Events
P ( A | B ) P ( A) P( B | A) P( B )
P ( A B ) P ( A) P ( B )
Probability Example
A couple plans to have children until they have a boy or until
they have three children, whichever comes first.
Assume P(boy) = P(girl) = ½ for each birth
Assume gender of successive children is independent so
knowing the gender of one child does not affect the gender of
any successive child
What is the probability they have a boy? Uses independence
S = {B, GB, GGB, GGG } assumption here!
P(B) = ½;
P(GB) = P(G first and then B) = P(B|G)P(G) = P(B) P(G) = ¼
P(GGB) = P(G) P(G) P(B) = 1/8
P(GGG) = P(G) P(G) P(G) = 1/8
P(have a boy) = P({ B, GB, GGB }) = 1 – P(GGG) = 7/8
Example: Aluminum Rods
(redux
2)
An extrusion die is used to produce aluminum rods. Specifications are given
for the length and diameter of the rods. For each rod, the length is classified
as too short, too long, or OK, and the diameters is classified as too thin, too
thick, or OK. In a population of N = 1000 rods, the number of rods in each
class are as follows:
Diameter
Length Too Thin OK Too Thick
Too Short 10 3 5
OK 38 900 4
Too Long 2 25 13
If an aluminum rod is sampled at random, find:
P(too long)
P(too long| too thin)
Are these probabilities different? Why or why not?
Partitioning B1 B2
Bayes Rule
A
AT: A T c: AcT: Ac T c:
100*(.99)=99 100*(.01)=1 99900*(.04) 99900*(.96)
=3996 =95904
P( A T ) 99
P( A | T ) 0.024
P (T ) 99 3996
Random Variables
Random variable: an uncertain numerical
quantity whose value depends on the random
outcome of an experiment
A rule that assigns one (and only one) numerical
value to each point of the sample space for a
random experiment
Convention: use capital (e.g., X) to denote the RV
(before it is observed) and lower case (e.g., x) to
denote possible or observed values
Types of Random Variables
Probability mass function
Discrete Height corresponds to probability.
Random probability
variable
X
X Continuous
Probability density function
Area corresponds to probability.
density
X
Discrete Random Variables
Discrete RVs:
can take on only a countable (but possibly infinite)
number of values
possible values form a discrete set
Examples
S={0,1}
S={0,1,2,3,…}
S={-1,5,10}
Discrete R.V. Example
Ex: roll two 6-sided dice
S = { (1,1) (1,2) (1,3) (1,4) (1,5) (1,6)
(2,1) (2,2) (2,3) (2,4) (2,5) (2,6)
(3,1) (3,2) (3,3) (3,4) (3,5) (3,6)
(4,1) (4,2) (4,3) (4,4) (4,5) (4,6)
(5,1) (5,2) (5,3) (5,4) (5,5) (5,6)
(6,1) (6,2) (6,3) (6,4) (6,5) (6,6) }
Ex: Roll two fair dice; let X be the sum of
the values on the two dice
S = { 2,3,4,5,6,7,8,9,10,11,12 }
P( X = 2) = 1/36; P( X = 7) = 6/36
For Next Time
Read through sections 3.1 – 3.5
(sections 3.6 – 3.9 for the following lecture)