A histogram is a graphical representation of tabulated frequencies, shown as adjacent rectangles erected over discrete intervals called bins, with an area proportional to the frequency of observations in that interval. It was first introduced by Karl Pearson as a way to roughly assess the probability distribution of a given variable. The heights of the rectangles represent frequency densities, and the total area equals the number of data points. Histograms are used to estimate the probability density function of continuous variables and plot the distribution of data.
A histogram is a graphical representation of tabulated frequencies, shown as adjacent rectangles erected over discrete intervals called bins, with an area proportional to the frequency of observations in that interval. It was first introduced by Karl Pearson as a way to roughly assess the probability distribution of a given variable. The heights of the rectangles represent frequency densities, and the total area equals the number of data points. Histograms are used to estimate the probability density function of continuous variables and plot the distribution of data.
A histogram is a graphical representation of tabulated frequencies, shown as adjacent rectangles erected over discrete intervals called bins, with an area proportional to the frequency of observations in that interval. It was first introduced by Karl Pearson as a way to roughly assess the probability distribution of a given variable. The heights of the rectangles represent frequency densities, and the total area equals the number of data points. Histograms are used to estimate the probability density function of continuous variables and plot the distribution of data.
For the histograms used in digital image processing, see Image histogram and Color histogram. Histogram First described by Karl Pearson Purpose To roughly assess the probability distribution of a given variable by depicting the freuencies of observations occurring in certain ranges of values In statistics, a histogram is a graphical representation of the distribution of data. It is an estimate of the probability distribution of a continuous variable and !as first introduced by Karl Pearson. "#$ % histogram is a representation of tabulated freuencies, sho!n as ad&acent rectangles or suares 'in some situations(, erected over discrete intervals 'bins(, !ith an area proportional to the freuency of the observations in the interval. The height of a rectangle is also eual to the freuency density of the interval, i.e., the freuency divided by the !idth of the interval. The total area of the histogram is eual to the number of data. % histogram may also be normali)ed displaying relative freuencies. It then sho!s the proportion of cases that fall into each of several categories, !ith the total area eualing #. The categories are usually specified as consecutive, non*overlapping intervals of a variable. The categories 'intervals( must be ad&acent, and often are chosen to be of the same si)e. "+$ The rectangles of a histogram are dra!n so that they touch each other to indicate that the original variable is continuous. ",$ -istograms are used to plot the density of data, and often for density estimation. estimating the probability density function of the underlying variable. The total area of a histogram used for probability density is al!ays normali)ed to #. If the length of the intervals on the x*a/is are all #, then a histogram is identical to a relative freuency plot. %n alternative to the histogram is kernel density estimation, !hich uses a kernel to smooth samples. This !ill construct a smooth probability density function, !hich !ill in general more accurately reflect the underlying variable. The histogram is one of the seven basic tools of uality control. "0$ Contents # 1tymology + 1/amples , 2athematical definition o ,.# Cumulative histogram o ,.+ 3umber of bins and !idth 0 4ee also 5 6eferences 7 Further reading 8 1/ternal links Etymology %n e/ample histogram of the heights of ,# 9lack Cherry trees. The etymology of the !ord histogram is uncertain. 4ometimes it is said to be derived from the :reek histos ;anything set upright; 'as the masts of a ship, the bar of a loom, or the vertical bars of a histogram(< and gramma ;dra!ing, record, !riting;. It is also said that Karl Pearson, !ho introduced the term in #=>#, derived the name from ?historical diagram?. "5$ Examples The @.4. Census 9ureau found that there !ere #+0 million people !ho !ork outside of their homes. "7$ @sing their data on the time occupied by travel to !ork, Table + belo! sho!s the absolute number of people !ho responded !ith travel times ?at least ,A but less than ,5 minutes? is higher than the numbers for the categories above and belo! it. This is likely due to people rounding their reported &ourney time. "citation needed$ The problem of reporting values as some!hat arbitrarily rounded numbers is a common phenomenon !hen collecting data from people. "citation needed$ -istogram of travel time 'to !ork(, @4 +AAA census. %rea under the curve euals the total number of cases. This diagram uses BC!idth from the table. Data by absolute numbers Interval Width Quantity Quantity/width A 5 0#=A =,7 5 5 #,7=8 +8,8 #A 5 #=7#= ,8+, #5 5 #>7,0 ,>+7 +A 5 #8>=# ,5>7 +5 5 8#>A #0,= ,A 5 #7,7> ,+8, ,5 5 ,+#+ 70+ 0A 5 0#++ =+0 05 #5 >+AA 7#, 7A ,A 707# +#5 >A 7A ,0,5 58 This histogram sho!s the number of cases per unit interval as the height of each block, so that the area of each block is eual to the number of people in the survey !ho fall into its category. The area under the curve represents the total number of cases '#+0 million(. This type of histogram sho!s absolute numbers, !ith B in thousands. -istogram of travel time 'to !ork(, @4 +AAA census. %rea under the curve euals #. This diagram uses BCtotalC!idth from the table. Data by proportion Interval Width Quantity Q! Q/total/width A 5 0#=A A.AA78 5 5 #,7=8 A.A++# #A 5 #=7#= A.A,AA #5 5 #>7,0 A.A,#7 +A 5 #8>=# A.A+>A +5 5 8#>A A.A##7 ,A 5 #7,7> A.A+70 ,5 5 ,+#+ A.AA5+ 0A 5 0#++ A.AA77 05 #5 >+AA A.AA0> 7A ,A 707# A.AA#8 >A 7A ,0,5 A.AAA5 This histogram differs from the first only in the vertical scale. The area of each block is the fraction of the total that each category represents, and the total area of all the bars is eual to # 'the fraction meaning ?all?(. The curve displayed is a simple density estimate. This version sho!s proportions, and is also kno!n as a unit area histogram. In other !ords, a histogram represents a freuency distribution by means of rectangles !hose !idths represent class intervals and !hose areas are proportional to the corresponding freuencies. the height of each is the average freuency density for the interval. The intervals are placed together in order to sho! that the data represented by the histogram, !hile e/clusive, is also contiguous. '1.g., in a histogram it is possible to have t!o connecting intervals of #A.5E+A.5 and +A.5E,,.5, but not t!o connecting intervals of #A.5E+A.5 and ++.5E,+.5. 1mpty intervals are represented as empty and not skipped.( "8$ "athematical de#inition %n ordinary and a cumulative histogram of the same data. The data sho!n is a random sample of #A,AAA points from a normal distribution !ith a mean of A and a standard deviation of #. In a more general mathematical sense, a histogram is a function mi that counts the number of observations that fall into each of the dis&oint categories 'kno!n as bins(, !hereas the graph of a histogram is merely one !ay to represent a histogram. Thus, if !e let n be the total number of observations and k be the total number of bins, the histogram mi meets the follo!ing conditions. Cumulative histogram % cumulative histogram is a mapping that counts the cumulative number of observations in all of the bins up to the specified bin. That is, the cumulative histogram Mi of a histogram mj is defined as. $umber o# bins and width There is no ?best? number of bins, and different bin si)es can reveal different features of the data. :rouping data is at least as old as :raunt;s !ork in the #8th century, but no systematic guidelines !ere given "=$ until 4turges;s !ork in #>+7. ">$ @sing !ider bins !here the density is lo! reduces noise due to sampling randomness< using narro!er bins !here the density is high 'so the signal dro!ns the noise( gives greater precision to the density estimation. Thus varying the bin*!idth !ithin a histogram can be beneficial. 3onetheless, eual*!idth bins are !idely used. 4ome theoreticians have attempted to determine an optimal number of bins, but these methods generally make strong assumptions about the shape of the distribution. Depending on the actual data distribution and the goals of the analysis, different bin !idths may be appropriate, so e/perimentation is usually needed to determine an appropriate !idth. There are, ho!ever, various useful guidelines and rules of thumb. "#A$ The number of bins k can be assigned directly or can be calculated from a suggested bin !idth h as. The braces indicate the ceiling function. 4uare*root choice !hich takes the suare root of the number of data points in the sample 'used by 1/cel histograms and many others(. "##$ 4turges; formula 4turges; formula ">$ is derived from a binomial distribution and implicitly assumes an appro/imately normal distribution. It implicitly bases the bin si)es on the range of the data and can perform poorly if n F ,A. "citation needed$ It may also perform poorly if the data are not normally distributed. 6ice 6ule The 6ice 6ule "#+$ is presented as a simple alternative to 4turges;s rule. Doane;s formula Doane;s formula "#,$ is a modification of 4turges; formula !hich attempts to improve its performance !ith non*normal data. !here is the estimated ,rd*moment*ske!ness of the distribution and 4cott;s normal reference rule !here is the sample standard deviation. 4cott;s normal reference rule "#0$ is optimal for random samples of normally distributed data, in the sense that it minimi)es the integrated mean suared error of the density estimate. "=$ FreedmanEDiaconis; choice The FreedmanEDiaconis rule is. "#5$"=$ !hich is based on the interuartile range, denoted by IB6. It replaces ,.5G of 4cott;s rule !ith + IB6, !hich is less sensitive than the standard deviation to outliers in data. Choice based on minimi)ation of an estimated L +"#7$ risk function !here and are mean and biased variance of a histogram !ith bin*!idth , and . 6emark % good reason !hy the number of bins should be proportional to is the follo!ing. suppose that the data are obtained as independent reali)ations of a bounded probability distribution !ith smooth density. Then the histogram remains eually HruggedI as tends to infinity. If is the H!idthI of the distribution 'e. g., the standard deviation or the inter* uartile range(, then the number of units in a bin 'the freuency( is of order and the relative standard error is of order . Comparing to the ne/t bin, the relative change of the freuency is of order provided that the derivative of the density is non* )ero. These t!o are of the same order if is of order , so that is of order . This simple cubic root choice can also be applied to bins !ith non*constant !idth. %ee also Wikimedia Commons has media related to Histograms. Statistics portal Data binning Density estimation o Kernel density estimation, a smoother but more comple/ method of density estimation FreedmanEDiaconis rule Image histogram Pareto chart 4even 9asic Tools of Buality J*optimal histograms