Everything else is ready: study the parts, the key terms and the quiz below.
Histograms and Density
See the shape of one feature, and read a smooth density without mistaking smoothing for observed data.
In this lesson6 parts
- 01What the recorded durations can show
- 02A histogram's shape depends on its bins
- 03Density is read through area
- 04The twenty minute boundary
- 05What a smooth density adds
- 06Reproduce and challenge the plot
Key terms
The words this lesson introduces, each in one line. The module’s glossary collects them all.
- bin
- A declared interval of values.
[5, 10)includes5and excludes10. - frequency
- The number of observations in a bin.
- histogram
- Counts observations inside adjacent numeric intervals.
- density
- A bar height whose width times height is the bin's fraction. Its unit is per unit of the x axis: per minute for trip durations.
- threshold
- The cutoff in the stated decision rule, such as
<= 20minutes. - kernel density estimate (KDE)
- A smoothed density estimated from observations: a small curve (a kernel) is placed at each value and the curves are added.
- rug plot
- Marks at observed values, one per recorded duration.
- bandwidth
- The amount of smoothing in a KDE. seaborn scales it with
bw_adjust.
Quiz 5 questions
Your first pick on each question is the one that counts, and a right one earns a coin. Getting one wrong here is how the lesson sticks.
Practice
Problems to solve in your own notebook. Each states the problem, not the steps: working out the steps is the exercise. Level A applies the lesson, B combines it with earlier ones, C stretches it.
The self-checking notebook for this lesson is Histograms, density and the ECDF.
Common mistakes
What you will see when it goes wrong, why it happens, and the fix.
Where it’s used
Where this lesson’s ideas turn up in real work.