The results of analysis have value only when they are communicated to others. Trends that cannot be noticed by simply looking at a table of numbers can become immediately clear with an appropriate graph. In this lesson, you will learn how to choose visualizations according to purpose, how to identify misleading graphs, how to visualize text data, and the process of modeling and verification based on data.
Choosing Graphs According to Purpose
Choose a graph based on “what you want to show.”
・Comparison of quantities → Bar graph
・Changes over time → Line graph
・Proportion of the whole → Pie chart・band graph (band graphs are also effective for comparing proportions)
・Relationship between two quantities → Scatter plot
・Distribution of one quantity → Histogram
・Comparison of distributions among several groups → Arrange box-and-whisker plots side by side
・Variations in large amounts of numerical data across rows×columns → Heat map (represents the size of values through color intensity. Example: number of visitors by day of the week×time period)
A bubble chart, which represents a third quantity by the size of points in addition to two axes, and a combination chart, which overlays a bar graph and a line graph (for example, bars for precipitation+a line for temperature), are also used to visualize data containing a large amount of information.
Be Careful with Misleading Graphs
Graphs are powerful means of communication, but they can mislead people intentionally or accidentally. Learn the common patterns.
・Omitting part of the vertical axis: A bar graph that does not begin at 0 can make a small difference look many times larger.
・3D pie chart: Sectors in the foreground appear larger than they really are.
・Inconsistent scale intervals: Mixing years at one-year intervals with years at five-year intervals on the horizontal axis can cause readers to misunderstand the rate of change.
・Selecting a convenient period: Showing only the interval in which values are increasing.
When making graphs, be honest. When reading them, make it a habit to check whether the axis begins at 0 and whether the scale marks are equally spaced.
Visualization of Text Data — Text Mining
Text data such as free-response answers in questionnaires (unstructured data) can also be analyzed. The method of breaking text into words and examining their frequencies and connections is called text mining. A word cloud, which displays more frequent words in larger sizes, and a co-occurrence network, which connects words that are often used together with lines, make it possible to grasp trends in large amounts of free-response data quickly.
Data-Based Modeling and Verification
After understanding trends through visualization, proceed to modeling, which expresses relationships with equations. For example, the regression line y=ax+b is a “prediction model created from data.” It is important not to stop after creating a model, but to repeat the cycle of checking whether predictions are accurate with new data and revising the model when they are not (PPDAC’s Analysis→Conclusion→new Problem). A model is a simplification of reality, and no model is completely correct. It is an honest practice in data science to state conclusions together with “the range in which the model applies and the degree to which it can be trusted.”
- Bars=comparison, lines=trends, pie・band=proportions, scatter plots=relationships, histograms=distributions, box-and-whisker plots=comparison of distributions, heat maps=variations across rows×columns.
- Omitting part of the vertical axis, 3D pie charts, inconsistent scales, and selecting only convenient periods can cause misunderstanding.
- Free responses can be visualized through text mining (word clouds・co-occurrence networks).
- Models are not finished when created; verify and revise them repeatedly with new data.
- State the range of application and limitations in conclusions.
Practice Problems
- State the most appropriate graph for visualizing each data set. ① Monthly changes in average temperature over one year ② Distribution of commuting times for all students in a class ③ Number of library users by day of the week×time period
- Explain the problem with a bar graph whose vertical axis does not begin at 0.
- When comparing scores from two classes, what additional information can be learned by arranging box-and-whisker plots, in addition to comparing mean scores? Give two examples.
Answers・Explanations
- Answer: ① Line graph ② Histogram ③ Heat map
Explanation: ① shows changes over time, ② shows the distribution of one quantity, and ③ clearly represents the size of values across rows (days of the week)×columns (time periods) through color intensity. - Answer: Even a small actual difference can appear to be many times larger because the difference in bar lengths is emphasized, giving the reader a false impression.
Explanation: This may be used intentionally when someone wants to emphasize a difference. When reading a graph, always check the starting point of the axis and the scale marks. - Answer: (Examples) ① Differences in the amount of spread (interquartile range and whisker length) can be seen. ② The median, maximum, minimum, skewness of the distribution, and presence or absence of outliers can be seen.
Explanation: Even when means are the same, the shapes of distributions may be completely different. Box-and-whisker plots allow the five-number summaries to be compared at a glance.