This is documentation for Mathematica 8, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.1)

HistogramList

HistogramList
gives a list of bins and histogram heights of the values .
HistogramList
gives a list of bins and histogram heights of the values .
HistogramList
gives a list of bins and histogram heights with bins specified by bspec.
HistogramList
gives a list of bins and histogram heights with bin heights computed according to the specification hspec.
  • HistogramList produces a list of bin delimiters for each dimension and a depth- array of values for each bin.
  • For 2D data the output has the form where is the value corresponding to the bin .
  • HistogramList[data] by default gives equal bins chosen to approximate an assumed underlying smooth distribution of the values .
  • The width of each bin is computed according to the values , the width according to the , etc.
  • The following bin specifications bpsec can be given:
nuse n bins
{w}use bins of width w
{min,max,w}use bins of width w from min to max
{{b1,b2,...}}use bins
Automaticdetermine bin widths automatically
"name"use a named binning method
{"Log",bspec}apply binning bspec on log-transformed data
fwapply fw to get an explicit bin specification
{xspec,yspec,...}give different x, y, etc. specifications
  • The binning specification 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 is applied to a list of all , and should return an explicit bin list . In HistogramList, fx is applied to the list of , and fy to the list of , etc.
  • Different forms of histogram data can be obtained by giving different bin height specifications hspec in HistogramList. 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
fhheights obtained by applying fh to bins and counts
  • Only values that consist of real numbers are assigned to bins; others are taken to be missing.
  • The function fh in HistogramList is applied to two arguments: a list of bin delimiters and for -dimensional data an array of depth with counts for each bin.
Generate a list of bin delimiters and counts for a dataset:
Generate a list of bin delimiters and counts for a bivariate dataset:
Use unit width bins:
Use different height functions:
Generate a list of bin delimiters and counts for a dataset:
In[1]:=
Click for copyable input
Out[1]=
 
Generate a list of bin delimiters and counts for a bivariate dataset:
In[1]:=
Click for copyable input
Out[1]=
 
Use unit width bins:
In[1]:=
Click for copyable input
Out[1]=
 
Use different height functions:
In[1]:=
Click for copyable input
In[2]:=
Click for copyable input
Out[2]=
In[3]:=
Click for copyable input
Out[3]=
In[4]:=
Click for copyable input
Out[4]=
Specify the number of bins to use:
Specify the bin width:
Specify limits and bin size:
List specific bin delimiters:
Specify the number of bins to use for each dimension:
Specify different bin specifications for each dimension:
Use different named binning methods:
Use logarithmically spaced bins:
Delimit bins on integer boundaries using a binning function:
Use different height specifications:
Use a height function that accumulates the bin counts:
Non-real data is taken to be missing:
Functions such as Histogram and Histogram3D use HistogramList to compute bins and heights:
BinCounts and BinLists can be used to find items in specific bins:
HistogramList also provides the actual bins:
Bivariate data is given as a list of pairs of numbers:
There is one set of bins for each variable dimension:
The array depth of the counts is the same as the number of variable dimensions:
With data consisting of 5-tuples:
For bin delimiters there are bins in each dimension:
Results for multidimensional data can get quite large:
Most of the values are zero:
New in 8