Skip to main content

Welcome to a Grasp lesson

Create a free account to keep studying and create your own study path.

Lesson 2

Quantifying Game Outcomes: Variance and Standard Deviation

Recommended resources

Hello! Welcome back to our course on game balancing.

In our last lesson, we explored measures of central tendency—mean, median, and mode—to understand the "typical" outcome in a set of game data. We saw how skewed data, common in games, can make the mean misleading and how the median can often give us a better sense of the typical player experience.

However, knowing the center of our data is only half the story. Consider two RTS units that both have an average (mean) Time-To-Kill of 10 seconds against a specific target.

  • Unit A is a machine gunner that consistently kills the target in 9 to 11 seconds.
  • Unit B is a rocket trooper that usually takes 13 seconds, but sometimes gets a critical hit and kills the target in 2 seconds.

While their average performance is identical, the feel and strategic implications of these units are vastly different. Unit A is reliable; Unit B is unpredictable. To balance them effectively, we need a way to measure this consistency.

This lesson tackles exactly that. We will focus on calculating and interpreting variance and standard deviation to quantify the spread and consistency of game outcomes. This will give you a formal tool to describe and manage the predictability of your game's mechanics.

Measuring the Spread: Variance and Standard Deviation

The concepts of "spread," "scatter," "consistency," and "variability" all point to the same statistical idea. We need a number that tells us, on average, how far our data points are from the mean. This is what standard deviation does.

To get to standard deviation, we first need to understand variance. Let's start with a video that clearly explains both concepts and how they are calculated.

Calculating the Mean, Variance and Standard Deviation, Clearly Explained!!!

The StatQuest channel provides one of the clearest introductions to these topics. This video will walk you through the concept of measuring spread and the formulas for calculating population variance and standard deviation.

Please watch from 03:38 to 06:54. Focus on: The core idea of measuring how data is spread around the mean. Why the differences from the mean are squared in the variance formula. Why we take the square root of the variance to get the standard deviation.

As the video explained, the key steps to calculate the population variance () are:

  1. Calculate the population mean ().
  2. Find the difference between each data point and the mean ().
  3. Square each of those differences (). This makes all values positive so they don't cancel each other out.
  4. Find the average of these squared differences.

The population standard deviation () is simply the square root of the variance.

Standard Deviation vs Variance Comparison
This image highlights the key difference: Standard Deviation is in the same units as your original data (e.g., seconds, damage points), making it much more intuitive to interpret than Variance, which is in squared units.

A Crucial Distinction: Population vs. Sample

In game development, we almost never have data for the entire "population" of all possible games ever played. Instead, we work with a sample: data from a playtest, a beta weekend, or the first month after launch.

When we calculate variance from a sample, we are trying to estimate the true variance of the whole population. It turns out that using the same formula as before will slightly, but consistently, underestimate the true population variance. To correct for this, we make a small but vital change to the formula.

Let's return to the StatQuest video to see this adjustment.

Calculating the Mean, Variance and Standard Deviation, Clearly Explained!!!

This next segment explains the formula for estimating population variance from a sample, which is the one you will use most often in your work.

Watch from 07:47 to the end. Pay close attention to the two key differences in the sample formula: We use the sample mean (ar{x}) instead of the population mean (\mu). We divide by n-1 instead of n. The video also gives a great practical tip about which function to use in Excel (VAR.S vs VAR.P).

To summarize the formulas:

Measure For a Population (rarely used) For a Sample (most common)
Variance
Standard Deviation

Where:

  • is the population mean, is the sample mean.
  • is the size of the population, is the size of the sample.

You might be asking why we divide by n-1. Getting the intuition for this is key to the "rigorous" understanding you're looking for. The next video gives an excellent conceptual explanation without getting lost in mathematical proofs.

Variance and Standard Deviation: Why divide by n-1?

The zedstatistics channel provides a fantastic deep dive into two common questions: Why do we square the deviations? And why do we divide by n-1? Understanding this will solidify your grasp of the concept.

Watch from 02:07 to the end. The video does a great job explaining: Why squaring is preferred over taking the absolute value (it connects to a broader statistical framework called 'moments'). How using the sample mean as an estimate for the true population mean results in a slight underestimate of the true spread, which the n-1 adjustment corrects. The concept of 'degrees of freedom' to explain why we 'lose' one piece of information when we use a sample mean.

Test your understanding!

You run a playtest with 10 players to measure the time it takes to defeat a new boss. The times (in minutes) are: 8, 9, 10, 10, 11, 12, 12, 13, 14, 21.

The mean () of this data is 12 minutes.

  1. Are you dealing with a population or a sample?
  2. When calculating the variance for this data, should you divide by 10 (n) or 9 (n-1)? Why?
  3. The player who took 21 minutes is an outlier. How does the process of squaring the differences in the variance calculation affect the influence of this outlier compared to the other data points?
Show answer
  1. This is a sample. The 10 players represent a small subset of all potential players.
  2. You should divide by 9 (n-1). Because you are using a sample to estimate the characteristics of the entire player base, you need to use the n-1 correction to get an unbiased estimate of the population variance.
  3. The difference for the outlier is . When squared, this becomes . Compare this to a player close to the mean, say at 11 minutes. Their difference is , and the squared difference is . The squaring process dramatically amplifies the impact of outliers on the final variance and standard deviation values. This is a key reason why SD is sensitive to extreme values, just like the mean.

From Calculation to Interpretation: What SD Means for Game Balance

As a designer, you won't be calculating standard deviation by hand. You'll use tools like Excel (STDEV.S), Google Sheets, or Python. Your job is to interpret the result. A standard deviation value is only meaningful in context.

The following reading provides excellent, practical examples of how to interpret standard deviation in game design.

Statistically Speaking, It's Probably a Good Game, Part 2

This article, 'Statistically Speaking, It's Probably a Good Game, Part 2' by a game developer, is perfectly aligned with your goals. It skips the textbook formulas and focuses entirely on what SD means for a designer.

Please read the following sections: Start with the 'Pop Quiz Again' to see how these questions are framed in a design context. Read the section 'Variance and Standard Deviation'. It gives a great intuitive definition and introduces the powerful idea of comparing the SD to the mean (e.g., is the SD 10% of the mean or 60%?). Read the answers to 'Q1b' and 'Q2'. These are fantastic mini-case studies on what a high or low SD might indicate about your game's balance and feel. Finally, read 'Learn By Doing' for a concrete example of using mean and SD to set difficulty levels.

The key takeaways from that article are critical:

  • A high standard deviation isn't always bad. It means high variability. This could be a sign of a problem (e.g., an exploit allowing some players to finish a level much faster) or a design feature (e.g., a weapon that is intentionally high-risk, high-reward).
  • A low standard deviation isn't always good. It means high consistency. This might be desirable for a core economic mechanic, but in a game designed to test player skill, a very low SD in final scores could mean the game isn't differentiating between good and bad players.
Interpreting Standard Deviation with Bar Charts
These charts visually demonstrate the concept. All three have a mean of 5, but as the data spreads out, the standard deviation (s) increases. This is the numerical value you'll use to identify if your game outcomes are clustered like the first chart or spread out like the last one.

This next resource provides more examples that should resonate with your work in strategy games.

Level 8: Metrics and Statistics - Game Balance Concepts

The blog 'Game Balance Concepts' offers more hands-on examples, including a direct comparison of dice mechanics and a look at tutorial completion times.

Please read the sections 'Standard deviation', 'Examples', 'Statistics in Excel', and the untitled exercise at the end about creating a metrics plan. The comparison between 2d6 and 1d11+1 is a perfect illustration of how two mechanics with the same mean can have vastly different SDs.

The 2d6 vs. 1d11+1 example is particularly insightful. Both produce results from 2 to 12 with a mean of 7. But the 2d6 roll has a lower standard deviation, meaning its results are more clustered around 7. The 1d11+1 roll has a higher standard deviation, with results spread out evenly. Choosing between these isn't a question of which is "better," but which feel you want for your mechanic: more predictable or more random? Standard deviation gives you the language to specify that.


Summary and Next Steps

You now have a robust tool for measuring and describing the consistency of your game's mechanics.

Key Takeaways:

  • Variance and Standard Deviation (SD) measure the spread or dispersion of data around the mean.
  • A low SD implies outcomes are consistent and predictable. A high SD implies outcomes are variable and scattered.
  • For game data analysis, you will almost always use the sample standard deviation formula, which divides by n-1 to provide an unbiased estimate.
  • Interpretation is key. Whether a high or low SD is "good" or "bad" depends entirely on your design intent for the mechanic in question.
  • A useful rule of thumb is to evaluate the SD as a percentage of the mean to understand its relative magnitude.

In our next lesson, we will combine our knowledge of mean and standard deviation to explore probability distributions. Specifically, we will look at the Normal Distribution (the classic "bell curve"), which is completely defined by its mean and SD. Understanding this will allow us to start modeling continuous outcomes, like damage rolls or resource gains, and calculate the probability of certain results occurring.