I expect that the answer you are expected to give to this question isOriginally Posted by crazy_gal108
that a bin width 0f 3 will give the data all falling within about 5 bins
which will be a bit to coarse to show whatever it is you expect the
histogram to show.
In the real world the number of bins you use depends on a number of factors.
The main one is "what do you want the histogram to show?" a second
important factor is "how many data points do you have?".
There are a number of formulas for the appropriate number of bins or bin
width to use for a histogram. Two of the most common are:
where h is the recommended bin width, and is an estimate
of the standard deviation of the data or underlying distribution, and
is the number of data points.
Freedman & Diaconis's rule:
where is the interquartile range of the data.