# (Frequency Histogram) - Bins of equal width [duplicate]

How do I create 5 bins of equal width to plot a frequency histogram of the following sequence of numbers?

0.15 0.54 0.23 0.65 0.36 0.15 0.87 0.65 0.90 0.64 0.74 0.98 0.96 0.74 0.82 0.91 0.19

This is just an example: I have more numbers. I am also asked to find it for 10 and 20 bins.

Could someone show me an example of how I would go about doing this?

• This reads like routine bookwork, as might be set for an exercise. It should probably carry the self-study tag. See its tag wiki. Oct 7, 2014 at 23:50

It is not exactly clear whether this is an elementary question which you should be able to tackle on your own, but I'll address it.

The first step is to summarize your data. For your example I get minimum $0.15$ and maximum $0.98$.

Bins are best chosen with nice numbers in mind. "Nice numbers" are a little hard to define but easy to recognise. They are based on powers of $10$ and multiples of $1$, $2$ and $5$.

Unless your data start well above $0$, or well below $0$, you should always consider including $0$ as a bin boundary.

Here a range from $0$ to $1$ seems obvious, at least with some experience. $5$ bins would mean intervals of $0.2$; $10$ of $0.1$ and $20$ of $0.05$.

In choosing bins it is vital to be careful, consistent and explicit about what happens if a value falls on the edge of a bin. One set of choices would be

• $0$ or more but less than $0.2$
• $0.2$ or more but less than $0.4$

and so forth. So the lower limit of each bin is included. The uppermost bin can be different. A common notation for that would be $[0, 0.2)$ and so forth.

For different measurement schemes, some flexibility is needed. Thus for degrees on a circle, bins of width $90^\circ$ with limits $[0, 90), [90, 180), [180, 270), [270, 360)$ would be much, much better than bins of width $100$.

• Thank you for your detailed reply, i really appreciate it. I just want to clarify does the bins go on the horizontal axis of the histogram? Cause i am asked to produce a historgram, and if i hve 20 bins i imagine drawing the horizontal axis is going to be really challenging. Oct 8, 2014 at 0:02
• I'd really recommend that you look at some elementary statistics text. It's indeed conventional to put magnitude on the horizontal axis in a histogram; I've done the opposite for altitudes, but your teachers may have strong views on the subject and regard that as odd if not wrong. I don't know in what sense drawing 20 bins is going to be "really challenging". In any case, you asked about how to produce a scheme of 20 bins. In your example, having only about one value on average in each bin would usually be regarded as a poor choice as it makes it difficult to see any patterns. Oct 8, 2014 at 0:17