2
$\begingroup$

The problem lies especially in the word-"binned". I've tried to consult the dictionary but it doesn't gives a satisfactory result.

I came across this while I was reading the difference between histogram and bar graph.

$\endgroup$
1
1
$\begingroup$

In a histogram you typically plot the values of a variable on the x-axis while plotting the frequency/count of the variable's values on the y-axis.

Especially with continous variables it is not very likely that you have the exact same value several times, rather you have similar values or values within a certain range (e.g. 1 to 1.5) that occur more than once.

Binning, thus, simply means that instead of plotting the count of each and every single observed value of a variable, you take ranges or bins of that variable and plot the frequency/count pertaining to values in that bin.

See: https://en.wikipedia.org/wiki/Data_binning

$\endgroup$
1
$\begingroup$

As a matter of general graphics, a histogram is $-$ or I would say should be considered as $-$ just a special case of a bar chart. The argument is simple: a histogram uses bars to show information, just like any other kind of bar chart. The information here can be frequencies, probabilities, proportions or fractions, probability densities or frequency densities.

In statistics, a histogram is often considered to be not a bar chart. (The term bar chart seems more common than, say, bar graph or bar plot, but I won't argue for one rather than another: feel free to follow personal or collective taste.) It's hard for me to work out exactly why this is said. It could be just a convention handed down: we have a long-established term (histogram was one of Karl Pearson's coinages) and specific rules that should be used. For example, if bins (classes, intervals) are of unequal width, then arguably only showing some kind of density that scales for those varying widths makes sense. But that still doesn't explain the denial to me. I detect a whiff of academic snobbery in denying that histograms are bar charts. Bar charts are, after all, often taught at an early age and their use by academics, researchers, or students in papers or texts is often considered indicative of limited, low-level analyses.

But I'd argue, and I doubt that I am alone, that any bar chart showing frequencies for a discrete variable is also a histogram. Conventionally, gaps are left to underline that the scale is discrete. If the bars shrink to spikes, many might demur in calling such plots either histograms or bar charts, but again that seems a matter of conventional usage rather than logic. Naturally, or arguably, there is no harm in using a simple evocative term: I've used the term "spike plots" and it is echoed in (for example) Stata's spikeplot command: see documentation here.

As already implied, I would be happy also to regard a histogram showing a continuous distribution by touching bars as a kind of bar chart. But watch out: if you follow that usage, you might be regarded as ignorant, or a little less bluntly, as just not having learned a standard term.

Either way, bin is a common word for each class or interval used on a histogram, or more generally in any grouping of a distribution into disjoint intervals. General-purpose dictionaries seem slow in catching that usage, which seems to have become increasingly common in recent decades. I think I first encountered it in J.W. Tukey. 1977. Exploratory data analysis Reading, MA: Addison-Wesley. The earliest use I can recall was by the statistically-minded geologist W.C. Krumbein in the 1930s.

(I'd add a precise reference later if I can find it again. Conversely, earlier references would be welcome.)

$\endgroup$
7
  • $\begingroup$ I think you are off base with that "whiff of academic snobbery." I believe there are several underlying, truly compelling reasons to insist that histograms represent frequencies with areas rather than heights. The best is that the area interpretation is the one that generalizes to probability density functions: the height interpretation does not. Another is that the distinction brings with it the realization that geometric elements of a graphic can function in differing ways to represent data effectively: we are not required to use lengths (or heights) alone. $\endgroup$ – whuber Nov 24 '16 at 14:56
  • $\begingroup$ @whuber Naturally I agree on, and am fully aware of, the area principle (although my answer could make that more obvious). But in turn you don't explain whether a histogram is, or is properly described as, a bar chart. I wasn't aware that anyone specifies that the bars in a bar chart have to be of equal width along one axis, although many people won't see many examples to the contrary. $\endgroup$ – Nick Cox Nov 24 '16 at 15:04
  • $\begingroup$ In a "bar chart," the lengths of the bars directly represent the quantity of interest. Even in variants where the widths represent something else, the lengths retain that meaning. Additionally, some people (see Wikipedia) allow that "bars may be arranged in any order": it's a categorical plot. Moreover, I am reluctant to allow gaps between the bars of a histogram: that would be deceptive. If you would like, then, to describe a histogram as a "contiguous ordered bar chart of probability (or frequency) density," that would be accurate. $\endgroup$ – whuber Nov 24 '16 at 15:10
  • $\begingroup$ Indeed; as my answer makes explicit, bar height can encode density, and only does that validly when density calculation adjusts for unequal bin widths. The first two paragraphs of my answer contrast what I see as the graphics view and the statistics view of histograms, which don't coincide. I am more than happy to allow gaps between bars of a histogram when the bars represent discrete values. $\endgroup$ – Nick Cox Nov 24 '16 at 15:24
  • $\begingroup$ Unsurprisingly to any who know my preferences, I like the Stata view of histograms which by default gives touching bars but lets the user insist on gaps (and I hate the Excel view which is entirely the opposite). To Stata and Excel, add any and all programs jumping either way. $\endgroup$ – Nick Cox Nov 24 '16 at 15:25
1
$\begingroup$

A histogram is a graphical representation of the estimated distribution of a variable (usually continuous). It consists of numbers for bins represented as bars.

Each bin is defined by an interval. The bar height for each bin represents the number of values that lies in the corresponding interval.

So, for example if we have a sample X = (-4.5, -2.7, 3.4, 4.7, 5.5, 5.8, 6.0, 8.9, 9.2, 12.0), we can plot a histogram with, let's say, 4 equal-sized bins.

Intervals for bins would be [-5, 0), [0, 5), [5, 10), [10, 15]. So your 3rd bin will have value of 5, because 5 values of X lie within it (between 5 and 10).

example

$\endgroup$
3
  • $\begingroup$ I've edited slightly for style. Strictly your open intervals leave ambiguous which bin receives values that are exact multiples of the bin width, e.g does 5 go up or down? One convention is ( ], ( ], ..., (); another is [ ), [ ), [) can make sense too. $\endgroup$ – Nick Cox Nov 23 '16 at 9:26
  • $\begingroup$ Thanks. It was sort of intentional, because I hesitated to additional information abou right or left-closed bins. $\endgroup$ – Andrey Kolyadin Nov 24 '16 at 9:38
  • 1
    $\begingroup$ You describe a bar chart of frequencies. By definition, a histogram represents frequencies or probabilities with areas, not heights. The distinction becomes clear in the histograms that have unequal bases to their bars. $\endgroup$ – whuber Nov 24 '16 at 14:53

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.