Skip to content

Week 1 Quiz:Exploratory Data Analysis(Data Science Specialization):Answers2025

Question 1

Which of the following is a principle of analytic graphics?

Integrate multiple modes of evidence
❌ Show box plots (univariate summaries)
❌ Only do what your tools allow you to do
❌ Make judicious use of color in your scatterplots
❌ Don’t plot more than two variables at a time

Explanation:
One of the core principles of analytic graphics (from Tukey & Cleveland) is to integrate multiple modes of evidence—for example, combining tables, models, and plots for deeper insights.


Question 2

What is the role of exploratory graphs in data analysis?

The goal is for personal understanding.
❌ Only a few are constructed.
❌ Axes, legends, and other details are clean and exactly detailed.
❌ They are used in place of formal modeling.

Explanation:
Exploratory graphs help analysts understand data internally, find patterns, and spot anomalies before formal modeling or reporting.


Question 3

Which of the following is true about the base plotting system?

Plots are created and annotated with separate functions.
❌ Plots are typically created with a single function call.
❌ The system is most useful for conditioning plots.
❌ Margins and spacings are adjusted automatically depending on the data.

Explanation:
In the base system, you first create a plot (e.g., plot()), then add annotations (title(), lines(), points()), unlike lattice or ggplot2 which build everything together.


Question 4

Which of the following is an example of a valid graphics device in R?

A PDF file
❌ A socket connection
❌ The keyboard
❌ A file folder

Explanation:
Graphics devices in R are output destinations for plots (e.g., pdf(), png(), jpeg()).


Question 5

Which of the following is an example of a vector graphics device in R?

SVG
❌ GIF
❌ PNG
❌ JPEG
❌ TIFF

Explanation:
Vector formats (PDF, SVG, PostScript) scale without quality loss.
Bitmap formats (PNG, JPEG, GIF, TIFF) are pixel-based.


Question 6

Bitmapped file formats can be most useful for:

Scatterplots with many many points
❌ Plots that may need to be resized
❌ Plots that are not scaled to a specific resolution
❌ Plots that require animation or interactivity

Explanation:
When plotting large datasets, bitmaps render faster and prevent vector file bloat.


Question 7

Which of the following functions is typically used to add elements to a plot in base graphics?

text()
❌ boxplot()
❌ plot()
❌ hist()

Explanation:
Functions like text(), lines(), points() add new layers to an existing base plot.


Question 8

Which function opens the screen graphics device for the Mac?

quartz()
❌ pdf()
❌ bitmap()
❌ png()

Explanation:
quartz() opens the native Mac screen device for rendering plots interactively.


Question 9

What does the pch option to par() control?

The plotting symbol/character in the base graphics system
❌ The orientation of axis labels
❌ The size of the plotting symbol
❌ The line width

Explanation:
pch controls the point character, i.e., the shape of symbols in scatterplots (e.g., circles, squares).


Question 10

If I want to save a plot to a PDF file, which of the following is correct?

Construct the plot on the screen device and then copy it to a PDF file with dev.copy2pdf()
❌ Open the PostScript device with postscript(), construct the plot, then close the device with dev.off().
❌ Open the screen device with quartz(), construct the plot, then close it with dev.off().
❌ Construct the plot on the PNG device, then copy it to PDF.

Explanation:
You can plot interactively on screen, then use dev.copy2pdf(file="plot.pdf") to export the same plot as a PDF.


🧾 Summary Table

Q# ✅ Correct Answer Key Concept
1 Integrate multiple modes of evidence Principle of analytic graphics
2 The goal is for personal understanding Exploratory plots purpose
3 Plots created + annotated separately Base plotting structure
4 PDF file Graphics device example
5 SVG Vector graphics format
6 Scatterplots with many points Bitmap best use
7 text() Adding to existing plots
8 quartz() Mac screen device
9 plotting symbol pch parameter
10 dev.copy2pdf() Saving plot as PDF