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

Probabilities in Contingency Table and Tree Diagram

Uploaded by

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

Probabilities in Contingency Table and Tree Diagram

Uploaded by

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

THE PROBABILITIES IN

CONTINGENCY TABLE AND


THE TREE DIAGRAM
Learning Objectives
At the end of this module, learners are expected to:
1. Apply the concepts of probability to contingency table
2. Construct and interpret a tree diagram.
Contingency Tables (Doane and Seward, 2021)
A contingency table – is a cross-tabulation of frequencies into
rows and columns. The intersection of each row and
column is a cell that shows a count of data values that lie
in a cell.
A contingency table is similar to a frequency distribution for a
single variable except that it has two variables (rows and
columns).
A contingency table with r rows and c columns has rc cells and is
called an r x c table.
Probabilities in Contingency Tables (Doane and Seward, 2021)
The table below shows a cross-tabulation of MBA program types
versus the level of college engagement of its graduates for a large business
college at a public university. The empirical study was based on a sample of
360 MBA alumni. Engagement level is measured by the MBA alumni’s
number of contracts with the college (e.g., classroom speaking, student
mentoring, or case competition judging).
Probabilities in Contingency Tables (Doane and Seward, 2021)
Based on the contingency table we can calculate relative frequencies to answer the
following question:
1. What is the probability that an MBA graduate is engaged at the lowest level?
P(E1) = 280/360 = 0.7778 or 77.78% of the MBA graduate were engaged at the lowest level

This probability approach is an example of marginal probability.


Probabilities in Contingency Tables (Doane and Seward, 2021)
Based on the contingency table we can calculate relative frequencies to answer the
following question:
2. What is the probability that an MBA graduate is from part-time program?
P(M2) = 88/360 = 0.2444 or 24.44% of the MBA graduate were from part-time program

This probability approach is an example of marginal probability.


Probabilities in Contingency Tables (Doane and Seward, 2021)
Based on the contingency table we can calculate relative frequencies to answer the following question:
3. What percent of the MBA alumni are from the part-time program and are medium level engagers?
P(M2 Ո E2) = 17/360 = 0.0472 or 4.72% of the MBA alumni are from part-time program and are
medium level engagers
In other words, there is less than a 5 percent chance that an MBA alumnus is both a graduate of
the part-time program and engaged at the medium level.

This probability approach is a Joint probability which is also marginal.


Contingency Tables (Doane and Seward, 2021)
Joint Probability P(A Ո B)– is a marginal probability that represents the intersection of two
events.
As illustrated in the previous slide, the middle cell highlighted in the table is the joint
event that a graduate is from the part-time MBA program (M2) and is also engaged at a
medium level (E2). This probability can be written as P(M2 and E2 ) or as P(M2 Ո E2). Because 17
out of 360 alumni are in this category, we calculate the joint probability as P(M2 Ո E2) = 17/360
= 0.0472. This means that, there less than 5 percent chance that an alumni is both a graduate
of the part-time program and engaged at a medium level.
Probabilities in Contingency Tables (Doane and Seward, 2021)
Based on the contingency table we can calculate relative frequencies to answer the following question:
4. What is the chance that an executive MBA alumnus is engaged at the highest level?
P(E3 | M3) = 15/37 = 0.4054 or 40.54%
There is about 40 percent chance that an executive MBA will be highly engaged.

This probability approach is called conditional probability.


Probabilities in Contingency Tables (Doane and Seward, 2021)
If we restrict the probability to a single row or column (the condition), conditional
probabilities will be calculated. As illustrated in the previous slide, restricting the probabilities
to the 37 executive alumni in the third row, the conditional probability that the MBA graduate
is engaged at a high level (E3) given that the alumnus is an executive MBA (M3). This
conditional Probability may be written as P(E3 | M3). There were highly engaged alumni out of
37 executive MBAs, so P(E3 | M3) = 15/37 = 0.4054 or 40.54%. This means that, there is about
40 percent chance that an executive MBA will be highly engaged.
Probabilities in Contingency Tables (Doane and Seward, 2021)

Recall the Independent and Dependent Events;


Probabilities in Contingency Tables (Doane and Seward, 2021)
Probabilities in Contingency Tables (Doane and Seward, 2021)
Probabilities in Contingency Tables (Doane and Seward, 2021)
Probabilities in Contingency Tables (Doane and Seward, 2021)
Probabilities in Contingency Tables (Doane and Seward, 2021)
Tree Diagram (Decision Tree)(Doane and Seward, 2021)
A Tree Diagram or Decision Tree is a visual representation of a probability space along
with a series of marginal probabilities, conditional probabilities, joint probabilities and
independent events. It is a diagram branching with connecting line, representing different
processes and relationships. Each node on the diagram represents an event and is associated
with the probability of an event. This concept of a tree diagram is widely used in common
business activity that cannot be resolved by simple decision making strategy.

Mathisfun.com/data/probability-tree-diagrams.html

Definition from Oxford Languages and Google: languages.oup.com/google-dictionary-en/


Tree Diagram (Decision Tree)(Doane and Seward, 2021)
The construction of a tree diagram begins with a contingency table.

The table above is a cross-tabulation of expense ratios (low, medium, high) by


fund type (bond, stock) for a sample of 21 bond funds and 23 stock funds. For purposes
of this analysis, a fund’s expense ratio is defined as “low” if it is in the lowest 1/3 of the
sample, “medium” if it is in the middle 1/3 of the sample, and “high” if it is in the upper
1/3 of the sample.
Tree Diagram (Decision Tree)(Doane and Seward, 2021)
The construction of a tree diagram begins with a contingency table.

The table above is a cross-tabulation of expense ratios (low, medium, high) by


fund type (bond, stock) for a sample of 21 bond funds and 23 stock funds. For purposes
of this analysis, a fund’s expense ratio is defined as “low” if it is in the lowest 1/3 of the
sample, “medium” if it is in the middle 1/3 of the sample, and “high” if it is in the upper
1/3 of the sample.
Tree Diagram (Decision Tree)(Doane and Seward, 2021)

To label a tree, we need to calculate conditional probabilities. The table above


shows conditional probabilities by fund type (i.e., dividing each cell frequency by its
column total). For example, P(L|B) = 11/21 = 0.5238. This says there is about a 52
percent chance that a fund has a low expense ratio if it is a bond fund (conditional to
fund type). In contrast, P(L|S) = 3/23 = 0.1304. This says there is about a 13 percent
chance that a fund has a low expense ratio if it is a stock fund (conditional to fund
type).
Tree Diagram (Decision Tree)(Doane and Seward, 2021)
The tree diagram in the figure below shows all events along with their marginal,
conditional, and joint probabilities. To illustrate the calculation of joint probabilities, the
conditional probability and multiplication rule will be applied:

The next slide presents the tree diagram for the expense ratio by fund type problem.
Tree Diagram (Decision Tree)(Doane and Seward, 2021)
Tree Diagram (Decision Tree)(Doane and Seward, 2021)
Exercise 1:

An accounting firm was able to finish a total caseload of 50


financial reports accomplished from two branches, Makati and
Manila. Of them 30 were accomplished in Makati. Of the total
financial reports finished, 10 has balancing errors. Of the 30
financial reports finished in Makati, 6 are has balancing errors. Let E
be the event that a randomly selected financial reports has
balancing errors and X be the event that a randomly selected
financial report was accomplished in Makati. Tell whether the
following events are dependent or independent? Interpret the result.
Let Y = branch in Manila and B = balanced financial report.
Construct a contingency table to solve the problem
Let Y = branch in Manila and B = balanced financial report.
Balancing Errors (E) Balanced (B) Total
Makati (X) 6 24 30
Manila (Y) 4 16 20
Total 10 40 50

A. Based on the given problem, answer the following questions:


1. What is the probability that a financial report is accomplished in Manila? P(Y)
2. What is the probability that a financial report is occurs error in balancing? P(E)
3. What is the probability that a financial report is accomplished in Manila and error
has occurred in balancing?
4. What is the probability that a financial report accomplished is balanced and was
accomplished in Makati?
Construct a contingency table to solve the problem
Let Y = branch in Manila and B = balanced financial report.
Balancing Errors (E) Balanced (B) Total
Makati (X) 6 24 30
Manila (Y) 4 16 20
Total 10 40 50

Based on the given problem, answer the following questions:


5. What is the probability that a financial report accomplished is not balanced and
was accomplished in Manila?
6. What is the probability that a financial report is accomplished in Manila or Makati?
P(X) + P(Y)
7. Suppose a randomly selected financial report is done in Makati, what is the
probability that it is balanced? P(B/X)
8. Among the financial reports that are found to have error in balancing, what is the
probability that it is done in Manila? P(X/E)
Let Y = branch in Manila and B = balanced financial report.

Balancing Errors (E) Balanced (B) Total


Makati (X) 6 24 30
Manila (Y) 4 16 20
Total 10 40 50

B. Construct a tree diagram for this problem.


Exercise 2:
1. A class in advanced algebra is comprised of 10 juniors, 30 seniors, and 10
graduate students. The final grades show that 3 of the juniors, 10 of the
seniors, and 5 of the graduate students received an “A” for the course. If
a student is chosen at random from this class;
a) What is the probability that he/she is a senior?
b) Among those who received an “A”, what is the probability that
he/she is a senior?
c) he/she is not a senior ?
d) he/she is not a junior, given that he/she did not receive an A?
Construct the contingency table to clearly see relationships between
variables.
2. Construct the tree diagram.
Probabilities in Contingency Table Using Excel
(Winston and Albright, 2013)
Smoking and Drinking Habits

See attached link for the excel file data and output:
..\ust\5_Business Analytics\1_PPT_BA\excel files\data only_share gdrive\stacked and
unstacked\Smoking Drinking_.xlsx
Probabilities in Contingency Table Using Excel
(Winston and Albright, 2013)
Smoking and Drinking Habits

See attached link for the excel file data and output:
..\ust\5_Business Analytics\1_PPT_BA\excel files\data only_share gdrive\stacked and
unstacked\Smoking Drinking_.xlsx
Probabilities in Contingency Table Using Excel
(Winston and Albright, 2013)
• Objective: To use a crosstabs to explore the
relationship between smoking and drinking.
• Solution: Data set lists the smoking and
drinking habits of 8761 adults.
• Categories have been coded “N,” “O,” “H,”
“S,” and “D” for “Non,” “Occasional,”
“Heavy,” “Smoker,” and “Drinker.”

© 2020 Cengage. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part, except for use as permitted in a license distributed with a certain product or service or otherwise on a password-
protected website or school-approved learning management system for classroom use.
Probabilities in Contingency Table Using Excel
(Winston and Albright, 2013)

• To create the crosstabs, enter the


category headings in Excel® and use the
COUNTIFS function to fill the table with
counts of joint categories.
• Next, sum across rows and down
columns to get totals.
• Then express the counts as percentages
of row and percentages of column.

© 2020 Cengage. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part, except for use as permitted in a license distributed with a certain product or service or otherwise on a password-
protected website or school-approved learning management system for classroom use.
Probabilities in Contingency Table Using Excel
(Winston and Albright, 2013)
• Counts versus percentages
❑There is no single correct way to display the data in a crosstabs.
❑Showing the counts as percentages of row totals or percentages of column totals usually
makes any relationships stand out more clearly.
❑Corresponding charts are also very useful.

© 2020 Cengage. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part, except for use as permitted in a license distributed with a certain product or service or otherwise on a password-
protected website or school-approved learning management system for classroom use.
Reference
Applied Statistics in Business and Economics by Doane P., and Seward, L.
Copyright 2021 by McGraw-Hill Education.
Business Analytics: Data analysis and Decision Making, 7th Edition, Albright, C. and
Winston, W. Copyright 2020 by McGraw-Hill Education.
Oxford Languages and Google: languages.oup.com/google-dictionary-
en/
Mathisfun.com/data/probability-tree-diagrams.html

You might also like