Skip to main content

Solution Manual for Data Science For All, 1st edition by Brennan Davis Hunter Glanz

Page 1

INSTRUCTOR SOLUTIONS MANUAL ADAM POLIAK Bryn Mawr College

D ATA S CIENCE FOR A LL Brennan Davis California Polytechnic State University

Hunter Glanz California Polytechnic State University


Data Science for All

Table of Contents Chapter 1: What Is Data Science? .............................................................................................. xii Chapter Review Questions ...................................................................................................... xii Section 1. Introduction to Data Science ................................................................................... xii Section 2: Data in Tables ....................................................................................................... xii Section 3: Data Preparation..................................................................................................... 2 Section 4: Data Analysis and Storytelling ................................................................................. 2 Section 5: Data Science in Society and Industry ........................................................................ 3 Explaining the Concepts .......................................................................................................... 4 Try It Yourself ........................................................................................................................ 4 Try It Yourself: Identify Variable Uses and Types (1.2) ............................................................. 4 Try It Yourself: Tidy Messy Data (1.2) .................................................................................... 5 Try It Yourself: Tidy Data for Better Analysis (1.2) ................................................................... 5 Try It Yourself: Investigate Metadata (1.2) ............................................................................... 6 Try It Yourself: Illustrate Unstructured Data Using Structured Tables (1.3) .................................. 6 Try It Yourself: Identify Analysis Types (1.4) ........................................................................... 6 Try It Yourself: Optimize the Narrative (1.4) ............................................................................ 7 Applying the Concepts............................................................................................................. 7 Activity: Identify Variable Uses and Types ............................................................................... 7 Activity: Tidy Messy Data ...................................................................................................... 7 Activity: Tidy Data for Better Analysis .................................................................................... 8 Activity: Investigate Metadata................................................................................................. 9 Activity: Illustrate Unstructured Data Using Structured Tables ................................................... 9 Activity: Optimize the Narrative ............................................................................................. 9 Activity: Identify Analysis Types ............................................................................................ 9 Chapter 2: Data Wrangling: Preprocessing .................................................................................10 Chapter Review Questions ......................................................................................................10 Section 1: What Is Data Wrangling? .......................................................................................10 Section 2: Cleaning Missing Data ...........................................................................................10 Section 3: Cleaning Anomalous Values ...................................................................................11 Section 4: Transforming Quantitative Variables .......................................................................11 Section 5: Transforming Categorical Variables ........................................................................16 iii © 2026 Pearson Education, Inc.


Table of Contents

Section 6: Reshaping a Dataset...............................................................................................19 Section 7: Combining Datasets...............................................................................................19 Explaining the Concepts .........................................................................................................22 Try It Yourself .......................................................................................................................22 Try It Yourself: Identifying Missing Data (2.2) ........................................................................22 Try It Yourself: Impute Missing Values from Internal Data (2.2)................................................23 Try It Yourself: Identify Extreme Data Values (2.3) .................................................................23 Try It Yourself: Clean Incorrect Formats (2.3) .........................................................................24 Try It Yourself: Create a Categorical Variable from a Quantitative Variable (2.4) ........................24 Try It Yourself: Create a Boolean Variable that Represents a Categorical Variable (2.5) ...............25 Try It Yourself: Splitting a Variable into Multiple Variables (2.5) ..............................................25 Applying the Concepts............................................................................................................26 Activity: Identify Missing Data ..............................................................................................26 Activity: Impute Missing Values from Internal Data .................................................................26 Activity: Identify Extreme Data Values ...................................................................................26 Activity: Clean Incorrect Formats ...........................................................................................27 Activity: Create a Categorical Variable from a Quantitative Variable ..........................................27 Activity: Create a Boolean Variable that Represents a Categorical Variable.................................27 Activity: Splitting a Variable into Multiple Variables................................................................28 Chapter 3: Making Sense of Data Through Visualization ............................................................28 Chapter Review Questions ......................................................................................................28 Section 1: The Grammar of Graphics ......................................................................................28 Section 2: Visualizations with One Quantitative Variable ..........................................................29 Section 3: Visualizations with One Categorical Variable ...........................................................30 Section 4: Visualizations with Two Variables ..........................................................................30 Section 5: Visualizations with Three or More Variables ............................................................32 Section 6: The Dangers of Visual Misrepresentation .................................................................33 Section 7: Data Visualization Guidelines .................................................................................33 Explaining the Concepts .........................................................................................................34 Try It Yourself .......................................................................................................................35 Try It Yourself: Interpret a Histogram (3.2) .............................................................................35 Try It Yourself: Describe a Density Plot (3.2) ..........................................................................35 Try It Yourself: Work with a Box Plot (3.2).............................................................................36 iv © 2026 Pearson Education, Inc.


Data Science for All

Try It Yourself: Interpret a Violin Plot (3.2).............................................................................36 Try It Yourself: Ponder a Word Cloud (3.3) .............................................................................37 Try It Yourself: Interpret a Column Chart (3.4) ........................................................................37 Try It Yourself: Navigate a Treemap (3.4) ...............................................................................37 Try It Yourself: Contemplate a Box Plot with a Categorical Variable (3.4) ..................................38 Try It Yourself: Interpret a Violin Plot with a Categorical Variable (3.4) .....................................38 Try It Yourself: Interpret a Scatterplot (3.4) .............................................................................38 Try It Yourself: Explore a Line Chart (3.4) ..............................................................................39 Try It Yourself: Describe a Bubble Chart (3.5) ........................................................................39 Try It Yourself: Interpret a Heatmap (3.5) ...............................................................................40 Try It Yourself: Interpret a Geographic Map (3.5) ....................................................................40 Try It Yourself: Navigate the Dangers of Cherry-Picking (3.6)...................................................40 Applying the Concepts............................................................................................................41 Activity: Interpret a Histogram ...............................................................................................41 Activity: Describe a Density Plot............................................................................................42 Activity: Work with a Box Plot ..............................................................................................43 Activity: Interpret a Violin Plot ..............................................................................................44 Activity: Ponder a Word Cloud ..............................................................................................45 Activity: Interpret a Column Chart .........................................................................................45 Activity: Navigate a Treemap ................................................................................................46 Activity: Contemplate a Box Plot with a Categorical Variable ...................................................47 Activity: Interpret a Violin Plot with a Categorical Variable ......................................................48 Activity: Interpret a Scatterplot ..............................................................................................49 Activity: Explore a Line Chart ...............................................................................................50 Activity: Describe a Bubble Chart ..........................................................................................51 Activity: Interpret a Heatmap .................................................................................................52 Activity: Interpret a Geographic Map ......................................................................................53 Activity: Navigate the Dangers of Cherry-Picking ....................................................................53 Chapter 4: Exploratory Data Analysis ........................................................................................54 Chapter Review Questions ......................................................................................................54 Section 1: Central Tendency ..................................................................................................54 Section 2: Variability ............................................................................................................54 Section 3: Shape ...................................................................................................................55 v © 2026 Pearson Education, Inc.


Table of Contents

Section 4. Resistant Central Tendency and Variability ..............................................................56 Section 5. Data Associations ..................................................................................................57 Section 6. Identifying Outliers................................................................................................58 Explaining the Concepts .........................................................................................................60 Try It Yourself .......................................................................................................................64 Try It Yourself: Calculate the Mean, Mode, Median, and 90% Trimmed Average (4.1) .................64 Try It Yourself: Calculate the Range, Variance, and Standard Deviation (4.2) ..............................65 Try It Yourself: Describe the Shape of the Histogram (4.3)........................................................65 Try It Yourself: Investigate Resistance (4.4) ............................................................................65 Try It Yourself: Plot Correlations between Two Quantitative Variables (4.5) ...............................65 Try It Yourself: Match Box Plots with Histograms (4.5)............................................................65 Try It Yourself: Associate Two Categorical Variables (4.5) .......................................................66 Try It Yourself: Determine Outliers Using the Quartile and Mean/SD Methods (4.6) ....................66 Applying the Concepts............................................................................................................67 Activity: Calculate the Mean, Mode, Median, and 90% Trimmed Average ..................................67 Activity: Calculate the Range, Variance, and Standard Deviation ...............................................67 Activity: Describe the Shape of the Histogram .........................................................................67 Activity: Investigate Resistance..............................................................................................68 Activity: Plot Correlations between Two Quantitative Variables ................................................69 Activity: Match Box Plots with Histograms .............................................................................70 Activity: Associate Two Categorical Variables ........................................................................71 Activity: Determine Outliers Using the Quartile and Mean/SD Methods .....................................71 Chapter 5: Data Management ....................................................................................................72 Chapter Review Questions ......................................................................................................72 Section 1: Asking Questions of Data .......................................................................................72 Section 2: Selecting Variables ................................................................................................73 Section 3: Filtering and Ordering Observations ........................................................................73 Section 4: Summarizing and Structuring Data ..........................................................................74 Section 5. Merging Tables .....................................................................................................75 Explaining the Concepts .........................................................................................................76 Try It Yourself .......................................................................................................................77 Try It Yourself: Select Variables (5.2).....................................................................................77 Try It Yourself: Select Distinct Values of Variables (5.2) ..........................................................77 vi © 2026 Pearson Education, Inc.


Turn static files into dynamic content formats.

Create a flipbook
Solution Manual for Data Science For All, 1st edition by Brennan Davis Hunter Glanz by AnswerDone - Issuu