1. Home
  2. Explore
  3. Statistics
  4. Data Visualization with R

Study methods

Flashcards
Quiz
Fill in the blanks
Written test
Lesson
Notes
Podcast
Content

Data Visualization with R

  • 58Unfamiliar
  • 0Learning
  • 0Familiar
  • 0Mastered
Topic: Titanic Dataset

In the Titanic dataset, what does the survived variable represent?

58 questions

  1. 1

    In the Titanic dataset, what does the survived variable represent?

    1. A

      A text label describing the passenger's port of embarkation

    2. B

      A continuous measure of time spent aboard the ship

    3. C

      A three-level category indicating the passenger's ticket class

    4. D

      A binary indicator coded 0 for death and 1 for survival

    Correct answer
    D

    A binary indicator coded 0 for death and 1 for survival

    Explanation

    The survived variable is a binary indicator: 0 means the passenger perished, and 1 means the passenger survived.

  2. 2

    What does pclass represent in the Titanic dataset?

    1. A

      The passenger's position in the ship's boarding queue

    2. B

      The passenger's port of embarkation

    3. C

      The passenger's class of ticket and level of accommodation

    4. D

      The passenger's number of parents and children aboard

    Correct answer
    C

    The passenger's class of ticket and level of accommodation

    Explanation

    pclass records first-, second-, or third-class ticket accommodation aboard the Titanic.

  3. 3

    Why is a passenger's ticket class not treated as ratio-scale numeric data in the tutorial?

    1. A

      The values are text descriptions rather than numbers

    2. B

      The class values do not support meaningful multiplication or division

    3. C

      The class values are unique identifiers for individual passengers

    4. D

      The values are missing for nearly every passenger in the dataset

    Correct answer
    B

    The class values do not support meaningful multiplication or division

    Explanation

    Although the classes are represented by numbers, a third-class ticket is not meaningfully three times a first-class ticket. Multiplication and division do not make sense for these categories.

  4. 4

    What do the sibsp and parch columns record?

    1. A

      sibsp counts parents and children; parch counts siblings and spouses

    2. B

      sibsp records embarkation port; parch records cabin assignment

    3. C

      sibsp counts siblings and/or a spouse; parch counts parents and/or children

    4. D

      sibsp records ticket class; parch records the passenger's fare

    Correct answer
    C

    sibsp counts siblings and/or a spouse; parch counts parents and/or children

    Explanation

    sibsp is an overloaded count of siblings and/or a spouse traveling with the passenger. parch is an overloaded count of parents and/or children traveling with the passenger.

  5. 5

    What does the age column contain?

    1. A

      A continuous numeric measure that can include decimal values

    2. B

      An ordinal category with only first-, second-, and third-level values

    3. C

      A binary category indicating whether the passenger was a child

    4. D

      A unique identifier assigned to each passenger

    Correct answer
    A

    A continuous numeric measure that can include decimal values

    Explanation

    Age is a continuous numeric variable; values can include decimal points, such as 33.44 years.

  6. 6

    Which interpretation of the ticket and fare columns is correct?

    1. A

      ticket is a cabin assignment, and fare is the passenger's ticket class

    2. B

      ticket is a ticket serial number, and fare is the amount paid in pounds sterling

    3. C

      ticket is the amount paid in pounds sterling, and fare is a ticket serial number

    4. D

      ticket is the embarkation port, and fare is the passenger's age

    Correct answer
    B

    ticket is a ticket serial number, and fare is the amount paid in pounds sterling

    Explanation

    The ticket column contains the ticket's serial number, while fare records how much the passenger paid in pound sterling.

  7. 7

    What does the cabin column indicate?

    1. A

      The passenger's ticket price and class combined

    2. B

      A cabin number, when one was assigned to the passenger

    3. C

      The number of relatives traveling with the passenger

    4. D

      The port where the passenger boarded the ship

    Correct answer
    B

    A cabin number, when one was assigned to the passenger

    Explanation

    The cabin column lists an assigned cabin number when a passenger had one; not every passenger had a cabin number recorded.

  8. 8

    Which mapping of embarkation codes is given in the tutorial?

    1. A

      C is Queenstown, Q is Southampton, and S is Cherbourg

    2. B

      C is Cherbourg, Q is Queenstown, and S is Southampton

    3. C

      C is Cherbourg, Q is Southampton, and S is Queenstown

    4. D

      C is Southampton, Q is Cherbourg, and S is Queenstown

    Correct answer
    B

    C is Cherbourg, Q is Queenstown, and S is Southampton

    Explanation

    The port codes are C for Cherbourg, Q for Queenstown, and S for Southampton.

  9. 9

    Why are passenger ID and name not used as-is for the tutorial's analysis?

    1. A

      They encode survival directly, making the other variables unnecessary

    2. B

      Each is unique for every passenger, so neither provides an immediate repeated pattern for grouping

    3. C

      Both columns contain only missing values, so they cannot be plotted

    4. D

      Both columns are continuous numeric measurements with extreme outliers

    Correct answer
    B

    Each is unique for every passenger, so neither provides an immediate repeated pattern for grouping

    Explanation

    Passenger IDs are unique, and the dataset contains 891 unique names. In their existing form, they do not provide repeated categories or an obvious analytical signal for the visualizations being demonstrated.

  10. 10

    What possible analytical avenue does the tutorial mention for passenger names, while leaving it outside the lesson's scope?

    1. A

      Converting every name into a ticket-class category

    2. B

      Applying regular expressions or text analytics to extract patterns

    3. C

      Using names to calculate a passenger's fare in pounds

    4. D

      Treating each name as a continuous age measurement

    Correct answer
    B

    Applying regular expressions or text analytics to extract patterns

    Explanation

    The tutorial notes that regular expressions or text analytics might extract useful signal from names, but this is beyond the lesson's scope.

  11. 11

    Why is the Titanic dataset considered a useful proxy for some business datasets?

    1. A

      It is a complete record of modern customers and their purchasing behavior

    2. B

      It resembles customer-profile data and includes imperfect data and overloaded columns

    3. C

      It uses a separate database column for every possible business meaning

    4. D

      It contains only clean numerical measurements with no categorical variables

    Correct answer
    B

    It resembles customer-profile data and includes imperfect data and overloaded columns

    Explanation

    The tutorial describes the Titanic data as a proxy for business customer-profile data because it is not perfectly clean and includes overloaded columns, features often encountered in real business systems.

  12. 12

    Why was the Titanic dataset considered accessible for a tutorial with participants from varied backgrounds?

    1. A

      The dataset contains only one variable and one possible conclusion

    2. B

      The story and problem domain are widely familiar to people

    3. C

      The dataset requires no knowledge of data or visualization

    4. D

      The dataset directly represents every participant's industry

    Correct answer
    B

    The story and problem domain are widely familiar to people

    Explanation

    The tutorial selected the Titanic data partly because people from varied industries and backgrounds are generally familiar with the Titanic story.

  13. 13

    Why should survived be treated as a categorical factor rather than as an ordinary numeric measurement?

    1. A

      It has too many distinct values to be represented numerically

    2. B

      Its values label outcomes, and arithmetic such as multiplying them is not meaningful for the analysis

    3. C

      It records the continuous amount of time each passenger survived

    4. D

      Its values have decimal points that make arithmetic impossible

    Correct answer
    B

    Its values label outcomes, and arithmetic such as multiplying them is not meaningful for the analysis

    Explanation

    Although survived is read as integers, its values represent categories—perished or survived—not measurements for which mathematical operations such as multiplication or division are meaningful.

  14. 14

    Why should pclass be treated as a factor in the demonstrated analysis?

    1. A

      Its values increase continuously with passenger age

    2. B

      Its values measure the exact distance between decks on the ship

    3. C

      The numbers identify ticket-class categories rather than ratio-scale quantities

    4. D

      The values are free-form strings that cannot be converted to categories

    Correct answer
    C

    The numbers identify ticket-class categories rather than ratio-scale quantities

    Explanation

    The numeric labels 1, 2, and 3 denote ticket classes; they do not represent quantities for which multiplication or division is meaningful.

  15. 15

    Why are sex and embarked natural candidates for factors?

    1. A

      They have a limited set of named categories, such as male/female and C/Q/S

    2. B

      They contain continuous values that must be divided into intervals

    3. C

      They are counts that should be summed as numeric measurements

    4. D

      They are unique for every passenger, so each row forms its own category

    Correct answer
    A

    They have a limited set of named categories, such as male/female and C/Q/S

    Explanation

    The tutorial treats sex and embarked as factors because they take values from a limited set of categories, such as male/female and the three port codes.

  16. 16

    What is one benefit of telling ggplot2 explicitly that a variable is a factor?

    1. A

      It converts the factor into a continuous measurement for a histogram

    2. B

      It can use the categorical levels in useful ways, such as assigning colors in a plot

    3. C

      It removes the need to specify any data-to-plot mappings

    4. D

      It automatically fills in all missing values in the dataset

    Correct answer
    B

    It can use the categorical levels in useful ways, such as assigning colors in a plot

    Explanation

    The tutorial notes that ggplot2 can make useful use of factor variables in aesthetic mappings, including using categories to color-code a visualization.

  17. 17

    What does ggplot2 do when the tutorial plots age values that are missing?

    1. A

      It automatically predicts each missing age and adds the predictions

    2. B

      It converts all missing ages to zero without reporting the change

    3. C

      It refuses to make any plot that uses the age column

    4. D

      It removes the missing observations from that plot and reports how many were removed

    Correct answer
    D

    It removes the missing observations from that plot and reports how many were removed

    Explanation

    When plotting age, ggplot2 removes missing observations from the visualization and issues a warning. The tutorial's dataset has 177 missing age values.

  18. 18

    What does the tutorial say a data scientist may need to consider after discovering missing ages?

    1. A

      Changing all ages into ticket-class labels

    2. B

      Removing affected rows or imputing the missing ages

    3. C

      Using passenger names to replace the missing ages automatically

    4. D

      Ignoring missingness in every subsequent analysis

    Correct answer
    B

    Removing affected rows or imputing the missing ages

    Explanation

    The tutorial says the data scientist may later need to address missing ages, for example by removing those rows or imputing the missing values.

  19. 19

    Which three elements does the tutorial identify as the practical minimum for creating a basic ggplot2 graphic?

    1. A

      Data, an aesthetic mapping, and a layer

    2. B

      A theme, a scale, and a coordinate system

    3. C

      A title, a legend, and a faceting variable

    4. D

      A database, a pivot table, and a print device

    Correct answer
    A

    Data, an aesthetic mapping, and a layer

    Explanation

    For a basic graphic, the tutorial emphasizes providing data, an aesthetic mapping that connects data to the plot, and a layer that specifies what to draw.

  20. 20

    In the grammar of graphics, what role does the data play?

    1. A

      It supplies the raw material used to create the visualization

    2. B

      It selects the coordinate system but supplies no plotted values

    3. C

      It determines only the plot's font and background color

    4. D

      It controls only whether the chart has a title

    Correct answer
    A

    It supplies the raw material used to create the visualization

    Explanation

    Data is the raw material for a visualization; without data, there is no plotted content.

  21. 21

    What does a layer represent in a ggplot2 visualization?

    1. A

      The subset of observations selected for visual drill-down

    2. B

      The visible geometric content, such as points, lines, or bars

    3. C

      The rules that scale data to fit the available display space

    4. D

      The font and color scheme used for plot labels

    Correct answer
    B

    The visible geometric content, such as points, lines, or bars

    Explanation

    Layers are the visible elements of a plot, such as points, lines, or bars.

  22. 22

    What is the purpose of a scale in the grammar of graphics?

    1. A

      It maps or adjusts data values so they can be represented consistently in limited visual space

    2. B

      It adds explanatory text to the title and axis labels

    3. C

      It changes the plot's perspective from a grid to a list

    4. D

      It selects which passengers should be included in the dataset

    Correct answer
    A

    It maps or adjusts data values so they can be represented consistently in limited visual space

    Explanation

    A scale helps map data values to the visual output, making them fit consistently and intelligibly within limited display space.

  23. 23

    What do coordinates determine in a visualization?

    1. A

      The plot's spatial perspective, such as its default two-dimensional x-y grid

    2. B

      The font size and color scheme of the plot

    3. C

      The number of missing values that are removed

    4. D

      The categorical meanings of the data columns

    Correct answer
    A

    The plot's spatial perspective, such as its default two-dimensional x-y grid

    Explanation

    Coordinates define the visualization's perspective. The common default is a two-dimensional x-y grid, though ggplot2 supports other coordinate systems.

  24. 24

    What is faceting used for in ggplot2?

    1. A

      Rescaling all numeric values to fit a display

    2. B

      Converting a continuous variable into a factor

    3. C

      Creating visual drill-downs by splitting data into subsets or panels

    4. D

      Changing the plot background and typography

    Correct answer
    C

    Creating visual drill-downs by splitting data into subsets or panels

    Explanation

    Faceting divides a visualization into panels for subsets of the data, providing a visual way to drill down by one or more variables.

  25. 25

    What can themes control in a ggplot2 graphic?

    1. A

      The raw values stored in the data frame

    2. B

      Display details such as fonts, font sizes, and color schemes

    3. C

      The mathematical meaning of the variables

    4. D

      The number of rows read from a CSV file

    Correct answer
    B

    Display details such as fonts, font sizes, and color schemes

    Explanation

    Themes provide control over visual presentation details, including fonts, font sizes, and color schemes.

  26. 26

    Why can someone create useful ggplot2 charts without mastering every part of the grammar?

    1. A

      The defaults often work well, and detailed controls are mainly needed for customization

    2. B

      Every ggplot2 chart uses only a single fixed chart type

    3. C

      ggplot2 automatically chooses the correct business question for every dataset

    4. D

      The data and aesthetic mapping are optional for all chart types

    Correct answer
    A

    The defaults often work well, and detailed controls are mainly needed for customization

    Explanation

    The tutorial explains that ggplot2's defaults are often sufficient to get started; deeper knowledge of scales, coordinates, facets, and themes is useful when more customization is needed.

  27. 27

    What does an aesthetic mapping specify?

    1. A

      How data variables connect to visual properties, such as mapping a column to an axis

    2. B

      How the computer installs a package from an online repository

    3. C

      Which file format should be used to save the source data

    4. D

      Which rows should be deleted from the original data frame

    Correct answer
    A

    How data variables connect to visual properties, such as mapping a column to an axis

    Explanation

    An aesthetic mapping connects data variables to visual properties—for example, mapping a data column to the x-axis.

  28. 28

    What does a geom_ function specify in ggplot2?

    1. A

      The color palette for every possible plot

    2. B

      The subset of data used by a facet

    3. C

      The data frame's column names and types

    4. D

      The geometric layer or kind of plot element to draw

    Correct answer
    D

    The geometric layer or kind of plot element to draw

    Explanation

    The tutorial describes geom_ functions as defining the layer or visualization to render, such as a bar chart or histogram.

  29. 29

    What is the significance of the gg in the name ggplot2, according to the tutorial?

    1. A

      It indicates that every plot must use a grid coordinate system

    2. B

      It stands for a general graphics file format

    3. C

      It refers to a graph-generating database

    4. D

      It refers to the grammar of graphics

    Correct answer
    D

    It refers to the grammar of graphics

    Explanation

    The package name comes from the grammar of graphics, abbreviated as gg.

  30. 30

    What combination of capabilities helps explain ggplot2's usefulness to data professionals?

    1. A

      It only creates simple charts but automatically interprets their results

    2. B

      It can produce polished graphics quickly while also allowing fine-grained customization

    3. C

      It replaces the need to understand data and choose suitable visualizations

    4. D

      It requires extensive code for every plot and disallows visual customization

    Correct answer
    B

    It can produce polished graphics quickly while also allowing fine-grained customization

    Explanation

    The tutorial emphasizes both quick production of print-quality graphics and the ability to control visual details through ggplot2's grammar and API.

  31. 31

    Why is geom_bar() suitable for plotting the categorical survived variable in the example?

    1. A

      A bar chart automatically identifies the cause of each passenger's death

    2. B

      A bar chart calculates the average of a continuous survival-time measurement

    3. C

      A bar chart is the only geometry that can use an x-axis mapping

    4. D

      A bar chart displays counts for categories, which is appropriate for this outcome

    Correct answer
    D

    A bar chart displays counts for categories, which is appropriate for this outcome

    Explanation

    The tutorial uses a bar chart for survived because the variable is categorical and a bar chart represents category counts.

  32. 32

    In a bar chart of survived, what does mapping survived to the x-axis accomplish?

    1. A

      It makes the vertical axis display passenger age

    2. B

      It divides the plot into panels by ticket class

    3. C

      It places the outcome categories on the horizontal axis

    4. D

      It assigns each passenger a unique color based on name

    Correct answer
    C

    It places the outcome categories on the horizontal axis

    Explanation

    Mapping survived to the x-axis places the two outcome categories, 0 and 1, along the horizontal axis.

  33. 33

    What does mapping a categorical variable to fill commonly do in the demonstrated bar charts?

    1. A

      It changes the variable into a continuous measurement

    2. B

      It color-codes plot elements according to that variable's categories

    3. C

      It removes any categories with small counts

    4. D

      It adds a new data column containing percentages

    Correct answer
    B

    It color-codes plot elements according to that variable's categories

    Explanation

    Mapping fill to a categorical variable lets ggplot2 color-code the plot elements according to that variable's levels, such as the two survival outcomes.

  34. 34

    What approximate overall survival proportions does the tutorial report for the Titanic data?

    1. A

      About 50% survived and about 50% perished

    2. B

      About 25% survived and about 75% perished

    3. C

      About 38% survived and about 62% perished

    4. D

      About 62% survived and about 38% perished

    Correct answer
    C

    About 38% survived and about 62% perished

    Explanation

    The tutorial estimates that roughly 38% of passengers survived and 62% perished.

  35. 35

    How can a plot's title and axis labels be customized in the tutorial's examples?

    1. A

      By converting the data frame to a spreadsheet

    2. B

      By setting the histogram's bin width

    3. C

      By using the labs() function

    4. D

      By changing the facet_wrap() function

    Correct answer
    C

    By using the labs() function

    Explanation

    The tutorial uses labs() to modify plot labels, including the title and axis labels.

  36. 36

    What visual change does the tutorial's use of theme_bw() make to the example chart?

    1. A

      It converts the bar chart into a density plot

    2. B

      It replaces the category labels with numerical percentages

    3. C

      It replaces the default gray background with a clean white background

    4. D

      It adds a separate panel for each ticket class

    Correct answer
    C

    It replaces the default gray background with a clean white background

    Explanation

    The speaker prefers a white background and uses theme_bw() to replace ggplot2's default gray background in the example.

  37. 37

    What pattern does the survival-by-sex visualization show?

    1. A

      Neither sex had any survivors in the dataset

    2. B

      Females and males had identical survival proportions

    3. C

      Females survived disproportionately more often than males

    4. D

      Males survived disproportionately more often than females

    Correct answer
    C

    Females survived disproportionately more often than males

    Explanation

    The color-coded bars show that most females survived, while most males did not, so female passengers survived disproportionately more often.

  38. 38

    What additional information about the passenger population is visible in the survival-by-sex chart?

    1. A

      There were approximately twice as many males as females

    2. B

      The chart shows that every passenger was traveling with family

    3. C

      There were equal numbers of males and females

    4. D

      There were approximately twice as many females as males

    Correct answer
    A

    There were approximately twice as many males as females

    Explanation

    In addition to survival differences, the chart indicates that there were approximately two males for every female passenger.

  39. 39

    What relationship between ticket class and survival is shown in the tutorial's chart?

    1. A

      Only second-class passengers survived

    2. B

      Survival generally increased from first class to second class to third class

    3. C

      Survival was identical across all three ticket classes

    4. D

      Survival generally declined from first class to second class to third class

    Correct answer
    D

    Survival generally declined from first class to second class to third class

    Explanation

    The chart shows the highest survival proportion in first class, a lower proportion in second class, and the lowest in third class.

  40. 40

    What is the purpose of using facet_wrap() to split a survival chart by pclass?

    1. A

      It converts ticket class to a continuous age scale

    2. B

      It removes the fill colors that distinguish survival outcomes

    3. C

      It creates separate panels for ticket classes so survival patterns can be compared within each class

    4. D

      It combines all ticket classes into one average survival value

    Correct answer
    C

    It creates separate panels for ticket classes so survival patterns can be compared within each class

    Explanation

    Faceting by pclass creates separate panels for first, second, and third class, allowing comparisons of survival patterns within each class.

  41. 41

    What is the main purpose of a histogram in the tutorial's analysis of passenger age?

    1. A

      To compare the font sizes used in plot labels

    2. B

      To display the relationship between two categorical variables

    3. C

      To show the distribution of ages by grouping values into intervals

    4. D

      To show individual ticket serial numbers in order

    Correct answer
    C

    To show the distribution of ages by grouping values into intervals

    Explanation

    The tutorial uses a histogram to examine the age distribution, grouping ages into bins.

  42. 42

    What does a histogram's binwidth control?

    1. A

      The width of the intervals into which numeric values are grouped

    2. B

      The number of categorical variables used for coloring

    3. C

      The transparency of overlapping plot elements

    4. D

      The size of the plot's title text

    Correct answer
    A

    The width of the intervals into which numeric values are grouped

    Explanation

    Bin width determines the width of the intervals used to group continuous values. The tutorial illustrates this with five-year age bins.

  43. 43

    Why does the tutorial recommend trying different histogram bin widths?

    1. A

      Changing bin width changes the underlying recorded ages

    2. B

      A histogram cannot display missing values unless the width is adjusted

    3. C

      The visual shape of a histogram changes with bin width, and the default may not be optimal

    4. D

      Different bin widths automatically identify causal relationships

    Correct answer
    C

    The visual shape of a histogram changes with bin width, and the default may not be optimal

    Explanation

    Histogram shape depends on bin width. The tutorial recommends experimenting because ggplot2's default may not be the most appropriate choice for the data.

  44. 44

    What broad pattern does the age histogram show about the passengers?

    1. A

      Most passengers were older than 80, with almost none between 20 and 40

    2. B

      All passengers were younger than 10

    3. C

      Many passengers were between about 20 and 40, with fewer very young and older passengers

    4. D

      Passenger ages were evenly distributed across all possible values

    Correct answer
    C

    Many passengers were between about 20 and 40, with fewer very young and older passengers

    Explanation

    The tutorial notes that a large share of passengers were between about 20 and 40, with a long tail toward older ages and comparatively few younger passengers.

  45. 45

    What does the age histogram indicate about children aboard the Titanic?

    1. A

      The histogram cannot show whether any children were aboard

    2. B

      Most passengers were younger than five

    3. C

      No children were present in the dataset

    4. D

      Some children were present, although they were not the majority of passengers

    Correct answer
    D

    Some children were present, although they were not the majority of passengers

    Explanation

    The histogram shows that children were present, though they made up a relatively small proportion of the passengers.

  46. 46

    What does adding fill = survived to an age histogram help reveal?

    1. A

      The exact name of every survivor in each age bin

    2. B

      The number of missing ages in every individual row

    3. C

      The relative counts of survivors and non-survivors within age bins

    4. D

      The average ticket price for each passenger age

    Correct answer
    C

    The relative counts of survivors and non-survivors within age bins

    Explanation

    Filling the histogram by survival outcome color-codes each age bin so the relative numbers who survived and perished can be compared.

  47. 47

    What does a box-and-whisker plot of age by survival status suggest in the tutorial?

    1. A

      Age distributions were exactly identical for both survival outcomes

    2. B

      Passengers who survived tended to be much older than those who perished

    3. C

      Passengers who survived tended to be somewhat younger than those who perished

    4. D

      Age had no relationship to survival in any part of the dataset

    Correct answer
    C

    Passengers who survived tended to be somewhat younger than those who perished

    Explanation

    The box-and-whisker plot suggests that survivors tended to be younger, although the difference shown by this plot is modest.

  48. 48

    How are the axes mapped in the tutorial's age box-and-whisker plot?

    1. A

      Sex is on the x-axis and passenger ID is on the y-axis

    2. B

      Ticket class is on the x-axis and fare is on the y-axis

    3. C

      Age is on the x-axis and survival status is on the y-axis

    4. D

      Survival status is on the x-axis and age is on the y-axis

    Correct answer
    D

    Survival status is on the x-axis and age is on the y-axis

    Explanation

    The plot maps survived to the x-axis and age to the y-axis, comparing age distributions across the two outcomes.

  49. 49

    How does the tutorial characterize a density plot in relation to a histogram?

    1. A

      It replaces the data values with passenger names

    2. B

      It presents similar distribution information in a smoothed form

    3. C

      It is a bar chart with a different background theme

    4. D

      It displays only category counts and cannot represent numeric data

    Correct answer
    B

    It presents similar distribution information in a smoothed form

    Explanation

    The tutorial describes density plots as analogous to histograms, but smoothed rather than displayed as squared-off bars.

  50. 50

    What effect does an alpha value of 0.5 have on plotted density areas?

    1. A

      It makes them partially transparent so overlapping areas can be seen

    2. B

      It removes the plot's coordinate system

    3. C

      It doubles the number of plotted observations

    4. D

      It changes the age bins to five-year intervals

    Correct answer
    A

    It makes them partially transparent so overlapping areas can be seen

    Explanation

    The alpha setting controls transparency. An alpha of 0.5 makes the plotted areas partly transparent, helping show overlaps.

  51. 51

    What can faceting an age histogram by both sex and ticket class reveal?

    1. A

      Only the overall average age of all passengers

    2. B

      The exact cause of death for each individual passenger

    3. C

      Only the total number of missing age values

    4. D

      How age and survival patterns vary across combinations of sex and ticket class

    Correct answer
    D

    How age and survival patterns vary across combinations of sex and ticket class

    Explanation

    Faceting by sex and pclass, while filling by survival, lets the viewer compare age and survival patterns across combinations of these variables.

  52. 52

    Why does the tutorial recommend looking at both density plots and histograms?

    1. A

      Different visualizations can reveal or communicate aspects of the data differently

    2. B

      The two plot types always produce identical shapes and conclusions

    3. C

      Histograms cannot be used to study numeric variables

    4. D

      A density plot is required to calculate missing ages

    Correct answer
    A

    Different visualizations can reveal or communicate aspects of the data differently

    Explanation

    The tutorial uses both to examine the data from different visual perspectives; in particular, the histogram makes some details, such as survival among young passengers, easier to see.

  53. 53

    Why should a non-data-savvy audience often be shown intuitive visualizations rather than complicated statistics first?

    1. A

      Visualizations eliminate the need to check whether an interpretation is supported

    2. B

      Non-data-savvy audiences cannot understand any numerical information

    3. C

      Visual patterns can help the audience recognize relationships without needing advanced data expertise

    4. D

      Summary statistics are always incorrect for business audiences

    Correct answer
    C

    Visual patterns can help the audience recognize relationships without needing advanced data expertise

    Explanation

    The tutorial argues that intuitive visualizations use human visual pattern recognition to make findings easier for a non-data-savvy audience to understand.

  54. 54

    Why does the tutorial use a business question as the starting point for choosing visualizations?

    1. A

      The question helps determine which data fields and visual encodings are relevant

    2. B

      The question automatically selects every plot's theme and font

    3. C

      The question ensures every variable is numeric

    4. D

      The question makes it unnecessary to understand the columns

    Correct answer
    A

    The question helps determine which data fields and visual encodings are relevant

    Explanation

    Understanding the columns and what they mean is important for selecting data and mappings that can address a particular business question.

  55. 55

    What does the tutorial mean by focusing on the “20%” of ggplot2 that is useful “80%” of the time?

    1. A

      It means every chart should omit 80% of its observations

    2. B

      It claims that ggplot2 can only create one-fifth of all possible plots

    3. C

      It prioritizes common, useful ggplot2 techniques rather than covering every advanced feature

    4. D

      It recommends using only one-fifth of the available dataset

    Correct answer
    C

    It prioritizes common, useful ggplot2 techniques rather than covering every advanced feature

    Explanation

    The tutorial deliberately focuses on commonly useful ggplot2 techniques and visualizations because time is limited, leaving advanced topics such as rich multi-layer plots for later.

  56. 56

    What does the tutorial suggest about using a single visualization to understand a dataset?

    1. A

      A single chart always reveals every important relationship

    2. B

      A chart's visual clarity guarantees its interpretation is complete

    3. C

      Different visualizations should never be compared

    4. D

      Using multiple types of visualizations can provide a more thorough view of the data

    Correct answer
    D

    Using multiple types of visualizations can provide a more thorough view of the data

    Explanation

    The tutorial uses multiple plots, such as histograms and box plots, because each can convey different aspects of a pattern and together provide a more thorough view.

  57. 57

    What is the tutorial's interpretation of the “women and children first” hypothesis in the Titanic data?

    1. A

      The data offer support, but age, sex, and ticket class together help explain survival patterns

    2. B

      The data reject any relationship between age and survival

    3. C

      The data show that sex alone completely explains every passenger's outcome

    4. D

      The data show that every woman and child survived regardless of ticket class

    Correct answer
    A

    The data offer support, but age, sex, and ticket class together help explain survival patterns

    Explanation

    The visualizations show higher survival among females and some children, while also indicating that age, sex, and ticket class together provide a richer explanation of survival patterns.

  58. 58

    What does the tutorial suggest about reusing ggplot2 code when making related charts?

    1. A

      Code reuse is possible only for plots with no aesthetic mappings

    2. B

      Every chart must be written from scratch because ggplot2 code cannot be reused

    3. C

      Copying a plot automatically changes the underlying dataset

    4. D

      Copying an existing plot and changing a few mappings or labels can make analysis efficient

    Correct answer
    D

    Copying an existing plot and changing a few mappings or labels can make analysis efficient

    Explanation

    The tutorial demonstrates copying an existing plot and modifying a small number of mappings, labels, or other elements to create related visualizations efficiently.

Question 1 of 58
Question 1 of 58

Ask anything

We've read this whole study set, so questions about it get the best answers.

FlashcardsQuizFill in the blanksWritten testLessonNotesPodcastContent