Make a Histogram

You can use Histogram to generate a histogram of a dataset on a probability density scale.

    
Generate a sample dataset from the gamma distribution with RandomVariate and construct the histogram:
In[51]:=
Click for copyable input
Out[52]=
Visualize the theoretical density function:
In[53]:=
Click for copyable input
Out[53]=
Display the histogram and the function together:
In[54]:=
Click for copyable input
Out[54]=
New to Mathematica? Find your learning path »
Have a question? Ask support »