Download as pdf or txt
Download as pdf or txt
You are on page 1of 67

Eng.

Dana Hisham Qadan


 Learning Objectives:
 To learn the concept of the sample space
associated with a random experiment.
 To learn the concept of an event associated
with a random experiment.
 To learn the concept of the probability of an
event.
 To learn the concept of the Conditional
probability
2-1.1 Random Experiments
An experiment is the process by which an
observation (or measurement) is obtained
that generate well defined outcomes

2-1.2 Sample Spaces


The sample space is the set of all possible
outcomes of a random experiment. The
sample space is denoted as S.
2-1.3 Events
An event is an outcome of an experiment,
usually denoted by a capital letter.
An event is a subset of the sample space of a
random experiment.
When an experiment is performed, a particular event
either happens, or it doesn’t!
 Experiment 1: Tossing a coin
Possible outcomes are head or tail.
Sample space, S = {head, tail}.
or ,S = {H, T}.

 Experiment 2: Tossing a die


Possible outcomes are the numbers 1, 2, 3, 4,
5, and 6
Sample space, S = {1, 2, 3, 4, 5, 6}.

◦ A: observe an odd number


◦ B: observe a number greater than 2
 Experiment 3: Picking a card
In an experiment, a card is picked from a
stack of six cards, which spell the word
PASCAL.
Possible outcomes are P, A 1, S, C, A 2 and L.
Sample space, S = {P, A 1, S, C, A 2 L}.
There are 2 cards with the letter ‘A’

 Experiment 4 : Picking 2 marbles, one at a


time, from a bag that contains many blue and
red marbles.
Possible outcomes are: (Blue, Blue), (Blue,
Red), (Red, Blue) and (Red, Red).
Sample space, S = {(B,B), (B,R), (R,B), (R,R)}.
 Experiment 5 :
Simple Events
 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.
 Each simple event will be assigned a
probability, measuring “how often” it occurs.

 The set of all simple events of an experiment


is called the sample space, S.

 An event is a collection of one or more simple


events.
 Tossing a die :
Simple events: Sample space:
1 E1 S ={E1, E2, E3, E4, E5, E6}
2
E2
S
3 E3 •E1 •E3
4 E4 •E5
5
E5 •E2 •E4 •E6
6 E6
•Tossing a die :
–A: an odd number
–B: a number > 2 S
•E1 •E3
A •E5
B
•E2 •E4 •E6
A ={E1, E3, E5}

B ={E3, E4, E5, E6}


 Consider rolling a fair die twice and observing
the dots facing up on each roll. What is the
sample space?
 Select two marbles from a bag containing 1
white, 1 red and 2 green marbles.
1. without replacement
2. with replacement
3.together
 Two events are mutually exclusive if, when
one event occurs, the other cannot, and vice
versa.

 Two events, denoted as E1 and E2, such that


E1 ∩ E2 = Ø
are said to be mutually exclusive
•Tossing a die :

–A: observe an odd number


–B: observe a number greater than 2
Not Mutually
Exclusive
–C: observe a 6
–D: observe a 3
Mutually B and C?
Exclusive B and D?
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

A B A B
 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
 The complement of an event A consists of
all outcomes of the experiment that do not
result in event A. We write AC.

AC

A Ac =ϕ A  Ac = S
 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
•BC: Student is both male and female = 
•BC: Student is either male and female = all students = S
2-1.4 Counting Techniques
 to determine the number of outcomes in
each event and sample space .
1. Multiplication Rule (The mn rule)
2. Permutations
3. Combinations
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
m

m
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
without replacement. The total number of
simple events is:
4  3 = 12
Permutations
 The number of ways you can arrange
n distinct objects, taking them r at a time is
n!
P 
n

(n  r )!
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?
The order of the choice is 4!
important! P   4(3)(2)  24
3
4

1!
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!
Combinations
 The number of distinct combinations of n
distinct objects that can be formed, taking
them r at a time is
n!
C 
n

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
the choice is
3!(5  3)! 3(2)(1)(2)1 (2)1
3
not important!
m
mm
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?
The order of 6! 6(5) 2!
the choice is C 
6
2   15 C 
1
2
2
not important! 2!4! 2(1) 1!1!
ways to choose 2 M & Ms. ways to choose
1 green M & M.
4! 4  2 =8 ways to
C14  4 P( exactly one
1!3! choose 1 red and 1
green M&M. red) = 8/15
ways to choose
1 red M & M.
 What is the number of committee of two or
more people that can be formed from a
group of four people?

 In a clup there are seven women and five


men, a committee of three women and two
men is to be chosen, how many different
possibilities are there?
2-2.1 Probability of an Event
 The probability of an event E is equal to the
sum of the probabilities of the simple events
contained in E
 If the simple events in an experiment are
equally likely, you can calculate

nE number of simple events in E


P( E )  
N total number of simple events
 P(E) must be between 0 and 1.
◦ If event E can never occur, P(E) = 0. If event A
always occurs when the experiment is performed,
P(E) =1.
 The sum of the probabilities for all simple
events in S equals 1.

•The probability of an event E is found by


adding the probabilities of all the simple
events contained in E.
 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)
= 1/4 + 1/4 + 1/4 = 3/4
H TH 1/4
T
T TT 1/4
 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 P(at least 1 red)
1/6
m = P(RB) + P(BR)+ P(RG) + P(GR)
BR 1/6
m
m = 4/6 = 2/3
BG 1/6
m
m GB 1/6
m GR 1/6
The sample space of throwing a pair of
dice is
Event Simple events Probability

Getting sum is 3 (1,2),(2,1) 2/36


Getting sum is 6 (1,5),(2,4),(3,3), 5/36
(4,2),(5,1)
Red die show 1 (1,1),(1,2),(1,3), 6/36
(1,4),(1,5),(1,6)
Green die show 1 (1,1),(2,1),(3,1), 6/36
(4,1),(5,1),(6,1)
A family with two children is to be selected at
random, and we want to find the probability that the
family selected has one child of each gender.
Because there will always be a firstborn and a
second-born child, we will use a tree diagram to
show the possible arrangements of gender, thus
making it possible for us to determine the
probability.
Start by determining the sequence of events
involved—firstborn and second-born in this case.
Use the tree to show the possible outcomes
of the first event (shown in brown in Figure)
and then add branch segments to show the
possible outcomes for the second event

Tree Diagram Representation of Family with Two Children


Note
1. The two branch segments representing B
and G for the second-born child must be
drawn from each outcome for the firstborn
child, thus creating the “tree” appearance.

2. There are four branches; each branch


starts at the “tree root” and continues to an
“end” (made up of two branch segments
each), showing a possible outcome.

Thus,
Now let’s consider selecting a family of three
children and finding the probability of “at least
one boy” in that family.

Again the family can be thought of as a


sequence of three events, firstborn, second-
born, and third-born.

To create a tree diagram of this family, we


need to add a third set of branch segments
to our two-child family tree diagram. The
green branch segments represent the third
child
Tree Diagram Representation of Family with Three Children
Again, because the branch segments are
equally likely, assuming equal likeliness of
gender, the eight branches are then equally
likely.

The top seven branches all have one or more


boys, the equivalent of “at least one.”
Let’s consider one other question before we
leave this example.

What is the probability that the third child in


this family of three children is a girl? The
question is actually an easy one; the answer
is 0.5, because we have assumed equal
likelihood of either gender.

However, if we look at the tree diagram in


Figure , there are two ways to view the
answer.
Tree Diagram Representation of Family with Three Children
First, if you look at only the branch segments for
the third-born child, you see one of two is for a
girl in each set, thus , or 0.5.

Also, if you look at the entire tree diagram, the


last child is a girl on four of the eight branches;
thus , or 0.5.

Special
attention should always be given to the
sample space. Like the statistical population, the
sample space must be well defined.
2-2.2 Axioms of Probability

Property 1 (“A probability is always a numerical


value between zero and one.”) can be expressed
algebraically as follows:
0 ≤ each P (A) ≤ 1 or 0 ≤ each P (A) ≤ 1

1. The probability is 0 if the event cannot occur.


2. The probability is 1 if the event occurs every
time.
3. Otherwise, the probability is a fractional number
between 0 and 1.
Property 2 (“The sum of the probabilities for all
outcomes of an experiment is equal to exactly
one.”) can also be expressed algebraically:

For Property 2 to hold, the list of “all outcomes”


must be a non overlapping set of events that
includes all the possibilities (all-inclusive).

P(S) = 1
2-3.1 The Additive Rule for Unions
For any two events, A and B,
the probability of their union, A B
P(A ∪ B), is

P( A  B)  P( A)  P( B)  P( A  B)

When two events A and B are mutually


exclusive, P(AB) = 0

P( A  B)  P( A)  P( B)
 Suppose that there were 120 students in the
classroom, and that they could be classified
as follows: Brown Not Brown
A: brown hair
P(A) = 50/120 Male 20 40
B: female
P(B) = 60/120 Female 30 30

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
A: male with brown hair
P(A) = 20/120
B: female with brown hair
P(B) = 30/120 Brown Not Brown
Male 20 40

Female 30 30

A and B are P(AB) = P(A) + P(B)


mutually exclusive, = 20/120 + 30/120
so that = 50/120
2-3.2 Calculating Probabilities for
Complements AC
We know that for any event A:
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) = 1

P(AC) = 1 – P(A)
 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 = 1- 60/120 = 60/120
that
2-3.3 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.
For any two events, A and B, are dependent
P( A  B)  P( A  Bc)  P( A)  P( A  B)
 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

 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) = ½
HT 1/4
P(A) does not A and B are
TH 1/4 change, whether B independent!
TT 1/4 happens or not…
m

m m

m m
 A bowl contains fiveM&Ms®, two red and
three blue. Randomly select two candies, and
define
◦ A: second candy is red.
◦ B: first candy is blue.
P(A|B) =P(2nd red|1st blue)= 2/4 = 1/2
P(A|not B) = P(2nd red|1st red) = 1/4

P(A) does change,


depending on whether A and B are
B happens or not… dependent!
Toss a pair of fair dice. Define
◦ A: red die show 1
◦ B: green die show 1

P(A|B) = P(A and B)/P(B)


=1/36/1/6=1/6=P(A)

P(A) does not


change, whether B A and B are
happens or not… independent!
 Toss a pair of fair dice.
Define
◦ A: add to 3
◦ B: add to 6

P(A|B) = P(A and B)/P(B)


=0/36/5/6=0

P(A) does change A and B are dependent!


when B happens In fact, when B happens,
A can’t
 For any two events, A and B, the probability
that both A and B occur is

P(A B) = P(A) P(B given that A occurred)


= P(A)P(B|A)

 If the events A and B are independent, then


the probability that both A and B occur is
P(A B) = P(A) P(B)
 In a certain population to study high risk for a
heart attack, 49% of the population are
female. Also, of the female patients, 8% are
high risk. A single person is selected at
random. What is the probability that it is a
high risk female?
Define H: high risk F: female
From the example, P(F) = .49 and P(H|F)
= .08. Use the Multiplicative Rule:
P(high risk female) = P(HF)
= P(F)P(H|F) =.49(.08) = .0392
2-5.1 The Law of Total Probability
 Let S1 , S2 , S3 ,..., Sk be mutually exclusive
and exhaustive events (that is, one and only
one must happen). Then the probability of
another event A can be written as

P(A) = P(A  S1) + P(A  S2) + … + P(A  Sk)


= P(S1)P(A|S1) + P(S2)P(A|S2) + … + P(Sk)P(A|Sk)
S1

A Sk
A

A  S1
Sk
S2….

P(A) = P(A  S1) + P(A  S2) + … + P(A  Sk)


= P(S1)P(A|S1) + P(S2)P(A|S2) + … + P(Sk)P(A|Sk)
 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
multiplication rule to calculate their
intersection.
 A survey of job satisfaction2 of teachers was taken,
giving the following results

Job Satisfaction
Satisfied Unsatisfied Total
L College 74 43
E
117
V High School 224 171 395
E
L Elementary 126 140 266
Total 424 354 778
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
E
0.150
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
L College 0.095 0.055
E
0.150
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

For convenience, let C stand for the event that the


teacher teaches college, S stand for the teacher
being satisfied and so on. Let’s look at some
probabilities and what they mean.
P(C)  0.150 is the proportion of teachers who are college
teachers.

P(S)  0.545 is the proportion of teachers who are satisfied


with their job.

P(C S)  0.095 is the proportion of teachers who are college


teachers and who are satisfied with their job.
Job Satisfaction
Satisfied Unsatisfied Total
L College 0.095 0.055
E
0.150
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
P(C S)
P(C | S)  is the proportion of teachers who are
P(S) college teachers given they are satisfied.
0.095 Restated: This is the proportion of satisfied
  0.175 that are college teachers.
0.545

P(S C)
P(S | C)  is the proportion of teachers who are
P(C) satisfied given they are college teachers.
P(C S) 0.095 Restated: This is the proportion of college
  teachers that are satisfied.
P(C) 0.150
 0.632
Job Satisfaction
Satisfied Unsatisfied Total
L College 0.095 0.055
E
0.150
V High School 0.288 0.220 0.508
P(C∪S)? E
L Elementary 0.162 0.180 0.658
Total 0.545 0.455 1.000

P(C) = 0.150, P(S) = 0.545 and P(C∩S) = 0.095, so

P(C∪S) = P(C)+P(S) - P(C∩S)


= 0.150 + 0.545 - 0.095 = 0.600

Are C and S independent events?


P(C S) 0.095
P(C)  0.150 and P(C | S)    0.175
P(S) 0.545
P(C|S)  P(C) so C and S are dependent events.
 Example1: If P(A) = 0.45 , P(B) = 0.32 and
P(Ac∩B) = 0.2 . Find P(AUB)

 Example2: If P(A/B) = 0.4 , P(B) = 0.5 find:


1. P(A∩B) 2. P(Ac∩B) 3. P(Ac/B)

Example3: If P(A/B) = 0.7, P(A∩B) = 0.21


where A,B Є S are independent, Determine:
1. P(A) 2. P(B) 3. P(AUB) 4. P(Ac∩Bc)
 Example4: Suppose 2% of cotton fabric rolls
and 3% of nylon fabric rolls contains flaws of
the rolls used by a manufacturer 70% are
cotton, 30% nylon. What is the probability
that a randomly selected rolls used by
manufacturer contains flaws?

You might also like