A probability distribution describes how observations are allocated across possible values or categories. For continuous data, a frequency distribution counts observations within value ranges; counts can be shown as raw frequencies, percentages, or proportions. Visualizing the distribution makes skew, outliers, and broader patterns easier to spot than a table of numbers alone. section 2.5.3
A histogram displays one continuous variable by dividing its range into bins and counting the observations in each bin. Bin choice affects how the shape appears, so it is part of the analytical decision rather than mere decoration. section 2.5.3
p1 <- ggplot(draft, aes(x = WS)) +
geom_histogram(fill = "royalblue3", color = "royalblue3",
bins = 8) +
labs(title = "Career Win Shares Distribution of
NBA First-Round Selections",
subtitle = "2000-09 NBA Drafts",
x = "Career Win Shares",
y = "Frequency") +
theme(plot.title = element_text(face = "bold"))
print(p1)
Build a histogram of career win shares by mapping win shares to the x-axis, selecting eight bins, and labeling the resulting frequency distribution. section 2.5.3
Read a distribution by looking for its shape and comparing useful summaries:
- A right-skewed distribution has many lower values and a tail extending toward larger values; career win shares for first-round selections show this pattern. section 2.5.3
- Boxplots compare distributions across groups, such as players’ birthplace and college attendance, while mean markers add a reference point. section 2.5.3
- Minimum, quartiles, mean, median, and maximum summarize a distribution numerically; grouping then summarizes how distributions differ by draft year. section 2.5.3
- Paired histograms overlay two distributions, such as games played and games won, using distinct colors, mean lines, and optional rug marks. section 15.3.2
Comparing NBA franchise histories
Reshape franchise records so games played and games won become one count variable with a group label, then overlay their histograms. Fifteen bins, dashed mean lines, and a rug plot make the two distributions comparable while still showing individual observations. section 15.3.2


























