A weapon doing 2d6 damage and one doing 1d12 look like near-equivalents. The averages are 7 and 6.5, close enough that a designer might treat them as a swap. In play they behave nothing alike.
The spread is the difference
A single d12 is flat. Every result from 1 to 12 is equally likely, and the standard deviation is 3.45. Rolling two d6 adds them, and sums of dice bunch towards the middle, because there are six ways to make 7 and only one to make 2. The standard deviation is 2.42, nearly a third lower.
So 2d6 is the reliable weapon and 1d12 is the swingy one. Against a target needing consistent chip damage, 2d6 is better than its half-point average advantage suggests. Against a target you need to burst down in one lucky hit, 1d12 is better despite the lower average, because only the flat die can roll 12.
The effect strengthens with more dice. Three d6 and one d20 have exactly the same average of 10.5, and standard deviations of 2.96 and 5.77. The d20 is nearly twice as volatile for an identical mean. The dice sum probability calculator gives the full distribution rather than just the average, which is the part that decides how a weapon feels.
Why designers pick one
Low variance suits things that happen often. A basic attack used every round wants to be predictable, because the averages assert themselves across many rolls and unpredictability just adds noise.
High variance suits things that happen rarely. A once-per-rest ability wants a wide spread, because you only get one roll and a flat distribution gives a real chance of something memorable. Critical hits exist for the same reason.
It also matters against thresholds. If a target has 10 health, 1d12 kills it 25 per cent of the time and 2d6 kills it 16.7 per cent, despite 2d6 having the higher average. When you need a specific number rather than a good average, the spread decides it.
What advantage is worth
Advantage rolls two d20 and takes the higher, which turns the probability of success from p into
1 − (1 − p)²
The value of that depends entirely on what you needed. Needing 11 or better, your chance goes from 50 to 75 per cent, a gain of 25 points, and that is the maximum. Needing 5 or better it goes from 80 to 96, a gain of 16. Needing 18 or better it goes from 15 to 27.75, a gain of under 13.
So advantage is worth most when the roll is a coin flip and least when it was nearly decided either way. In the middle of the range it is roughly equivalent to a +5 bonus; at the edges it is worth closer to +2. The average result of a d20 rises from 10.5 to 13.83 with advantage and falls to 7.18 with disadvantage, and the d20 roller confirms the probability directly: set it to two dice with a target of 11 and it reports 75 per cent, which is the advantage calculation exactly.
The practical version
When comparing two damage expressions, compare the distributions rather than the averages, and ask what you need. If you need to clear a threshold, the wider die is usually better even at a lower average. If you need a dependable total over many rounds, more dice of fewer sides wins.
And when a character's hit points come from repeated rolls, the same bunching works in your favour, which is why the D&D hit points calculator defaults to the fixed average rather than rolling. Over a dozen levels the sum is so concentrated that rolling is nearly all downside.