# Given this data, how could I graph a histogram?5, 7, 9, -1, -3, 4, 17, 16, 3, 2, 18, 13, 18, 18, 18, 19, 12, 20, 23, 22, 23, 26, 17, 13, 20, 4, 5, -2, 4, 5, 7

*print*Print*list*Cite

First put the data in order:

-3,-2,-1,2,3,4,4,4,5,5,5,7,7,9,12,13,13,16,17,17,

18,18,18,18,19,20,20,22,23,23,26

Note that the range of the data is 26-(-3)=29.

Now you must decide on the number of classes. This is often a matter of aesthetics. The generally accepted number of classes lies from 5 to 9, but this is not an absolute rule.

Let n=5 be the number of classes. Then the class size is `29/5=5.8` . Now we divide the data into classes of width at least 5.8 so that every datum occurs in one and only one class. Since the data are whole numbers, choose to start and end your classes at halves.

The classes would be:

`-3.5<x<=2.5`

`2.5<x<=8.5`

`8.5<x<=14.5`

`14.5<x<=20.5`

`20.5<x<=26.5`

Note that each datum lies in a class, and only in one class. (No overlaps)

Now count the number of data in each class:

`-3.5ltxlt=2.5 ==> 4`

`2.5<x<=8.5==>9`

`8.5<x<=14.5==>4`

` ` `14.5<x<=20.5==>10`

`20.5<x<=26.5==>4`

(Note that the number of data points,31, is the sum of the members of teh classes. Thus each data point is in one and only one class.)

Now you set up an axis -- the vertical axis is labelled as the count and runs from 0 to 10, while the horizontal axis is labelled with the classes. Each bar of the histogram must be of the same width.

Draw a vertical rectangle for each class; the rectangles should share a vertical side and the height of the rectangle is the number of members of the class. You will have five rectangles of equal width whose heights are 4,9,4,10,4 in that order.

Finally, take a look at your histogram. Does it convey the information the way you want it to? You might need to decrease the class size thus increasing the number of classes in order to convey more information. (e.g. if you change your class size to 3, the bars would have heights 3,1,7,2,1,3,3,7,3,1)