Chapter 1
1
Marketing Analytics
MKAN1-UC 5103 -001, 4-credits
Dongnanzi (Janet) Zheng
Fall 2021 Session 7
Today’s class
• About Midterm
• Visualizing Your Data Effectively
• Discussion on Graphs
• SAS – Title and Footnote Statements
• SAS – Visualizing Data Tasks
• Midterm Q&A
3
These two weeks – Due 11/3 6pm
• Assignment 5 – our last graded assignment
• Discussion 4 (1% of final grade in Discussion Score
8%)
– Kleih, A.-K., & Sparke, K. (2021). Visual marketing: The
importance and consumer recognition of fruit
brands in supermarket fruit displays. Food Quality
and Preference, 93. https://doi-
org.proxy.library.nyu.edu/10.1016/j.foodqual.2021.10
4263
• Deadline will be in two weeks: 11/3 6:00 pm after
the midterm
4
https://doi-org.proxy.library.nyu.edu/10.1016/j.foodqual.2021.104263
About Midterm
• Wednesday 10/27 from 6:30pm to 9:30pm (3 hours)
– No makeup exam
• Open book open internet but if you copy/paste from
an online source you will need to cite the reference for
short answer questions (designed for closed-book
exam originally)
• You should be able to complete the exam within 3
hours if you prepare/review all materials in advance.
Please plan your time to do the exam accordingly.
4
About Midterm
• Submission: same as Homework. You will receive
instructions, questions, answer sheet and necessary
materials/datasets under NYU-Brightspace Assignments
when opened. You are expected to submit your
answer sheet before the deadline under Assignment.
• No in-person exam/session
• Late submissions receive 5% reduction of the total
points for every 0.01-15 minutes of being late.
4
Last Semester Midterm
• Exam format: Multiple choices, Fill in the blank, Short
answers, and Assignment-like questions
• Exam content: Anything in Slides, Required Readings
and HW till (including) this session(Session 7)
• Any teamwork found will receive 0 points and be
reported to NYU
4
Last Semester Midterm
Multiple choices:
• Most (tell/select the following statements wrong/right)
• Textbook (concepts understanding) and Readings
• SAS (concepts and rules)
• SAS (key words and statements)
Filling the blank:
– Most (SAS syntax questions)
4
Last Semester Midterm
Short Answers:
• Slides (concepts understanding)
• SAS tasks
• SAS syntax
• SAS explanation/why questions
• Assignment-like questions: -Writing code
4
About Midterm
SAS:
• Concepts/rules
• Point and Click Tasks:
– know what each task does
– know the elements inside the tasks
• Syntax:
– How to write simple ones
– Steps and statements
– Explain the syntax
• HW
• Questions asked in class
5
About Midterm
Textbook:
• Important examples behind concepts in slides
• Understanding
• Readings
6
11
Visualizing Your Data
Effectively
Content partially adopted from a presentation by Kim Unger, 2017
Four questions
• 1. What data is important to show?
• 2. What do I want to emphasize in the
data?
• 3. What options do I have for displaying
this data?
• 4. Which option is most effective in
communicating the data?
What do you want to show with your
data?
Time Series Ranking
Part-To-
Whole
Deviation
Distribution Correlation Comparison
Time series
values display how something changed over time
Bar Graph
(vertical)
To feature
individual values
and support their
comparisons.
Quantitative scale
must begin at zero.
Line Graph
To feature overall
trends and
patterns and
support their
comparisons
Dot Plot (vertical)
When you do not
have a value for
every interval of
time
Strip Plot (multiple)
Only when also
featuring
distributions
Box Plot (vertical)
Ranking
values are ordered by size (descending or ascending)
Bar Graphs
Quantitative scale must begin at zero
Dot Plots
Part-to-whole
values represent parts (ratios) of a whole
Bar Graphs
Quantitative scale must begin at zero
What about pie charts?
• Commonly used to show parts of a whole
• However…
➢ Hard to judge relative size of pie slices –
better at differentiating length
➢ Take up a lot of space to present little
information
➢Require labels and good color contrast to
even be usable (often difficult)
Best use is when one overwhelmingly larger value
than the rest – no need to focus on actual values
deviation
difference between two sets of values
Bar Graphs
Quantitative scale must being at zero
Line Graph
Only when also
featuring time series or
single distribution
Distribution
count of values per interval along quantitative scale
Bar Graphs
Quantitative Scale, must begin at
zero
Line Graph
To feature overall
shape of
distribution
Box Plots
When Comparing Multiple
Distributions
Strip Plot (single)
When you want
to see each value
Strip Plot
(multiple)
When comparing
multiple
distributions AND
you want to see
each value
Correlation
Comparison of two paired sets of values to determine if
there is a relationship between them
Scatter Plot
Normal comparison
simple comparison of values for a set of ordered items
Bar Graphs
Quantitative scale must begin at zero
Dot Plots
Other
visualizations
a picture is worth a
thousand words
Schematics
Illustrations
Flow Charts
Explain how
experiment was
conducted or
design concepts
for engineering
project
Tables
Photographs
Raw data or
statistical
summaries in well-
organized manner.
Convey important
details.
Great to show
experimental
setup, or examples
of actual results
Adhere to data presentation standards
in your field
• Judged by those often familiar with research field
• Expected presentations of data in that field
• Review scientific articles – how is data presented?
➢ Are there graphs?
➢ What kind?
➢ What statistics are used?
➢ Review schematics – are there specific icons?
➢ Does the journal have a style guide?
Visual best
practices
most important
data
Empha
size
graph/table
Organi
ze
overloading graphsAvoid
# of colors and
shapes
Limit
through important
text
Inform
Discussion on Graphs
Discussion 1
Broman, Karl, “The top ten worst graphs”
https://www.biostat.wisc.edu/~kbroman/topten_worstgr
aphs/
Why they don’t look good?
• Confusing, misleading
• Don’t provide information from the graphs
• Not necessary, show stats # is better
• Other ways of presenting are better
• Give wrong information
https://www.biostat.wisc.edu/~kbroman/topten_worstgraphs/
Discussion 1
Question: good or bad? Why?
Discussion 1
Question: good or bad? Why?
• Two Y-Axes are misleading. People need to figure out
the line with its corresponding y-axis.
• Hard to see the data from the graph according to
“14,000 people becoming uninsured every day”
• The trends of two lines look similar, however the graph
is wrong. $ and % scale are different. Uninsured people
increase slightly (transfer $ to %), compared with more
rapidly growing unemployment rate
Discussion 2
Kaiser Fung, “Junk Charts trifecta checkup: The definitive
guide” https://junkcharts.typepad.com/junk_charts/junk-
charts-trifecta-checkup-the-definitive-guide.html
What are the three key questions?
https://junkcharts.typepad.com/junk_charts/junk-charts-trifecta-checkup-the-definitive-guide.html
Discussion 2
It is a fine case of using a great design to reveal interesting
spatial patterns in a set of good data that addresses an
interesting question.
Discussion 2
Arctic Ice Death
Spiral concerns an
existential problem,
and as far as I know,
the data are
standard fare but the
chart fails because of
the spiral design.
Discussion 2
Discussion 2
Question: What are the characteristics of good graphs?
• Clean and clear
• Right and good amount of information
• Help better understand data/patterns (better than
only #)
SAS – Visualizing Data
• Graph Tasks
– Bar Chart
– Bar-Line Chart
– Box Plot
– Bubble Plot
– Heat Map
– Histogram
– Line Chart
– Mosaic Plot
– Pie Chart
– Scatter Plot
– Series Plot
43
36
Copyr i g ht © 2016, SAS Ins t i tu t e Inc . A l l r ights reser ve d .
Types of Graphs
The graphs are displayed
under Tasks Graph.
37
Copyr i g ht © 2016, SAS Ins t i tu t e Inc . A l l r ights reser ve d .
Graphs: Task Roles
Each graph has roles to fill in specific to that task.
38
Copyr i g ht © 2016, SAS Ins t i tu t e Inc . A l l r ights reser ve d .
Graphs: Task Options
On the OPTIONS tab, each graph task has options that
enable you to customize the graph.
39
Copyr i g ht © 2016, SAS Ins t i tu t e Inc . A l l r ights reser ve d .
Graphs: Task Appearance
On the APPEARANCE tab, each graph task enables you to
customize the appearance of the graph.
40
Copyr i g ht © 2016, SAS Ins t i tu t e Inc . A l l r ights reser ve d .
Bar Chart Task
• The Bar Chart task creates
horizontal/vertical bar charts
that compare numeric values
or statistics between
different values of a chart
variable.
• Bar charts show the relative
magnitude of data by
displaying bars of varying
height. Each bar represents
a category of data.
41
Copyr i g ht © 2016, SAS Ins t i tu t e Inc . A l l r ights reser ve d .
Bar Chart Task – Example 1
• In the Tasks section, expand the Graph folder, and
then double-click Bar Chart. The user interface for the
Bar Chart task opens.
• On the Data tab, select
the SASHELP.PRICEDATA data set.
• Assign regionName to the Category role.
• Assign productLine to the Subcategory role.
• From the Measure drop-down list, select Variable.
Assign sale to the Variable role. From
the Statistic drop-down list, select Sum (default).
• Run the task
41
42
Copyr i g ht © 2016, SAS Ins t i tu t e Inc . A l l r ights reser ve d .
Bar Chart Task – Example 1
How do you describe?
42
43
Copyr i g ht © 2016, SAS Ins t i tu t e Inc . A l l r ights reser ve d .
Bar Chart Task – Example 2
• In the Tasks section, expand the Graph folder, and
then double-click Bar Chart. The user interface for the
Bar Chart task opens.
• On the Data tab, select
the SASHELP.PRICEDATA data set.
• Assign regionName to the Category role.
• Assign productLine to the Subcategory role.
• From the Measure drop-down list, select Frequency
count (default).
• Run the task
43
44
Copyr i g ht © 2016, SAS Ins t i tu t e Inc . A l l r ights reser ve d .
Bar Chart Task – Example 2
44
45
Copyr i g ht © 2016, SAS Ins t i tu t e Inc . A l l r ights reser ve d .
Bar-Line Chart Task
The Bar-Line Chart task creates
a vertical bar chart with a line
chart overlay.
You can use the Bar-Line Chart
task to perform these tasks:
• display and compare exact
and relative magnitudes
• examine the contribution of
each part to the whole
• determine trends and
patterns in the data
46
Copyr i g ht © 2016, SAS Ins t i tu t e Inc . A l l r ights reser ve d .
Bar-Line Chart Task – Example
• In the Tasks section, expand the Graph folder, and
then double-click Bar-Line Chart. The user interface
for the Bar-Line Chart task opens.
• On the Data tab, select the SASHELP.CARS data set.
• Assign columns to these roles:
• Then run the task
46
47
Copyr i g ht © 2016, SAS Ins t i tu t e Inc . A l l r ights reser ve d .
Bar-Line Chart Task – Example
How do you describe?
47
48
Copyr i g ht © 2016, SAS Ins t i tu t e Inc . A l l r ights reser ve d .
Box Plot Task – Example
48
49
Copyr i g ht © 2016, SAS Ins t i tu t e Inc . A l l r ights reser ve d .
Box Plot Task – Example
How do you describe?
49
50
Copyr i g ht © 2016, SAS Ins t i tu t e Inc . A l l r ights reser ve d .
Bubble Plot Task
• The Bubble Plot task
explores the relationship
between three or more
variables.
• In a bubble plot, two
variables determine the
location of the bubble
centers, and a third variable
specifies the size of each
bubble.
• A fourth variable can be
used to determine the colors
of the bubbles.
51
Copyr i g ht © 2016, SAS Ins t i tu t e Inc . A l l r ights reser ve d .
Bubble Plot Task – Example
• In the Tasks section, expand the Graph folder, and
then double-click Bubble Plot. The user interface for
the Bubble Plot task opens.
• On the Data tab, select the SASHELP.CLASS data
set.
• Assign columns to these roles:
• Then run the task
51
52
Copyr i g ht © 2016, SAS Ins t i tu t e Inc . A l l r ights reser ve d .
Bubble Plot Task – Example
How do you describe?
52
53
Copyr i g ht © 2016, SAS Ins t i tu t e Inc . A l l r ights reser ve d .
Heat Map Task
The Heat Map task displays the
magnitude of the response
based on two variables. The
response is represented as a
color value from a color
gradient.
54
Copyr i g ht © 2016, SAS Ins t i tu t e Inc . A l l r ights reser ve d .
Heat Map Task – Example
• In the Tasks and Utilities section, expand
the Graph folder, and then double-click Heat Map. The
user interface for the Heat Map task opens.
• On the Data tab, select the SASHELP.HEART data
set.
• Assign columns to these roles:
• Then run the task
54
55
Copyr i g ht © 2016, SAS Ins t i tu t e Inc . A l l r ights reser ve d .
Heat Map Task – Example
How do you describe?
55
56
Copyr i g ht © 2016, SAS Ins t i tu t e Inc . A l l r ights reser ve d .
Line Chart Task
The Line Chart task shows the
mathematical relationships
between variables by revealing
trends or patterns of data
points.
57
Copyr i g ht © 2016, SAS Ins t i tu t e Inc . A l l r ights reser ve d .
Line Chart Task – Example
• In the Tasks section, expand the Graph folder, and
then double-click Line Chart. The user interface for the
Line Chart task opens.
• On the Data tab, select the SASHELP.CARS data set.
• Assign columns to these roles:
• From the Measure drop-down list, select Variable.
Assign MPG_City to the Variable role. From
the Statistic drop-down list, select Mean.
• Then run the task
57
58
Copyr i g ht © 2016, SAS Ins t i tu t e Inc . A l l r ights reser ve d .
Line Chart Task – Example
How do you describe?
58
59
Copyr i g ht © 2016, SAS Ins t i tu t e Inc . A l l r ights reser ve d .
Mosaic Plot Task
• Mosaic plots display tiles that
correspond to the
crosstabulation table cells.
• The areas of the tiles are
proportional to the frequencies
of the table cells.
• The column variable is
displayed on the X axis, and the
tile widths are proportional to
the relative frequencies of the
column variable levels.
• The row variable is displayed on
the Y axis, and the tile heights
are proportional to the relative
frequencies of the row levels
within column levels.
60
Copyr i g ht © 2016, SAS Ins t i tu t e Inc . A l l r ights reser ve d .
Mosaic Plot Task – Example
• In the Tasks section, expand the Graph folder, and
then double-click Mosaic Plot. The user interface for
the Mosaic Plot task opens.
• On the Data tab, select the SASHELP.CARS data set.
• Assign columns to these roles:
• Then run the task
60
61
Copyr i g ht © 2016, SAS Ins t i tu t e Inc . A l l r ights reser ve d .
Mosaic Plot Task – Example
How do you describe?
61
62
Copyr i g ht © 2016, SAS Ins t i tu t e Inc . A l l r ights reser ve d .
Pie Chart Task
• The Pie Chart task creates pie charts that represent
the relative contribution of the parts to the whole by
displaying data as wedge-shaped “slices” of a circle.
• Each slice represents a category of data. The size of a
slice represents the contribution of the data to the total
chart statistic.
63
Copyr i g ht © 2016, SAS Ins t i tu t e Inc . A l l r ights reser ve d .
Pie Chart Task – Example
• In the Tasks section, expand the Graph folder, and
then double-click Pie Chart. The user interface for the
Pie Chart task opens.
• On the Data tab, select the SASHELP.CARS data set.
• Assign Origin to the Category role.
• From the Measure drop-down list, select Variable.
Assign MSRP to the Variable role. From
the Statistic drop-down list, select Sum (default).
• Run the task.
63
64
Copyr i g ht © 2016, SAS Ins t i tu t e Inc . A l l r ights reser ve d .
Pie Chart Task – Example
How do you describe?
64
65
Copyr i g ht © 2016, SAS Ins t i tu t e Inc . A l l r ights reser ve d .
Series Plot Task
The Series Plot task
creates plots that display a
series of line segments
that connect observations
of input data.
66
Copyr i g ht © 2016, SAS Ins t i tu t e Inc . A l l r ights reser ve d .
Series Plot Task – Example
• In the Tasks section, expand the Graph folder, and
then double-click Series Plot. The user interface for
the Series Plot task opens.
• On the Data tab, select the SASHELP.STOCKS data
set.
• Assign columns to these roles:
• Then run the task
66
67
Copyr i g ht © 2016, SAS Ins t i tu t e Inc . A l l r ights reser ve d .
Series Plot Task – Example
How do you describe?
67
68
Copyr i g ht © 2016, SAS Ins t i tu t e Inc . A l l r ights reser ve d .