Suppose you have a large sample from a smooth, roughly normal variable. If you increase the number of bins in a histogram of this variable from a small number (e.g., 5) to a very large number (e.g., 200), what generally happens to the histogram’s appearance?
- Wrong: increasing the number of bins does not change which side of the distribution has the longer tail.
- Wrong: the number of bins directly changes how the data are grouped, so the plot’s appearance does change.
- Wrong: more bins means fewer observations per bin, which introduces more random noise, not less.
- Correct: with very many bins, each bin contains very few observations, so bar heights become noisy and jagged.
You want to compare the distributions of a numeric variable across three groups on the same plot. Why might overlaid kernel density plots be preferable to overlaid histograms for this purpose?
- Wrong: density plots are still affected by sample size, just like histograms.
- Wrong: density plots still require choosing a smoothing parameter, the bandwidth, which plays a role similar to bin width.
- Correct: continuous curves are easier to visually separate and compare than several sets of overlapping bars.
- Wrong: whether a density plot reveals more or less detail depends on the chosen bandwidth, just as a histogram depends on bin choice.
In a boxplot, the median line sits much closer to \(Q_1\) than to \(Q_3\), and the upper whisker is noticeably longer than the lower whisker. What does this suggest about the underlying distribution?
- Wrong: a symmetric distribution would have the median roughly centered in the box, with whiskers of similar length.
- Correct: a median pulled toward \(Q_1\) combined with a longer upper whisker is the signature of a right-skewed distribution.
- Wrong: a distribution with no variability would show a box collapsed to a single line, not this pattern.
- Wrong: this pattern would instead show the median pulled toward \(Q_3\) with a longer lower whisker.
Why is a bar plot, rather than a histogram, the appropriate choice for visualizing the distribution of a categorical variable such as ticket class?
- Wrong: using the wrong plot type misrepresents the nature of the variable (continuous vs. categorical).
- Wrong: bar plots are specifically meant for categorical, not continuous, data.
- Wrong: histograms can display raw counts by default, and can be converted to proportions with the
probabilityargument. - Correct: bar plots represent counts per category, with gaps between bars to show that categories are distinct, rather than binning a continuous range.