Lecture Slides
Lecture Slides
Week 3 :
Organizing and Visualizing Variables
Instructor: Dr Adilah
Group 1
Group 2
Tallying Data
One Two
Categorical Categorical
Variable Variables
Summary Contingency
Table Table
Source: Data extracted and adapted from A. Sharma, “Big Media Needs to Embrace
Digital Shift Not Fight It,” Wall Street Journal, June 22, 2016, p. 1-2.
The number of classes depends on the number of values in the data. With
a larger number of values, typically there are more classes. In general, a
frequency distribution should have at least 5 but no more than 15 classes.
To determine the width of a class interval, you divide the range (Highest
value–Lowest value) of the data by the number of class groupings
desired.
A L WAY S L E A R N I N G Copyright © 2021 Pearson Education Ltd. Slide 13
Organizing Numerical Data:
Frequency Distribution Example
DCOVA
24, 35, 17, 21, 24, 37, 26, 46, 58, 30, 32, 13, 12, 38, 41, 43, 44, 27, 53, 27
Summary Contingency
Table For One Table For Two
Variable Variables
Pie or
Doughnut Chart
A L WAY S L E A R N I N G Copyright © 2021 Pearson Education Ltd. Slide 21
Visualizing Categorical Data:
The Bar Chart
DCOVA
The bar chart visualizes a categorical variable as a series of bars. The
length of each bar represents either the frequency or percentage of
values for each category. Each bar is separated by a space called a gap.
Devices Percent
Used to
Watch
Television Set 49%
Tablet 9%
Smartphone 10%
Laptop / 32%
Desktop
Devices Percent
Used to
Watch
Television Set 49%
Tablet 9%
Smartphone 10%
Laptop / 32%
Desktop
Devices Percent
Used to
Watch
Television Set 49%
Tablet 9%
Smartphone 10%
Laptop / 32%
Desktop
The “Vital
Few”
A L WAY S L E A R N I N G Copyright © 2021 Pearson Education Ltd. Slide 27
A L WAY S L E A R N I N G Copyright © 2021 Pearson Education Ltd. Slide 28
A L WAY S L E A R N I N G Copyright © 2021 Pearson Education Ltd. Slide 29
A L WAY S L E A R N I N G Copyright © 2021 Pearson Education Ltd. Slide 30
Visualizing Categorical Data:
Side By Side Bar Charts DCOVA
The side by side bar chart represents the data from a contingency
table.
No
Errors Errors Total
Invoice Size Split Out By Errors
Small 50.75% 30.77% 47.50% & No Errors
Amount
Medium 29.85% 61.54% 35.00% Errors
Amount
Large 19.40% 7.69% 17.50% No Errors
Amount
0.0% 10.0% 20.0% 30.0% 40.0% 50.0% 60.0% 70.0%
Total 100.0% 100.0% 100.0%
Large Medium Small
No
Errors Errors Total Invoice Size & Errors
Inner Ring With Errors, Outer Ring No
Small 50.75% 30.77% 47.50% Errors
Amount 19.4%
30.8%
Medium 29.85% 61.54% 35.00% 7.7%
30.8%
Amount 61.5%
Amount
Small Medium Large
Total 100.0% 100.0% 100.0%
Frequency Distributions
Ordered Array and
Cumulative Distributions
Stem-and-Leaf
Display Histogram Polygon Ogive
Frequency
4
(In a percentage
histogram the vertical
axis would be defined to 2
show the percentage of
observations per class).
0
5 15 25 35 45 55 More
Two Numerical
Variables
Scatter Time-
Plot Series
Plot
29 146 200
33 160
150
38 167
42 170 100
20 30 40 50 60 70
50 188
Volume per Day
55 195
60 200
2015 82
100
2016 95 Number of Franchises
2017 107 80
2018 99 60
2019 95
40
20
0
2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020
Year
Excel and Tableau Treemaps For Fund Type and Market Cap
Excel and
Tableau
Sparklines
Displays
Selective summarization:
Presenting only part of the data collected.
Chartjunk.
A L WAY S L E A R N I N G Copyright © 2021 Pearson Education Ltd. Slide 65
An Example of Selective Summarization, These
Two Summarizations Tell Totally Different Stories
DCOVA
Change
from
Prior
Company Year Company Year 1 Year 2 Year 3
A +7.2% A -22.6% -33.2% +7.2%
B +24.4% B -4.5% -41.9% +24.4%
C +24.9% C -18.5% -31.5% +24.9%
D +24.8% D -29.4% -48.1% +24.8%
E +12.5% E -1.9% -25.3% +12.5%
F +35.1% F -1.6% -37.8% +35.1%
G +29.7% G +7.4% -13.6% +29.7%
200 20%
100 10%
0 0%
FR SO JR SR FR SO JR SR
100 25
0 0
Q1 Q2 Q3 Q4 Q1 Q2 Q3 Q4
Bad Presentation
Good Presentations
Left illustration adapted from S. Watterson, “Liquid Gold—Australians Are Changing the World of Wine. Even the French Seem Grateful.” Time,
November 22, 1999, p. 68-69