So I believe my code is pretty straight forwards and is working fine, that is everything but the histogram part. What am I doing wrong?
numberOfExperiments = 5000;
numberOfParticles = 3;
numberOfLevels = 3;
maximumPressure = numberOfParticles * numberOfLevels^2;
listOfPressures =
Map[Total[
Map[#^2 &,
Map[RandomInteger[{1, numberOfLevels}] &,
Range[1, numberOfParticles]]]] &, Range[numberOfExperiments]];
histogramPressurePlot =
Histogram[listOfPressures, {1, 2, 3}, numberOfLevels,
numberOfParticles , Frame -> True,
FrameLabel -> {"Number of particles \!\(\*SubscriptBox[\(n\), \
\(x\)]\)", "Pressure"},
PlotRangePadding -> 0,
PlotLabel ->
SequenceForm["Number of particles = ", numberOfExperiments],
PlotRange -> {{0, 100}, Automatic}, ChartStyle -> Orange];