liveBook · Manning

Bucket

As explained in Statistics Slam Dunk

A bin is an interval used to group continuous numeric observations when tabulating or plotting their frequencies.

A bucket is an interval used to group continuous numeric observations when counting or plotting their frequencies. Histograms display how many observations fall between specified bucket boundaries, making the overall distribution easier to inspect. section 1.2.1

Choose the number of buckets with the record count in mind. A practical rule of thumb sets the count near the square root of the number of observations, while keeping it at or below 20 when appropriate. For 300 NBA observations, 15 buckets provides a reasonable choice. section 14.3

Plotting points scored with 15 buckets

Use ggplot2 to place PTS on the x-axis and divide its values into 15 buckets. Add vertical lines for the mean and median, then compare the visual shape with a Shapiro-Wilk test. The histogram may appear approximately normal, but the reported p-value of 0.04124 falls below 0.05, so visual symmetry alone should not establish normality. section 14.3

Buckets can also turn a continuous measure into categories for grouped summaries. For example, Gini coefficients are assigned to labeled bands, converted to factors, and summarized by average winning percentage before plotting a bar chart. section 12.9

How Statistics Slam Dunk covers it

How deep it goes
Defines buckets, recommends a selection rule, demonstrates R implementation, and cautions against relying on visual normality alone.
Examples
Demonstrates 15-bin NBA points histograms, paired games-and-wins histograms, and Gini coefficient bands for winning percentages.
What it assumes
Assumes basic continuous variables and frequency plots while teaching bucket selection through NBA data examples.
What you can do after
Apply it via ggplot2 by selecting bucket counts, plotting frequencies, and grouping numeric measures for comparison.
How it connects
Connects buckets with histograms, frequency distributions, factors, grouped summaries, and normality testing.

Also explained in

Compare how 9 books explain bucket →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Statistics Slam Dunk. The section links point to the parts of the book it draws on.