# HistogramList

HistogramList[{x1,x2,}]

gives a list of bins and histogram heights of the values xi.

HistogramList[{{x1,y1,},{x2,y2,},}]

gives a list of bins and histogram heights of the values {xi,yi,}.

HistogramList[,bspec]

gives a list of bins and histogram heights with bins specified by bspec.

HistogramList[,bspec,hspec]

gives a list of bins and histogram heights with bin heights computed according to the specification hspec.

# Details and Options   • HistogramList is also known as quadrat counts.
• HistogramList produces a list of bin delimiters {b1,b2,} for each dimension and a depth- array of values for each bin.
• For 2D data, the output has the form {{{bx1,bx2,},{by1,}},{{v1,1,v1,2,},{v2,1,},}} where vi,j is the value corresponding to the bin [bxi,bxi+1)×[byj,byj+1).
• HistogramList[data] by default gives equal bins chosen to approximate an assumed underlying smooth distribution of the values {xi,yi,}.
• The width of each bin is computed according to the values xi, the width according to the yi, etc.
• The following bin specifications bpsec can be given:
•  n use n bins {w} use bins of width w {min,max,w} use bins of width w from min to max {{b1,b2,…}} use bins [b1,b2),[b2,b3),… Automatic determine bin widths automatically "name" use a named binning method {"Log",bspec} apply binning bspec on log-transformed data fw apply fw to get an explicit bin specification {b1,b2,…} {xspec,yspec,…} give different x, y, etc. specifications
• The binning specification "Log" is taken to use the Automatic underlying binning method.
• Possible named binning methods include:
•  "Sturges" compute the number of bins based on the length of data "Scott" asymptotically minimize the mean square error "FreedmanDiaconis" twice the interquartile range divided by the cube root of sample size "Knuth" balance likelihood and prior probability of a piecewise uniform model "Wand" one-level recursive approximate Wand binning
• The function fb in HistogramList[data,fb] is applied to a list of all {xi,yi,}, and should return an explicit bin list {{bx1,bx2,},{by1,by2,},}. In HistogramList[data,{fx,fy,}], fx is applied to the list of xi, and fy to the list of yi, etc.
• Different forms of histogram data can be obtained by giving different bin height specifications hspec in HistogramList[data,bspec,hspec]. The following forms can be used:
•  "Count" the number of values lying in each bin "CumulativeCount" cumulative counts "SurvivalCount" survival counts "Probability" fraction of values lying in each bin "PDF" probability density function "CDF" cumulative distribution function "SF" survival function "HF" hazard function "CHF" cumulative hazard function fh heights obtained by applying fh to bins and counts
• Only values {xi,yi,} that consist of real numbers are assigned to bins; others are taken to be missing.
• The function fh in HistogramList[data,bspec,fh] is applied to two arguments: a list of bin delimiters {{bx1,bx2,},{by1,by2,},} and for -dimensional data an array of depth with counts for each bin.

# Examples

open all close all

## Basic Examples(4)

Generate a list of bin delimiters and counts for a dataset:

 In:= Out= Generate a list of bin delimiters and counts for a bivariate dataset:

 In:= Out= Use unit width bins:

 In:= Out= Use different height functions:

 In:= In:= Out= In:= Out= In:= Out= ## Possible Issues(2)

Introduced in 2010
(8.0)