Why look at the shape
An average compresses a whole set of results into one number. Two games can share the same average yet feel very different: one gives steady outcomes, the other swings between disasters and jackpots. A histogram shows how often each range of outcomes occurs, so the spread, the skew and any odd bumps are visible at a glance.
What a histogram is
A histogram divides possible results into bins and draws a bar for each bin whose height shows how many results fell in it. For dice totals or card counts, where outcomes are whole numbers, each value often gets its own bin. For continuous or very wide results, such as total damage across a fight, several values are grouped into each bin.
A histogram is not a bar chart of separate categories. The bins are ordered along a number line, so the position and the neighbouring heights carry meaning.
A first example
Simulate 10,000 rolls of two six-sided dice and plot the totals:
import random
import numpy as np
import matplotlib.pyplot as plt
totals = [random.randint(1, 6) + random.randint(1, 6) for _ in range(10_000)]
plt.hist(totals, bins=np.arange(1.5, 13.5, 1), edgecolor="black")
plt.xlabel("Total")
plt.ylabel("Number of rolls")
plt.xticks(range(2, 13))
plt.show()
The bin edges run from 1.5 to 12.5 so that each whole number sits in the middle of its bar. Without that, whole numbers can land on the edge between two bins and the picture gets lopsided. The result should be a triangle peaking at 7 and falling away evenly toward 2 and 12, roughly matching the exact table of probabilities from the dice calculation. The bars will wobble a bit from the exact shape, because 10,000 rolls is a finite sample.
Counts or proportions
Counts depend on how many trials you ran. Dividing by the total gives relative frequencies, and the vertical axis then reads as a share, which makes it simple to overlay a theoretical curve or to compare runs of different sizes. Pass weights to the plotting function, or use a density setting, depending on whether you want shares or a probability density.
Choosing bin width
Too many narrow bins create a jagged, noisy picture where chance variation looks like structure. Too few wide bins hide real features. With whole-number outcomes, one bin per value is usually best. For wide ranges, start with something near 10 to 30 bins and adjust. A useful test is to redraw the plot with a different bin width. If the story changes a lot, the feature may be an artefact of the binning.
Reading the shape
- Symmetric and bell-shaped. Typical of sums of many independent pieces, such as a total of several dice. The mean and median are close.
- Skewed. A long tail on one side, as with a game that pays rarely but a lot. The mean is dragged toward the tail, so it can be far from the typical result, and the median outcome may describe a normal session better.
- Multiple peaks. Often means two different processes are mixed, for example a hit and a miss in an attack, or two opponent types.
- Spikes at certain values. May point to caps, rounding rules or a data entry habit.
- Width. A wide histogram means high variance. A narrow one means results cluster tightly.
Tail behavior deserves attention, since rare extreme results are what drive the risk of ruin in games with limited resources.
Comparing two distributions
To compare two options, such as two weapons or two decks, draw both histograms on the same axes with the same bins, using semi-transparent bars or stacked panels with a shared horizontal axis. Different bin choices or scales between panels make comparison impossible. Also mark the mean and median with vertical lines if they differ noticeably.
Spreadsheet version
In a spreadsheet, list each possible value in one column and use COUNTIF to count how often it appears in your results. Insert a column chart from those counts and remove the gaps between the bars so it reads as a histogram. Most spreadsheets also have a built-in histogram chart that bins automatically, though checking its bin boundaries is wise.
Common mistakes
- Truncating the vertical axis so small differences in bar height look large. Start counts at zero.
- Using bins of unequal width without adjusting heights, which distorts areas.
- Treating a small sample’s bumps as real. With few trials, bars wobble. Repeat the simulation to see which features persist.
- Hiding the sample size. Mention how many results the histogram represents.
- Overlapping bars in a way that obscures one series.
A histogram does not prove anything alone. But it is often the quickest way to notice that the average is misleading, that a simulation has a bug, or that a game’s results have a shape you did not expect. It makes a natural first check before running any formal test.