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[1]:=
Click for copyable input
Out[1]=
Visualize the theoretical density function:
In[2]:=
Click for copyable input
Out[2]=
Display the histogram and the function together:
In[3]:=
Click for copyable input
Out[3]=