0% found this document useful (0 votes)
2 views72 pages

STA 121 LESSON 7 - Chapter 2 Joint Marginal Conditional Probability 2023

Chapter 2 of STA 121 introduces the concepts of joint, marginal, and conditional probabilities, emphasizing their importance in understanding statistics. It provides examples, including contingency tables, to illustrate how to calculate these probabilities in various scenarios. The chapter also discusses the independence of events and how it affects probability calculations.

Uploaded by

Rati K. Diteko
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views72 pages

STA 121 LESSON 7 - Chapter 2 Joint Marginal Conditional Probability 2023

Chapter 2 of STA 121 introduces the concepts of joint, marginal, and conditional probabilities, emphasizing their importance in understanding statistics. It provides examples, including contingency tables, to illustrate how to calculate these probabilities in various scenarios. The chapter also discusses the independence of events and how it affects probability calculations.

Uploaded by

Rati K. Diteko
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 72

STA 121: ELEMENTS OF PROBABILITY

CHAPTER 2
INTRODUCTION TO
PROBABILITY
STA 121: Elements
of Probability

STA 121 TEST 1:


30/03/2022
2.4 Marginal, Joint and Conditional probability

Sometimes our interest may be in determining


probabilities of events that result from combining other
events in various ways
In Chapter 1, we studied several types of combinations
and relationships between events:
i) Intersection of events
ii) Union of events
iii) Dependent and independent events,
iv) Complement event
Joint, Marginal and Conditional Probability

2025-06-15 STA 114 4


Probability: Joint, Marginal and Conditional
Probabilities
Probabilities represent the chances of an event x occurring.
In the classic interpretation, a probability is measured by the
number of times event x occurs divided by the total number
of trials;
In other words, the frequency of the event occurring. There
are three types of probabilities:

i. Joint Probabilities
ii. Marginal Probabilities
iii. Conditional Probabilities
2025-06-15 STA 114 5
Probability: Joint, Marginal and
Conditional Probabilities
• Probabilities may be either marginal, joint or conditional.

• Understanding their differences and how to manipulate among them is key


to success in understanding the foundations of statistics.
Example
• STA 121 students where asked:
Vote for the
woman?
Yes No Total
Male 15 20 35
Gender
Female 30 15 45
Total 45 35 80
Example

Cheated no College Exam?


Gender Yes No Total
Male 32 22 54
Female 28 18 46
Total 60 40 100
EXAMPLE
• Lansmore Company compiled and classified its workers
according to their highest qualification and work
experience. The table below show the frequencies for
categories.
Work Experience
Highest Education Qualification 5 year or less 10 years 15 years Total
Certificate 50 90 160 300
Diploma 30 120 130 280
1st Degree 100 80 40 220
Masters Degree or higher 160 30 10 200
Total 340 320 340 1000
Example: CAR type (AC & NON AC) with and without CD

Out of 100 used car lot, 70 have air conditioning (AC), 40


have a CD player (CD) and 20 of the cars have both AC and
CD player.
Summarize these information in a table.

2025-06-15 STA 121 11


Example: Example: CAR type (AC & NON AC) with and without CD

Out of 100 used car lot, 70 have air conditioning (AC), 40


have a CD player (CD) and 20 of the cars have both AC
and CD player.

These information are summarized in Table 1


CD Non-CD Total
AC
Non-AC
Total

2025-06-15 STA 114 12


Example: Example: CAR type (AC & NON AC) with and without CD

Out of 100 used car lot, 70 have air conditioning (AC), 40


have a CD player (CD) and 20 of the cars have both AC
and CD player.

These information are summarized in Table 1


CD Non-CD Total
AC 20 50 70
Non-AC 20 10 30
Total 40 60 100

2025-06-15 STA 114 13


• The first type of probability is the joint probability which is the probability of
two different events occurring at the same time.
• That is the probability that the intersection of two events occurs
• Notation:
Either “P(A and B)” or “P(A  B)” or “P(A B)”
2.4.2 Conditional probability

In probabilistic language, conditioning means updating


probabilities of events to take into account new information
about what has already happened

When a number of events say E1 and E2 are defined in a


sample space, we may be interested in finding the probability
that E2 occurs given that E1 has occurred or the probability
that E1 occurs given that E2 has occurred.

This probability is known as conditional probability of E2 given


E1 or E1 given E2 and denoted by P (E2 │E1) or P (E1 │ E2).
2.4.2 Conditional probability

For example, consider an experiment, which involves drawing


balls from a bag containing say, 4 white, 6 green and 2 black
balls.
Suppose we define E1 to be the event of drawing a white ball
and E2 the event of drawing a green ball
The probability will depend on whether we are drawing the
balls
with replacement (that is, drawing a ball from the bag,
examining the colour and putting it back into the bag before
the next draw)
OR
without replacement ( that is , drawing a ball , examining
the colour, and keeping the ball out of the bag before the next
draw is made)
Conditional probability

Suppose we draw without replacement


If first ball drawn is white, its probability, P (E 1) = 4/12 = 1/3.
This ball is then put aside.

If second ball drawn is green, then the probability is 6/11,


since we now have eleven balls altogether in the bag out of
which six are green.
This second probability of 6/11 is actually conditioned on
what had previously happened.

Thus, probability 6/11 is actually the conditional probability of


E2 given E1, that is, P (E2 │ E1.).
Conditional probability

Definition: If E1 and E2 are events defined in a certain


probability space (that is, events that take place during
a certain random experiment), the conditional
probability of E1 given E2 or E2 given E1 is defined by

• P (E1│E2) = P (E1∩ E2)/P (E2), provided P (E2) > 0

Or

• P(E2│E1)= P(E1∩E2)/P(E1), provided P(E1)> 0


Vote for the
woman?
Yes No Total
Male 15 20 35
Gender
Female 30 15 45
Total 45 35 80
Vote for the woman?
Yes No Total
Male 15=a 20=b 35=(a+b)
Gender
Female 30=c 15=d 45=(c+d)
Total 45=(a+c) 35=(b+d) 80=(a+b+c+d)=n
Grand total
To obtain the probabilities
Vote for the woman?

Yes No Marginal Prob

Male 0.19=a/n 0.25=b/n 0.44=(a+b)/n


Gender

Female 0.38=c/n 0.19=d/n 0.56=(c+d)/n

Marginal 0.56=(a+c)/n 0.44=(b+d)/n 1


Vote for the woman?

Yes No Marginal Prob

Male 0.19 0.25 0.44


Gender

Female 0.38 0.19 0.56

Marginal 0.56 0.44 1


Vote for the woman?
Marginal
Yes No Prob

Male P(Male and Yes) P(Male and No) P(Male)


Gender
Female P(Female and Yes) P(Female and No) P(Female)
Marginal
Prob P( Yes) P(No) 1
Vote for the woman?

Yes No Marginal Prob

Male 0.19 0.25 0.44


Gender

Female 0.38 0.19 0.56

Marginal 0.56 0.44 1


a) What is the probability that the student selected at random is a
female?
b) What is the probability that student selected at random will be
male and vote for women president?
c) What is the probability that student selected at random will be a
female given that she did not vote for women president?
Vote for the woman?
Marginal
Yes No Prob

Male P(Male and Yes) P(Male and No) P(Male)


Gender
Female P(Female and Yes) P(Female and No) P(Female)
Marginal
Prob P( Yes) P(No) 1
• The first type of probability is the joint probability which is the
probability of two different events occurring at the same time.
• That is the probability that the intersection of two events occurs
• Notation:
Either “P(A and B)” or “P(A  B)” or “P(A B)”
Conditional probability
Example 2.8 (Contingency Table): The 300 employees of a small
company were cross classified according to their age and work category
as shown in the 2x2 contingency table (also called cross table) below
Age(years) work category Total
Production Sales Office
<30 50 2 50 102

30-45 70 26 48 144
>45 36 4 14 54
Total 156 32 112 300

An employee is selected at random from this population. Calculate the


probability that the employee is
(i) Under 30 years of age
(ii) A sales worker
(iii) An office worker and above 45 years of age
(iv) Over 45 years of age given that he is an office worker
(v) A production officer given that he is between 30 and 45 years of age
Conditional probability
Solution
(i) Number of employees under 30 years of age = 102
P (employee is under 30 years) = 102/300 = 0.34
(ii) Number of employees that are sales workers = 32
P (employee is a sales worker) = 32/300 -= 0.107
(iii) Number of employee that are office workers and above 45 years = 14
P(employee is an office worker and above 45 years) = 14/300 = 0.047
(iv) P (employee is over 45 years/he is an office worker)
= P (employee over 45 years and an office worker) / P (employee is an office
worker)

=

(v) P (employee a production officer and between 30 and 45 years) = 70/300 =


0.233
P (employee is between 30 and 45 years) = 144/300 = 0.48
Hence, P (employee is a production officer/he is between 30 and 45 years)
= 0.233 / 0.48 = 0.485
EXAMPLE
• Lansmore Company compiled and classified its workers according to their
highest qualification and work experience. The table below show the
frequencies for categories.
Work Experience
Highest Education Qualification 5 year or less 10 years 15 years Total
Certificate 50 90 160 300
Diploma 30 120 130 280
1st Degree 100 80 40 220
Masters Degree or higher 160 30 10 200
Total 340 320 340 1000
• Convert the above information into probabilities.
a) What is the probability that the employee has Masters Degree or higher and
worked for 5 years or less?
b) What is the probability that the employee selected has at least Diploma as the
highest education qualification?
c) If an employee selected has Diploma as the highest qualification, what is the
probability that he/she worked for 15 years?
d) What is the probability that the employee has either 10 years work experience
or certificate as highest qualification?
2.5 Independence
Two events are said to be independent if the occurrence of one of
the events does not affect the probability of occurrence of the other
 Statistically, two events A and B defined on the same sample space
are independent if occurrence of B (A) does not affect probability of
occurrence of A (B)
i.e., iff
Note: From definition of conditional probability,

and
So, for to be equal to , must be equal to
Similarly. for then .
Therefore, alternative condition for independence of two events says
that two events A and B are statistically (stochastically) independent
iff

This is called the multiplication rule of statistical independence


Independence
For three or more events, say, A, B, C to be mutually
independent, the following conditions must be satisfied:
(i) The events must be pair-wise independent, that is,
 P(A∩B) = P(A)P(B); P(A∩C) = P(A)P(C), P(B∩C) = P(B)P(C)
and
(ii) P(A∩B∩C) = P(A)P(B)P(C)
or more generally, for the events to be mutually independent

If the events are not independent, they are said to be dependent.
Independence
Example 2.9:
A bag contains cards numbered 1, 2, 3,....,
12. Define A to be the set of numbers smaller
than 5 and B the set of numbers between 3
and 8 (both numbers inclusive). Determine
P(A),P(B),P(A∩B) and show that A and B are
mutually independent.
Independence
Example 2.9: A bag contains cards numbered 1, 2, 3,...., 12. Define A
to be the set of numbers smaller than 5 and B the set of numbers
between 3 and 8 (both numbers inclusive). Determine P(A),P(B),P(A∩B)
and show that A and B are mutually independent.
Solution
S = { 1,2,3,4,5,6,7,8,9,10,11,12 }
A = {1,2,3,4} ; B = {3,4,5,6,7,8 }
A∩B = {3, 4}
Hence,
 P (A) = n (A) / n(S) = 4/12 =1/3
 P (B) = n (B) / n(S) = 6/12 =1/2
 P (A∩B) = n (A∩B)/n(S) = 2/12 = 1/6
 P (A) P (B) = (1/3) (1/2) = 1/6
 Therefore, A and B are mutually independent.
Note: Independence and Mutually exclusive are different.
Exercise: Verify
Conditional probability
Example 2.8 (Contingency Table): The 300 employees of a
small company were cross classified according to their age and
work category as shown in the 2x2 contingency table (also called
cross table) below work category
Age(years) Total
Production Sales Office
<30 50 2 50 102

30-45 70 26 48 144
>45 36 4 14 54
Total 156 32 112 300

Are the events ‘employee is an office worker’ and ‘employee is


above 45 years of age’ statistically independent?
Independence
Example 2.10: Refer to Table in Example 2.8
Are the events ‘employee is an office worker’ and ‘employee is above 45
years of age’ statistically independent?
Solution: Let O be event that employee is an office worker and F
be event that employee is above 45 years of age
Events O and F are statistically independent iff (if and only if)

And as means that , we conclude that the events ‘employee is


an office worker’ and ‘employee is above 45 years of age’ are not
independent or are dependent
3 Conditional Probabilities
Conditional Probability and Independence

• If events A and B are independent,


then P(A  B) = P(A) x P(B)

2025-06-15 STA 114 56


P(AUB)

A B
Example
B
A

P(AB) P(AcB)
P(ABc)

P(A  B) = P(ABc) +P (AB) + P(AcB)


Example:
Let P(ABc) =0.4, P(AcB) =0.3 and P(A  B)=0.75
What is P (AB)
What is P (A|B)
Ask Student to solve the question
(a) A coin is flipped twice. If we assume that all the possible outcomes of this experiment are equally
likely,

Calculate the conditional probability that both flips result in heads (H) given that the first flip results in
heads.

(b)A department store manager wishes to investigate whether the method of payment chosen by
customers is related to the size of their purchases .The manager has cross-classified a sample of 250
customer purchases, as shown in the following table.

Method of payment
Size of purchase Cash Credit Card
Less than P200 51 31
P200 or more 65 103

One of these 250 customers is selected at random.

i) What is the probability that the customer selected made a purchase of less than P200?
ii) Are the events “Payment by cash” and “Purchase of less than P200” mutually exclusive?
Verify your answer.
iii) Are the events “Payment by cash” and “Purchase of less than P200” independent? Verify
your answer.

2025-06-15 STA 114 63


Discuss Solution of the question

i) Method 1

Let B denote event that both flips result in heads


F denote event that first flip results in heads
Required

2025-06-15 STA 114 64


Discuss Solution of the question

S={ሼ𝐻1𝐻2, 𝐻1𝑇2,𝑇1𝐻2,𝑇1𝑇2ሽ
Method 2: Using Joint and Marginal Probabilities Table
n(S)=4
Events:
H1: Head for the first flip
H2: Head for the second flip
T1: Tail for the first flip
T2: Tail for the second flip

Joint and Marginal Probabilities


Coin 2
Coin 1 H2 T2 Total
H1 P(H1∩H2)=0.25 P(H1∩T2)=0.25 P(H1)=0.0.5
T1 P(T1∩H2)=0.25 P(T1∩T2)=0.25 P(T1)=0.5
Total P(H2)=0.5 P(T2)=0.5 1

The conditional probability that both flips result in heads (H) given that the first flip results in
heads: P(H2| H1) = P(H1 ∩ H2)/ P(H1) = 0.25/0,50 = 1/2

2025-06-15 STA 114 65


Discuss Solution of the question
(b)
Events
P1: Purchase less than P200
P2: Purchase P200 or more
C1: Cash Payment
C2: Credit Card payment

Joint and Marginal Probabilities


Method of payment
Size of purchase Cash (C1) Credit Card (C2) Total
Less than P200(P1) P(P1∩C1)=51/250 P(P1∩C2)=31/250 P(P1)=82/250
P200 or more(P2) P(P2∩C1)=65/250 P(P2∩C2)=103/250 P(P21)=168/250
Total P(C1)=116/250 P(C2)=134/250 1

2025-06-15 STA 114 66


Discuss Solution of the question
i)

ii) Here C1 is the event that payment is by cash and P1 is the


event that purchase is less than P200
Two events C1 and P1 will be mutually exclusive iff
Here, , so C1 and P1 are not mutually exclusive.

iii) Two events C1 and P1 are independent iff


, so C1,P1 are not independent

2025-06-15 STA 114 67


EXERCISES
Q1.
If A and B are any two events [subset of sample space S] and are not disjoint, then P(A  B) = ?
Q2.
In a survey of MBA students, the following data were obtained on ‘student’s first reason for
application to the University in which they obtained their first degree”.

Reasons for applying


Enrolment Status School Quality Tuition Fee Other Total
Full time 421 393 76 890
Part time 400 593 46 1039
Totals 821 986 122 1929

Use the table to answer the following questions.

i) If a student goes full time, what is the probability that School Quality is the first reason for
choosing a school?
ii) What is the probability of Tuition Fee being the first reason for choosing school, given that an
applicant enrolled part time?
iii) What is the probability that an applicant will consider other reasons not listed as the first reason
for choosing a school?
iv) Are the events “Full-Time” and “Tuition Fee” independent?
(Question B2b-2018)

2025-06-15 STA 114 68


EXERCISES
Q1.
A restaurant chain routinely surveys customers and, among other questions, asks each
customer whether he or she would return and, to rate the quality of food. Summarising
hundreds of thousands of questionnaires produced the table of joint probabilities below.

Rating Customer will return Customer will not return


Poor 0.02 0.10
Fair 0.08 0.09
Good 0.35 0.14
Excellent 0.20 0.02

i) What proportion of customers say that they will return?


ii) What proportion of customers say that they will return and rate the restaurant’s food
as good?
iii) What proportion of customers who say that they will return rate the restaurant’s food
as good?
iv) What proportion of customers who rate the restaurant’s food as good say that they
will return?
v) Are the rating of the quality of food and whether or not the customer returns to the
restaurant independent?
[Question B3c-2016]

2025-06-15 STA 114 69


EXERCISES
Q1.
The promotional status of a major Metropolitan police force in the Greater Johannesburg Suburb is
given below. The police force consists of 1200 officers: 96 men and 240 women. Over the last 2
years, 324 officers on the police force have been awarded promotion.

Officer Promoted Not promoted Total


Men 288 672 960
Women 36 204 240
Total 324 876 1200

Let ; M be an event that an officer is a man


W be an event that an officer is a woman
B be an event that an officer is promoted

Find the following:

i) P( M  B)
ii ) P ( B / W )
iii ) P (W  B )
[Question B5a-2015]

2025-06-15 STA 114 70


EXERCISES
Q1.
The promotional status of a major Metropolitan police force in the Greater Johannesburg Suburb is
given below. The police force consists of 1200 officers: 960 men and 240 women. Over the last 2
years, 324 officers on the police force have been awarded promotion.

Officer Promoted Not promoted Total


Men 288 672 960
Women 36 204 240
Total 324 876 1200

Let M=event that an officer is a man


W= event that an officer is a woman
B= event that an officer is promoted
Find the following:
i) P( M  B)
ii ) P (W  B )
iii ) P ( B / M )
iv) P ( B / W )
v) P (W  B )
[Question B3.2-2010]

2025-06-15 STA 114 71


(iii) Final Mark: CA and Final Examination in the ratio of 2:3 i.e 40% and 60% respectively.Passing
mark is 50 and above.

For Example:
Test 1 Test 2 CA [Average of Exam. Final Marks
(100 Marks) (100 Marks) Test 1 and Test (100 Marks) [0.40*CA+0.60 Exam]
2 Marks] (100 Marks)
(100 Marks)
80 70 75 80 0.40*75+0.60*80
=30+48=78

2025-06-15 STA 114 72

You might also like