Posts tonen met het label Bar chart. Alle posts tonen
Posts tonen met het label Bar chart. Alle posts tonen

donderdag 22 mei 2014

2.2.2. Bar chart

As the name implies a bar-chart is data represented by bars. It is a common type of chart for discrete data. An example of a bar-chart is shown in Figure 8.

Figure 8. Example of a bar-chart

Note that the width of each bar is equal, there are gaps between the bars (to emphasize the discrete character), and the vertical (y) axis represents the frequencies. These points will be different in a histogram. It is also helpful if the bars are sorted from large too small.

An advantage of a bar-chart is that it can also compare two variables. This can either be done by adding the two on top of each other (known then as a compound- or stacked bar-chart) as shown in Figure 9, or next to each other (known as a clustered- or multiple bar-chart) as shown in Figure 10.

Figure 9. Example of a compound bar chart



Figure 10. Example of a clustered bar chart

A few notes on drawing a bar-chart
As a guideline for the size of the bar there is a rule of thumb known as the 'three quarter high rule' (Pitts, 1971). It means that the height of the y-axis should be 3/4 of the length of the horizontal x-axis. So if the horizontal axis is 20 cm long, the vertical axis should be 3/4 * 20 = 15 cm high.

According to Singh (2009) vertical bars (instead of horizontal bars as for example in Figure 11) are preferred since they are easier on the eye. However if you have long category names some names might become unreadable. A bar chart with the bars placed horizontally might then be preferred.


History
Although the diagrams used by Nicole Oresme (1486) do look like a bar-chart, they were mainly used to illustrate a theoretical concept and not so much as a descriptive statistic. The earliest known bar-chart (Figure 11) used as a descriptive comes again from William Playfair (1786).


Figure 11. Earliest known bar chart. Reprinted from The commercial and political atlas (p. XX), by W. Playfair, 1786, London: Debrett; Robinson; and Sewell

>>Next section: Histogram

References
Singh, G. (2009). Map Work And Practical Geography (4th ed.). New Delhi: Vikas Publishing House Pvt Ltd.  Available at Amazon

Pitts, C. E. (1971). Introduction to Educational Psychology: An Operant Conditioning Approach. New York: Crowell. Available at Amazon
Oresme, N. (1486). Tractatus de latitudinibus formarum. (B. Pelacani da Parma, Ed.). Padua: Mathaeus Cerdonis. Retrieved from http://catalog.hathitrust.org/Record/010883454

Playfair, W. (1786). The commercial and political atlas. London: Debrett; Robinson; and Sewell. New edition available on Amazon.

woensdag 21 mei 2014

2.2.3. Histogram


The term histogram was introduced by Pearson (1895) and defined as "...a term for a common form of graphical representation, i.e., by columns marking as areas the frequency corresponding to the range of their base" (p. 399).

Figure 12 shows an example of a histogram.


Figure 12. Example of a histogram.

The area of a rectangle is the width x height, which should equal the (absolute) frequency and since the width is determined by the class width, we obtain the following equation: Class Width x Height = (Absolute) Frequency. From this we can deduce that Height = Absolute Frequency / Class Width, which is the same formula for the Frequency Density. Therefore the height of the bars in a histogram is determined by the frequency density and NOT the absolute frequency itself (which is represented by the area of the bar).

Note that many books and software programs do use the absolute frequency as the height in a histogram. When all classes have the same width this is not a big problem, but when they vary it is misleading.

Bar-charts and histograms are often incorrectly considered to be the same. An overview of the main differences is summarized in Table 9.

Table 9
Differences between Bar-charts and Histograms

Bar-chart
Histogram
Type of data
Discrete
Continuous
Width of the bars / bins
Freely to choose, but all bars the same width
Depends on the class width
Height of the bars / bins
Any type of frequency
Any type of frequency density
Positioning of bars / bins
Small gaps between the bars to highlight the discrete data type
No gaps

 
>> Next entry: Charts with lines
 
References
Pearson, K. (1895). Contributions to the Mathematical Theory of Evolution. II. Skew Variation in Homogeneous Material. Philosophical Transactions of the Royal Society of London. (A.), 186, 343–414. doi:10.1098/rsta.1895.0010