Skip to content
ML Academy

SQL, data modeling, data quality, EDA, visualization · insight-1069

Try several histogram bin widths and check density plots for impossible values

Evidence type
documented fact
Difficulty
easy
Roles
Data analyst, Data scientist
Industries
cross-industry

Summary: situation, action, reason, boundary

  1. Situation

    A fare distribution is shown as one histogram with software-default bins, and a "second peak" is discussed in a meeting.

  2. Action

    Plot at least three bin widths (or bandwidths), keep a feature only if it persists, and clip or bound density plots at physical limits. State the bin width on the chart and mark zero or capacity limits.

  3. Reason

    Binning and smoothing are analysis choices that trade variance against bias, so a pattern that appears for one choice is weak evidence.

  4. Boundary

    Distribution checks in EDA, fare, delay and booking-lead-time profiles.

Symptom or risk

The apparent shape depends on bin width: narrow bins create jagged noise, wide bins erase real features, and a smoothed density can extend into negative fares.

Exceptions

Naturally discrete data, where bins should align to the integer values.

Trade-offs

Several panels use space; an ECDF avoids binning entirely.

Pitfalls

Choosing the bin width that makes the story fit.

Lessons and concepts

Claims and their sources