0
$\begingroup$

In a bar-graph, the height of the bars represent the frequency of a particular category but it is counter-intuitive that in a histogram, instead of the height of the bar(which represents the frequency density), the area of the bar represents the frequency of the particular class. Why is this so?

$\endgroup$
  • $\begingroup$ In a bar graph the width of the bar conveys no information. In a histogram it does. You might find at least one or two of the related posts informative (see the sidebar on the right under "Related") in relation to histograms $\endgroup$ – Glen_b Dec 5 '16 at 2:03
  • $\begingroup$ The height in a bar graph conveys the frequency or number of times.(that is what i have read and have been doing all these years). $\endgroup$ – MrAP Dec 5 '16 at 7:32
  • $\begingroup$ Perhaps you should re-read what I wrote above; I made no reference to the height. I was discussing the width. Width is relevant to a question relating to area. (You might then ponder what it means when histogram bins are not all the same width.) $\endgroup$ – Glen_b Dec 5 '16 at 8:42
  • 1
    $\begingroup$ @Glen_b, Oh! I did not comprehend that properly. The width represents the class size but so what?We can still make the height of the bar represent the frequency.Can't we? $\endgroup$ – MrAP Dec 5 '16 at 8:56
  • 1
    $\begingroup$ Because the shape of the histogram no longer estimates the shape of the distribution from which you sample. Try varying the binwidth across the "histogram" in a variety of ways to compare the two $\endgroup$ – Glen_b Dec 10 '16 at 11:26
1
$\begingroup$

note that the purpose of a histogram is to estimate a probability density function for a continuous variable . for a probability density function (PDF) the area under the function is the probability of an event not the value of the function itself. so here we also want the area to represent the probability (relative frequency) of the events (our bins). if this is not done we would not get the visual similarity between the PDF and the histogram and other visual properties of the main distribution would not show themselves in the histogram (like skewness of data) correctly since we have not followed the definition.

so in a histogram, the height of each bin is:

1.

frequency/width_of_the_bin

in which case the area of the bar shows the absolute frequency .or

2.

frequency/(width*total_number_of_data)

in which case the area shows the probability of the bin (relative frequency).

since the two cases only differ in a scaling factor (1/total_number_of_data) the general visual properties of the two cases are the same.

also, note that since the parameter "width_of_the_bin" is usually considered equal among the bins this can again make the shape of the histogram the same as, if you used frequency for the heights of the bars. (since they are only different in a scaling factor). and in many examples out there this is what's happening.

although I'm not sure if this is correct according to the above definition(which there does not seem to be a consensus on), since the visual properties of the two plots are the same it does not cause any troubles when only the shape of the histogram is considered.

you can see examples for cases above in the Wikipedia page for histogram.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.