How to choose the bins of a histogram?

Gianluca Malato
3 min readNov 22, 2021
Image by author

Histograms are a very useful tool when we want to give a quick sight to the shape of our data. However, we always have to choose the right number of bins.

What is a histogram?

A histogram is a representation of the probability distribution of a dataset. Given a bin width, the range of the variable is split into non-overlapping intervals of that width and…

--

--

Gianluca Malato

Theoretical Physicists, Data Scientist and fiction author. I teach Data Science, statistics and SQL on YourDataTeacher.com. E-mail: gianluca@gianlucamalato.it