HistogramDistribution
The empirical density of , binned into equal-width bins of width — piecewise-constant.
HistogramDistribution(data, {dx})bins of width dx, starting at floor(min(data)/dx)*dx.HistogramDistribution(data, {x0, x1, dx})bins of width dx over the explicit range [x0, x1].Typed signatures
| Type | Package | Applies |
|---|---|---|
(list<real>, list<real>) -> distribution | statistics | always |
Details
- EXPLICIT bins only — Wolfram's own automatic-binning rule (
{}with no spec) is not pinned down here and is out of scope. The{dx}form picks as the first bin's left edge (a documented choice of this package, not Wolfram's own automatic rule) and covers every data point up to ;{x0, x1, dx}gives the range explicitly. - for the bin containing , outside every bin — piecewise CONSTANT.
- is piecewise LINEAR (the PDF's antiderivative) — full bins below contribute their whole count, 's own bin a fractional share.
- ; , with each bin's the standard uniform-on- second moment .
- Bin counts are exact integers and every PDF/CDF/Mean/Variance built from them stays exact (rational arithmetic throughout), even though the BINNING itself (which bin a data point falls in) is computed in plain numbers — inherently a floor/division on a numeric position.
Examples
About
| Examples | 5 |
|---|
See also: ProbabilityDistribution, EmpiricalDistribution, PDF, CDF