geom_bar(aes(x = class)) produces a bar chart without you ever specifying a y mapping. Where does the height of each bar come from?
- Wrong: alphabetical rank plays no role in bar height.
- Correct:
geom_bar()’s default statistical transformation,stat_count(), counts observations perxlevel. - Wrong:
geom_bar()works perfectly well with only anxmapping;yis optional because of the default count statistic. - Wrong: bar heights do vary and are meaningful, they represent counts.
Which of the following statements about histograms and density plots are TRUE? (Select all that apply.)
- TRUE: wider bins smooth over fine detail, which can obscure isolated extreme values.
- FALSE: histogram shape depends on
binwidth, and density plot shape depends on smoothing/bandwidth settings, the two do not automatically match. - TRUE: each bar counts the observations falling into that bin.
- TRUE: this is the defining property of a probability density.
In a geom_boxplot(), what does the thick line inside the box represent?
- Wrong: the mean is not directly marked on a standard boxplot.
- Wrong: boxplots do not depict the mode directly.
- Correct: the thick middle line marks the 50th percentile (median).
- Wrong: the maximum (excluding outliers) is marked by the end of the upper whisker, not the middle line.