graphics – Plotting a normal curve over a histogram

With your definitions of `rolls` and `sums`, you can find the parameters for the corresponding normal distribution by calculating the mean and standard deviation of `sums` directly, using `Mean` and `StandardDeviation`, or more generally using `FindDistributionParameters`:

``````pdf = PDF[NormalDistribution[mu, sigma] /.
FindDistributionParameters[sums, NormalDistribution[mu, sigma]]]
``````

With those in hand, you can plot the histogram and the PDF of the calculated distribution. Here I shown them both scaled as PDFs:

``````Show[
Plot[pdf[x], {x, 0, 35}, PlotStyle -> Directive[Thickness[0.01], Red]],
Histogram[sums, {0.5, 31.5, 1}, "PDF"]
]
``````

Alternatively if you want it expressed in counts, you have to account for the total number of rolls:

``````Show[
Plot[10000 pdf[x], {x, 0, 35}, PlotStyle -> Directive[Thickness[0.01], Red]],
Histogram[sums, {0.5, 31.5, 1}]
]
``````

Incidentally, I would recommend calculating `rolls` in one go as follows, rather than with nested tables:

``````rolls = RandomChoice[Range[6], {10000, 5}];
``````