Products
  • Wolfram|One

    The definitive Wolfram Language and notebook experience

  • Mathematica

    The original technical computing environment

  • Wolfram Notebook Assistant + LLM Kit

    All-in-one AI assistance for your Wolfram experience

  • System Modeler
  • Wolfram Player
  • Finance Platform
  • Wolfram Engine
  • Enterprise Private Cloud
  • Application Server
  • Wolfram|Alpha Notebook Edition
  • Wolfram Cloud App
  • Wolfram Player App

More mobile apps

Core Technologies of Wolfram Products

  • Wolfram Language
  • Computable Data
  • Wolfram Notebooks
  • AI & Linguistic Understanding

Deployment Options

  • Wolfram Cloud
  • wolframscript
  • Wolfram Engine Community Edition
  • Wolfram LLM API
  • WSTPServer
  • Wolfram|Alpha APIs

From the Community

  • Function Repository
  • Community Paclet Repository
  • Example Repository
  • Neural Net Repository
  • Prompt Repository
  • Wolfram Demonstrations
  • Data Repository
  • Group & Organizational Licensing
  • All Products
Consulting & Solutions

We deliver solutions for the AI era—combining symbolic computation, data-driven insights and deep technical expertise

  • Data & Computational Intelligence
  • Model-Based Design
  • Algorithm Development
  • Wolfram|Alpha for Business
  • Blockchain Technology
  • Education Technology
  • Quantum Computation

WolframConsulting.com

Wolfram Solutions

  • Data Science
  • Artificial Intelligence
  • Biosciences
  • Healthcare Intelligence
  • Sustainable Energy
  • Control Systems
  • Enterprise Wolfram|Alpha
  • Blockchain Labs

More Wolfram Solutions

Wolfram Solutions For Education

  • Research Universities
  • Colleges & Teaching Universities
  • Junior & Community Colleges
  • High Schools
  • Educational Technology
  • Computer-Based Math

More Solutions for Education

  • Contact Us
Learning & Support

Get Started

  • Wolfram Language Introduction
  • Fast Intro for Programmers
  • Fast Intro for Math Students
  • Wolfram Language Documentation

More Learning

  • Highlighted Core Areas
  • Demonstrations
  • YouTube
  • Daily Study Groups
  • Wolfram Schools and Programs
  • Books

Grow Your Skills

  • Wolfram U

    Courses in computing, science, life and more

  • Community

    Learn, solve problems and share ideas.

  • Blog

    News, views and insights from Wolfram

  • Resources for

    Software Developers

Tech Support

  • Contact Us
  • Support FAQs
  • Support FAQs
  • Contact Us
Company
  • About Wolfram
  • Career Center
  • All Sites & Resources
  • Connect & Follow
  • Contact Us

Work with Us

  • Student Ambassador Initiative
  • Wolfram for Startups
  • Student Opportunities
  • Jobs Using Wolfram Language

Educational Programs for Adults

  • Summer School
  • Winter School

Educational Programs for Youth

  • Middle School Camp
  • High School Research Program
  • Computational Adventures

Read

  • Stephen Wolfram's Writings
  • Wolfram Blog
  • Wolfram Tech | Books
  • Wolfram Media
  • Complex Systems

Educational Resources

  • Wolfram MathWorld
  • Wolfram in STEM/STEAM
  • Wolfram Challenges
  • Wolfram Problem Generator

Wolfram Initiatives

  • Wolfram Science
  • Wolfram Foundation
  • History of Mathematics Project

Events

  • Stephen Wolfram Livestreams
  • Online & In-Person Events
  • Contact Us
  • Connect & Follow
Wolfram|Alpha
  • Your Account
  • User Portal
  • Wolfram Cloud
  • Products
    • Wolfram|One
    • Mathematica
    • Wolfram Notebook Assistant + LLM Kit
    • System Modeler
    • Wolfram Player
    • Finance Platform
    • Wolfram|Alpha Notebook Edition
    • Wolfram Engine
    • Enterprise Private Cloud
    • Application Server
    • Wolfram Cloud App
    • Wolfram Player App

    More mobile apps

    • Core Technologies
      • Wolfram Language
      • Computable Data
      • Wolfram Notebooks
      • AI & Linguistic Understanding
    • Deployment Options
      • Wolfram Cloud
      • wolframscript
      • Wolfram Engine Community Edition
      • Wolfram LLM API
      • WSTPServer
      • Wolfram|Alpha APIs
    • From the Community
      • Function Repository
      • Community Paclet Repository
      • Example Repository
      • Neural Net Repository
      • Prompt Repository
      • Wolfram Demonstrations
      • Data Repository
    • Group & Organizational Licensing
    • All Products
  • Consulting & Solutions

    We deliver solutions for the AI era—combining symbolic computation, data-driven insights and deep technical expertise

    WolframConsulting.com

    Wolfram Solutions

    • Data Science
    • Artificial Intelligence
    • Biosciences
    • Healthcare Intelligence
    • Sustainable Energy
    • Control Systems
    • Enterprise Wolfram|Alpha
    • Blockchain Labs

    More Wolfram Solutions

    Wolfram Solutions For Education

    • Research Universities
    • Colleges & Teaching Universities
    • Junior & Community Colleges
    • High Schools
    • Educational Technology
    • Computer-Based Math

    More Solutions for Education

    • Contact Us
  • Learning & Support

    Get Started

    • Wolfram Language Introduction
    • Fast Intro for Programmers
    • Fast Intro for Math Students
    • Wolfram Language Documentation

    Grow Your Skills

    • Wolfram U

      Courses in computing, science, life and more

    • Community

      Learn, solve problems and share ideas.

    • Blog

      News, views and insights from Wolfram

    • Resources for

      Software Developers
    • Tech Support
      • Contact Us
      • Support FAQs
    • More Learning
      • Highlighted Core Areas
      • Demonstrations
      • YouTube
      • Daily Study Groups
      • Wolfram Schools and Programs
      • Books
    • Support FAQs
    • Contact Us
  • Company
    • About Wolfram
    • Career Center
    • All Sites & Resources
    • Connect & Follow
    • Contact Us

    Work with Us

    • Student Ambassador Initiative
    • Wolfram for Startups
    • Student Opportunities
    • Jobs Using Wolfram Language

    Educational Programs for Adults

    • Summer School
    • Winter School

    Educational Programs for Youth

    • Middle School Camp
    • High School Research Program
    • Computational Adventures

    Read

    • Stephen Wolfram's Writings
    • Wolfram Blog
    • Wolfram Tech | Books
    • Wolfram Media
    • Complex Systems
    • Educational Resources
      • Wolfram MathWorld
      • Wolfram in STEM/STEAM
      • Wolfram Challenges
      • Wolfram Problem Generator
    • Wolfram Initiatives
      • Wolfram Science
      • Wolfram Foundation
      • History of Mathematics Project
    • Events
      • Stephen Wolfram Livestreams
      • Online & In-Person Events
    • Contact Us
    • Connect & Follow
  • Wolfram|Alpha
  • Wolfram Cloud
  • Your Account
  • User Portal
Wolfram Language & System Documentation Center
HistogramDistribution
  • See Also
    • Histogram
    • Histogram3D
    • HistogramList
    • EmpiricalDistribution
    • SmoothKernelDistribution
  • Related Guides
    • Nonparametric Statistical Distributions
    • Random Variables
    • Time Series Processing
    • Tabular Modeling
    • See Also
      • Histogram
      • Histogram3D
      • HistogramList
      • EmpiricalDistribution
      • SmoothKernelDistribution
    • Related Guides
      • Nonparametric Statistical Distributions
      • Random Variables
      • Time Series Processing
      • Tabular Modeling

HistogramDistribution[{x1,x2,…}]

represents the probability distribution corresponding to a histogram of the data values xi.

HistogramDistribution[{{x1,y1,…},{x2,y2,…},…}]

represents a multivariate histogram distribution based on data values {xi,yi,…}.

HistogramDistribution[…,bspec]

represents a histogram distribution with bins specified by bspec.

Details
Details and Options Details and Options
Examples  
Basic Examples  
Scope  
Basic Uses  
Distribution Properties  
Binning  
Applications  
Properties & Relations  
Possible Issues  
Neat Examples  
See Also
Related Guides
History
Cite this Page
BUILT-IN SYMBOL
  • See Also
    • Histogram
    • Histogram3D
    • HistogramList
    • EmpiricalDistribution
    • SmoothKernelDistribution
  • Related Guides
    • Nonparametric Statistical Distributions
    • Random Variables
    • Time Series Processing
    • Tabular Modeling
    • See Also
      • Histogram
      • Histogram3D
      • HistogramList
      • EmpiricalDistribution
      • SmoothKernelDistribution
    • Related Guides
      • Nonparametric Statistical Distributions
      • Random Variables
      • Time Series Processing
      • Tabular Modeling

HistogramDistribution

HistogramDistribution[{x1,x2,…}]

represents the probability distribution corresponding to a histogram of the data values xi.

HistogramDistribution[{{x1,y1,…},{x2,y2,…},…}]

represents a multivariate histogram distribution based on data values {xi,yi,…}.

HistogramDistribution[…,bspec]

represents a histogram distribution with bins specified by bspec.

Details

  • HistogramDistribution returns a DataDistribution object that can be used like any other probability distribution.
  • The probability density function for HistogramDistribution for a value is given by sum_(j=1)^m(c_j)/(n m_j) Boole[b_(j-1)<=x<b_j] where is the number of data points in bin , is the width of bin , are bin delimiters, and is the total number of data points.
  • The width of each bin is computed according to the values xi, the width according to the yi, etc.
  • The following bin specifications bspec 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 [b1,b2),[b2,b3),…
    Automaticdetermine bin widths automatically
    "name"use a named binning method
    fwapply fw to get an explicit bin specification {b1,b2,…}
    {xspec,yspec,…}give different x, y, etc. specifications
  • Possible named binning methods include:
  • "FreedmanDiaconis"twice the interquartile range divided by the cube root of sample size
    "Knuth"balance likelihood and prior probability of a piecewise uniform model
    "Scott"asymptotically minimize the mean square error
    "Sturges"compute the number of bins based on the length of data
    "Wand"one-level recursive approximate Wand binning
  • The probability density for value in a histogram distribution is a piecewise constant function.
  • HistogramDistribution can be used with such functions as Mean, CDF, and RandomVariate.

Examples

open all close all

Basic Examples  (2)

Create a histogram distribution of univariate data:

Use the resulting distribution to perform analysis, including visualizing distribution functions:

Compute moments and quantiles:

Create a histogram distribution of bivariate data:

Visualize the PDF and CDF:

Compute covariance and general moments:

Scope  (29)

Basic Uses  (5)

Create a distribution from a histogram of some data:

Compute probabilities from the distribution:

Create histogram distributions from quantity data:

Find select descriptive statistics:

Decrease the number of bins to decrease local sensitivity:

Increase the bin width to decrease local sensitivity:

Create distributions from histograms in higher dimensions:

Plot the univariate marginal PDFs:

Plot the bivariate marginal PDFs:

Distribution Properties  (10)

Estimate distribution functions:

Compute moments of the distribution:

Special moments:

General moments:

Quantile function:

Special quantile values:

Generate random numbers:

Compare with HistogramDistribution:

Compute probabilities and expectations:

Generating functions:

Estimate distribution functions for bivariate data:

Compute moments of a bivariate distribution:

Special moments:

General moments:

Generate random numbers:

Show the point distribution:

Having fewer bins yields a coarser approximation to the underlying distribution:

Generating functions:

Binning  (14)

Automatically compute the number of bins:

More data yields smaller bins:

Explicitly specify the number of bins to use:

Specify 5 and 50 bins, respectively:

Explicitly specify bin width:

Use bin widths 1. and 0.1:

Specify bin range and bin width:

Use bin widths of 1.5 and .15 respectively over fixed interval:

Provide explicit bin delimiters:

Use different automatic binning methods:

Delimit bins on integer boundaries using a binning function:

Automatically compute the number of bins for bivariate data:

More data yields smaller bins:

Explicitly specify the number of bins to use:

Explicitly specify bin width:

Specify bin range and bin width:

Explicitly give bin delimiters:

Use different automatic binning methods:

Use different bin specifications in each dimension:

Specify 3 bins in the row dimension and bin width 0.5 in the column dimension:

Applications  (6)

Compare an estimated density to a theoretical model:

Distribution of lengths of human chromosomes:

Compute the probability that the sequence length is greater than 15:

Compare the distributions of word length for some of the parts of speech:

The expected number of characters for a randomly chosen English noun:

Estimate the distribution of day-to-day point changes in the S&P 500 index:

Compute the probability of a 1% point change or more on a given day:

Determine the number of bins to use for bimodal data by Knuth's Bayesian method:

The optimal number of bins maximizes the log of the posterior density:

Density estimates using Knuth's method, Scott's rule, and the Freedman–Diaconis rule:

Knuth's method outperforms the other two in terms of LogLikelihood:

Construct a continuous version of the empirical cumulative distribution function:

Cumulative distribution function for HistogramDistribution is piecewise linear:

Compute Cramer–von Mises distance between the two distributions:

Properties & Relations  (10)

The PDF of HistogramDistribution is equivalent to a probability density Histogram:

The resulting density estimate integrates to unity:

The precision of the output matches the precision of the data:

The PDF is piecewise constant:

The CDF and SurvivalFunction are piecewise linear:

The HazardFunction is linear fractional:

HistogramDistribution is a MixtureDistribution of uniform distributions:

HistogramDistribution is a consistent estimator of the underlying distribution:

HistogramDistribution works with the values only when the input is a TimeSeries:

Compare to the histogram distribution of the values:

HistogramDistribution works with all the values together when the input is a TemporalData:

Compare to the histogram distribution calculated with the values from all the paths:

Possible Issues  (1)

It is possible to drop data from the estimation by specifying a binning range:

Specifying a width alone uses all the data:

Neat Examples  (1)

Random pop art with HistogramDistribution:

See Also

Histogram  Histogram3D  HistogramList  EmpiricalDistribution  SmoothKernelDistribution

Related Guides

    ▪
  • Nonparametric Statistical Distributions
  • ▪
  • Random Variables
  • ▪
  • Time Series Processing
  • ▪
  • Tabular Modeling

History

Introduced in 2010 (8.0) | Updated in 2016 (10.4)

Wolfram Research (2010), HistogramDistribution, Wolfram Language function, https://reference.wolfram.com/language/ref/HistogramDistribution.html (updated 2016).

Text

Wolfram Research (2010), HistogramDistribution, Wolfram Language function, https://reference.wolfram.com/language/ref/HistogramDistribution.html (updated 2016).

CMS

Wolfram Language. 2010. "HistogramDistribution." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2016. https://reference.wolfram.com/language/ref/HistogramDistribution.html.

APA

Wolfram Language. (2010). HistogramDistribution. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/HistogramDistribution.html

BibTeX

@misc{reference.wolfram_2025_histogramdistribution, author="Wolfram Research", title="{HistogramDistribution}", year="2016", howpublished="\url{https://reference.wolfram.com/language/ref/HistogramDistribution.html}", note=[Accessed: 01-December-2025]}

BibLaTeX

@online{reference.wolfram_2025_histogramdistribution, organization={Wolfram Research}, title={HistogramDistribution}, year={2016}, url={https://reference.wolfram.com/language/ref/HistogramDistribution.html}, note=[Accessed: 01-December-2025]}

Top
Introduction for Programmers
Introductory Book
Wolfram Function Repository | Wolfram Data Repository | Wolfram Data Drop | Wolfram Language Products
Top
  • Products
  • Wolfram|One
  • Mathematica
  • Notebook Assistant + LLM Kit
  • System Modeler

  • Wolfram|Alpha Notebook Edition
  • Wolfram|Alpha Pro
  • Mobile Apps

  • Wolfram Player
  • Wolfram Engine

  • Volume & Site Licensing
  • Server Deployment Options
  • Consulting
  • Wolfram Consulting
  • Repositories
  • Data Repository
  • Function Repository
  • Community Paclet Repository
  • Neural Net Repository
  • Prompt Repository

  • Wolfram Language Example Repository
  • Notebook Archive
  • Wolfram GitHub
  • Learning
  • Wolfram U
  • Wolfram Language Documentation
  • Webinars & Training
  • Educational Programs

  • Wolfram Language Introduction
  • Fast Introduction for Programmers
  • Fast Introduction for Math Students
  • Books

  • Wolfram Community
  • Wolfram Blog
  • Public Resources
  • Wolfram|Alpha
  • Wolfram Problem Generator
  • Wolfram Challenges

  • Computer-Based Math
  • Computational Thinking
  • Computational Adventures

  • Demonstrations Project
  • Wolfram Data Drop
  • MathWorld
  • Wolfram Science
  • Wolfram Media Publishing
  • Customer Resources
  • Store
  • Product Downloads
  • User Portal
  • Your Account
  • Organization Access

  • Support FAQ
  • Contact Support
  • Company
  • About Wolfram
  • Careers
  • Contact
  • Events
Wolfram Community Wolfram Blog
Legal & Privacy Policy
WolframAlpha.com | WolframCloud.com
© 2025 Wolfram
© 2025 Wolfram | Legal & Privacy Policy |
English