Graphical representation

Imagine we have the following data set:

Untitled

These data are the durations of eruptions of some geyser. Let’s sort it in ascending order:

Untitled

From here we clearly see the minimum value is $96$ and the maximum value is $306$. Also, if we pay attention we will find the middle elements are $240$, which is more closer to the maximum than the minimum.

Histogram

A classical way to display data. Let’s represent the data in a histogram:

  1. Divide the range of the data into intervals $B_1,\ldots,B_n$ (called bins). The histogram is a function constant in these intervals.

Untitled

  1. Determine the height of each bin $B_i$. To do this, we normalize the total area of the bars to $1$ by setting the height of the bin equal to:

    Untitled

    where $\#B_i$ denotes the number of data points in $B_i$ and $|B_i|$ is the length of $B_i$. Also:

    Untitled

This will result in:

Untitled

Histograms can have different widths (also known as bin size). For example, the same histogram but with smaller width ($|B_i|=2$):

Untitled

And greater ( $|B_i|=90$):

Untitled

As you can see, the shape changes, and some data might get lost if the width is too high. But if the width is very low, it might make the graph extremely hard to read. It is important to not to make the bin size too small or too big.

However, with histograms it is very complicated to identify the values of the 2 peak times. In those cases we use other data representations.