Sub topic 12
Sensitivity analysis: finding the parameters that matter
A balance workbook can have dozens of parameters: base XP, growth exponents, armor, crit chance, drop rates, prices. You can't tune all of them at once, and most of them barely move the numbers you care about. Sensitivity analysis tells you which ones matter. You change one parameter by a small, fixed amount, record how far a chosen output moves, and rank the parameters by that movement.
This chapter assumes you have the workbook layout from the earlier chapters: a Params sheet holding every tunable value, calculation sheets that reference it, and an outputs area with derived metrics such as expected damage per attack and time to kill (TTK). It also assumes you are comfortable with absolute references like $B$2 and with fill-down.
Why rank parameters
Suppose your target is a 12-second TTK for a mid-game enemy. TTK depends on damage, hit chance, crit chance, crit multiplier, attack speed, enemy health and armor. If you adjust the wrong one, you may spend an hour moving a number by 0.3 seconds. If you adjust the right one, a single edit lands you near the target.
Sensitivity analysis gives you three things:
- A ranked list of parameters by influence on a chosen output.
- A sense of direction: which way each parameter pushes the output.
- Early warning of fragile designs, where a small change in one value wrecks the result.
The relative change formula
The workbook measures influence as the relative change of the output after a parameter tweak:
=(C2 - B2) / B2Here B2 is the baseline result and C2 is the new result after the tweak. A result of 0.08 means the output rose 8%.
Use relative change rather than absolute change. A parameter measured in thousands (enemy health) and one measured as a fraction (crit chance) can't be compared by raw difference. Relative change puts them on the same scale.
You also need to tweak each parameter by the same relative amount. The usual choice is +10%. Without that, you are comparing a 1% tweak of one parameter with a 50% tweak of another, and the ranking means nothing.
One-at-a-time analysis
The simplest method changes one parameter at a time while everything else stays at baseline. This is called one-at-a-time (OAT) analysis.
The procedure:
- Pick one output to study, such as TTK for a specific matchup.
- Record the baseline output with all parameters at their normal values.
- For each parameter, raise it by 10%, record the new output, then restore the parameter.
- Compute the relative change for each row.
- Sort by the absolute value of the relative change.
Building the table
Create a sheet named Sensitivity. Set up these columns:
| Column | Contents |
|---|---|
| A | Parameter name |
| B | Baseline parameter value |
| C | Tweaked value (B times 1.1) |
| D | Baseline output |
| E | Output with this parameter tweaked |
| F | Relative change in output |
| G | Absolute value of F, for sorting |
Column C is a formula: =B2 * (1 + $J$1), where J1 holds the tweak size (0.1). Keeping the tweak size in one cell lets you try 5% or 20% later without editing every row.
Column F uses the relative change formula. Column G is =ABS(F2).
The hard part: computing column E
Column E needs the output recomputed with one parameter replaced. A spreadsheet has one live value per cell, so there are three practical ways to get this.
Method 1: manual copy. Type the tweaked value into Params, copy the output, paste it as a value into column E, then undo the tweak. It works for a handful of parameters. It is slow, and you will eventually forget to restore a value.
Method 2: a parallel calculation. Write the output formula again in the Sensitivity sheet, taking its inputs from local cells instead of Params. For a short chain such as TTK, this is straightforward and stays live.
For example, if expected damage is =B2 * C2 * (1 + D2 * (E2 - 1)) and TTK is =Targets!B2 / F2 * G2, you can build one row per scenario. Each row holds a full set of inputs: damage, hit chance, crit chance, crit multiplier, target health and attack interval. All cells are copies of baseline except one, which is tweaked. Then the row computes TTK with the same formula chain. Nine rows give you nine live scenarios.
Method 3: a data table or scenario tool. Excel's Data Table (What-If Analysis) and Google Sheets add-ons can recompute a model across a range of input values. These work well for one or two parameters but are awkward for ranking twenty.
Method 2 is the most reliable for balance work. It is visible, auditable, and updates as soon as you change Params.
A worked example
Take a mid-game fight with these baseline values:
| Parameter | Value |
|---|---|
| Damage per hit | 40 |
| Hit chance | 0.85 |
| Crit chance | 0.10 |
| Crit multiplier | 2.0 |
| Seconds between attacks | 1.2 |
| Target health | 600 |
| Target armor | 50 |
Armor reduces damage by =B2 * 100 / (100 + C2), so 40 damage against 50 armor becomes 26.67.
Expected damage per attack:
26.67 × 0.85 × (1 + 0.10 × (2.0 − 1)) = 26.67 × 0.85 × 1.1 ≈ 24.93
TTK:
600 / 24.93 × 1.2 ≈ 28.9 seconds
Now tweak each parameter by +10% and recompute:
| Parameter tweaked | New TTK (s) | Relative change |
|---|---|---|
| Damage per hit (44) | 26.4 | -8.6% |
| Hit chance (0.935) | 26.3 | -9.1% |
| Crit chance (0.11) | 28.7 | -0.9% |
| Crit multiplier (2.2) | 28.5 | -1.8% |
| Seconds between attacks (1.32) | 31.8 | +10.0% |
| Target health (660) | 31.8 | +10.0% |
| Target armor (55) | 29.4 | +1.9% |
These values come from running the formula chain, so you can check any row by hand.
The result is informative. Attack interval and target health have a relative change of exactly 10%, because TTK is directly proportional to both. Hit chance and damage are the next strongest. Crit chance barely matters at these settings because it applies to only 10% of attacks and adds only a 1.1 factor. Armor matters less than you might expect, because 50 armor is already on the flat part of its diminishing-returns curve.
If you want to shorten this fight to 20 seconds, you now know where to look: damage, hit chance, health, or attack speed. Adjusting crit chance by a few points would not get you there.
Elasticity: a cleaner way to read the table
Dividing the output's relative change by the parameter's relative change gives the elasticity:
=F2 / $J$1An elasticity of 1 means the output moves one-for-one with the parameter. An elasticity of 0.1 means a 10% increase in the parameter moves the output only 1%. A negative value means the output falls when the parameter rises. Elasticity lets you compare results even when you used different tweak sizes, and it is the number to quote when you tell a designer "damage is nine times more influential than crit chance".
Choosing the tweak size
Tweak size matters more than it seems.
- Too small (0.1%): rounding in
ROUNDformulas can hide the change, and you see zeros. - Too large (50%): curved formulas such as exponents and armor give a result that doesn't describe behavior near the baseline.
- About 10% is a good default. Try 5% and 20% as a check. If the ranking changes between them, the model is strongly nonlinear in that region and you should study those parameters more closely.
Be careful with parameters that are integers or have natural limits. Crit chance cannot exceed 1. Level cannot be 7.7. For bounded parameters, tweak by a fixed number of points (for example +0.05) and note this in the table.
Sensitivity on growth curves
Progression curves are where sensitivity analysis usually pays off most. Consider the XP formula:
=ROUND(Params!$B$2 * A5 ^ Params!$B$3, 0)Base XP (B2) is a pure multiplier, so a 10% change shifts every level's cost by 10%. The exponent (B3) behaves differently. Raising it from 2.0 to 2.2 changes level 5 cost by a factor of 5^0.2 ≈ 1.38, but level 50 cost by 50^0.2 ≈ 2.19. The exponent changes the shape of the curve, and its effect grows with level.
So for curves, measure sensitivity at more than one level. Pick an early, middle and late level, and build one sensitivity column per level. A parameter that is harmless at level 5 may dominate at level 50. The same applies to the exponential price curve =ROUND(Params!$B$4 * Params!$B$5 ^ (A5 - 1), 0), where the growth factor's influence compounds with each level.
Pitfalls
- Tweaking while other parameters are off-target. OAT results depend on the baseline. If the baseline is far from your design, the ranking can mislead. Get close first, then rank.
- Interactions. OAT cannot detect parameters that matter only in combination. If a crit build needs high crit chance and a high multiplier together, test them together in one extra row.
- Random outputs. If the output comes from a
RANDsimulation, each recalculation changes the result, and noise can exceed the effect of a 10% tweak. Use the analytical expected value for sensitivity, and use simulation only to check the final answer. - Wrong output. A parameter's rank depends on which output you chose. Run the analysis separately for TTK, survivability and income if all three matter.
- Hard-coded numbers. If a formula contains a literal
100or1.1, that value will never show up in the sensitivity table. Move it intoParamsif it could be tuned.
From ranking to tuning
Use the ranking to decide your tuning order:
- Move the target output to its goal using the highest-elasticity parameters, in coarse steps.
- Fine-tune with mid-ranked parameters.
- Leave low-elasticity parameters alone unless a design reason requires changing them.
Keep a log of every change: parameter, old value, new value, and the output before and after. When playtest data in the next chapter disagrees with the model, this log tells you what you changed and why.
Exercise
A level-up cost is =ROUND(Params!$B$2 * A5 ^ Params!$B$3, 0) with base XP 100 and exponent 2.0. At level 10, cost is 10,000. You raise base XP by 10% in one test and the exponent by 10% (to 2.2) in another. What is the new level-10 cost in each test, and which parameter is more sensitive at level 10?
Show answer
Raising base XP to 110 gives 110 × 10^2 = 11,000, a 10% increase. Raising the exponent to 2.2 gives 100 × 10^2.2 ≈ 100 × 158.5 = 15,849, about a 58% increase. The exponent is far more sensitive at level 10, and the gap widens at higher levels because the exponent's effect grows with the level.
Exercise
In the worked example, why does crit chance show a relative change of only about -0.9% in TTK when you raise it by 10%?
Show answer
Crit chance enters expected damage through the factor 1 + crit chance × (multiplier − 1). At baseline that factor is 1.10. Raising crit chance from 0.10 to 0.11 changes it to 1.11, a rise of about 0.9%. TTK falls by about the same fraction. The factor is dominated by the constant 1, so crit chance has low elasticity (about 0.09) at these settings.