Skip to main content

Welcome to a Grasp lesson

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

Lesson 3

Probability in Game Mechanics

Recommended resources

Hello! Welcome to the third lesson in our course on game balancing.

In our last two lessons, we built a foundational statistical toolkit. We started with measures of central tendency (mean, median) to find the "typical" value in game data, and then we learned to use variance and standard deviation to measure the "spread" or consistency of those outcomes.

You now know how to calculate that a weapon has a mean damage of 50 and a standard deviation of 5. But what does that really let you do? How often will it deal more than 60 damage? How likely is it to deal less than 40? To answer these questions, we need to move from describing data to modeling the underlying mechanics.

This lesson is where we make that leap. Our goal is to apply probability distributions (Binomial and Normal) to model and balance discrete and continuous mechanics like drop rates and damage rolls. A probability distribution is essentially a function that describes the likelihood of all possible outcomes of a random event. It's the full story of a mechanic's randomness, not just its average or spread.

We will cover two of the most important distributions in game design:

  • The Binomial distribution, for discrete events where you can count the outcomes (e.g., number of critical hits in 10 attacks).
  • The Normal distribution, for continuous events that can take on any value within a range (e.g., the precise damage of an explosion).

Discrete vs. Continuous: Choosing the Right Model

First, it's important to understand the distinction between discrete and continuous random variables.

  • Discrete variables are countable. Think "number of...": number of loot drops, number of successful hits, number of units produced. The outcome is always an integer.
  • Continuous variables can take any value within a given range. Think measurements: time to kill, damage dealt, a unit's speed.
Overview of Probability Distributions
This image provides a great visual summary of common distributions, separating them into continuous (smooth curves) and discrete (distinct bars) categories. We will focus on the Binomial and Normal distributions today.

Part 1: Modeling "How Many?" with the Binomial Distribution

Let's start with a very common scenario in strategy games: a unit attacks multiple times, and each attack has a certain probability of success. How do we model the total number of successful hits?

This is the job of the Binomial distribution. It applies whenever you have a situation that meets four criteria:

  1. A fixed number of trials (e.g., 10 arrows are fired). Let's call this .
  2. Each trial is independent (one arrow hitting doesn't affect the next).
  3. Each trial has only two possible outcomes (hit or miss).
  4. The probability of success is the same for each trial (the archer has a 70% chance to hit with each arrow). Let's call this .

The binomial distribution answers the question: "What is the probability of getting exactly successes in trials?"

To build a strong intuition for this, let's watch a video that breaks down the core concepts from the ground up.

10 Probability Distributions in 50 Min

This video from the '10 Probability Distributions in 50 Min' series offers a fast-paced but highly intuitive explanation of the Binomial distribution. It starts with its fundamental building block, the Bernoulli distribution (a single trial), and builds up to the full binomial formula.

Please watch the sections on the Bernoulli (04:58 to 07:06) and Binomial (07:06 to 11:03) distributions. Focus on: How the Binomial distribution is just a series of repeated Bernoulli trials. The two-part 'story' of the Binomial formula: the probability of one specific sequence, and the number of ways that sequence can happen.

As the video explained, the formula for the binomial distribution can look intimidating, but it's just telling that two-part story:

  • is the probability of one specific sequence of successes and failures. Given your background, you can think of this as the probability of a specific build order playing out in one exact way.
  • is the number of ways to get successes in trials. This is called the "binomial coefficient" or "n choose k". It accounts for the fact that we don't care about the order of the hits and misses, just the total.

To really cement the "number of ways" part, the next video provides a fantastic visual explanation.

Overexplaining the binomial distribution

The YouTube channel Primer is excellent at building mathematical intuition visually. This video 'Overexplaining the binomial distribution' is a perfect deep-dive into where the formula comes from, especially the binomial coefficient.

Watch the following segments: 00:37 - 04:42: This section uses animated 'blobs' to visually build the distribution of outcomes for 1, 2, and 3 shots. It provides a concrete visualization of how probabilities combine. 04:42 - 06:21: This connects the visual example directly to the two parts of the formula. 09:02 - 13:21: This explains the factorial formula for calculating the binomial coefficient (inom{n}{k}). This provides the rigorous mathematical underpinning for that part of the equation.

Application to Game Balance: Drop Rates and Critical Hits

Now, let's bring this directly into game balancing. You're designing a system where a player opens 10 chests, and each chest has a 20% chance of containing a rare gem. What is the probability of getting exactly 3 gems?

  • (number of chests)
  • (probability of a gem)
  • (desired number of gems)

Plugging this into the formula gives us a probability of about 20.1%. Knowing the probability of every outcome allows you to design and tune the player's reward experience with precision.

The following reading shows how this is used to think about loot drop systems.

Probability and Games: Damage Rolls

The website Red Blob Games is a treasure trove of technical game design articles. This piece on probability provides a perfect example of applying the binomial distribution to loot drops.

Please read the initial section of the article, which discusses finding a certain number of gems in a fixed number of chests. It uses the same binomial distribution concepts we've just covered.

The most powerful aspect for a designer is seeing how the distribution's shape changes as you tweak the probability, p.

Binomial Probability Distributions with Varying Probabilities of Success
As you can see, when the probability of success 'p' is low (like a rare crit chance), the distribution is heavily skewed to the right—zero successes is the most likely outcome. As 'p' approaches 0.5, it becomes symmetric. As 'p' gets high, it skews left. As a designer, you are directly manipulating this shape when you balance probabilities.
Test your understanding!

An RTS marine squad of 5 soldiers fires one volley at a target. Each marine has an 80% chance to hit. What is the probability that exactly 4 of the 5 marines hit the target?

You'll need the binomial formula:

  • n = 5
  • k = 4
  • p = 0.8
  • (There are 5 ways to choose which 4 marines hit)
Show answer

Let's plug the values into the formula:

Now, multiply them together:

There is a 40.96% chance that exactly 4 of the 5 marines will hit the target.


Part 2: Modeling Continuous Outcomes with the Normal Distribution

What about damage rolls, ability cooldowns, or AI reaction times? These are continuous variables. While you could use a simple uniform distribution (like a standard dice roll where every outcome is equally likely), many natural and game phenomena tend to cluster around an average. The perfect tool for this is the Normal distribution, also known as the "bell curve".

The Normal distribution is defined by just two parameters you are already familiar with:

  • The mean (), which sets the center of the curve.
  • The standard deviation (), which sets the spread or width of the curve.

This direct link to our previous lesson makes it an incredibly powerful concept.

Let's return to the video series to get an overview.

10 Probability Distributions in 50 Min

This segment of the '10 Probability Distributions' video explains the Normal distribution, its connection to the Central Limit Theorem, and its key practical tools like the 68-95-99.7 rule and Z-scores.

Please watch from 12:57 to 20:23. Pay special attention to: The Central Limit Theorem: the idea that summing up many random factors tends to create a Normal distribution. This is why it's so common! The 68-95-99.7 Rule: a powerful shortcut for estimating probabilities. Z-scores: The practical tool for calculating the probability of a specific outcome range without needing complex calculus.

Application to Game Balance: Damage Rolls

The 68-95-99.7 rule is a fantastic rule of thumb for a game designer. If you're designing a rifle with damage that is normally distributed with a mean of and a standard deviation of , you immediately know:

  • About 68% of shots will deal damage between 85 and 115 ().
  • About 95% of shots will deal damage between 70 and 130 ().
  • Almost all shots (99.7%) will be between 55 and 145 ().

This gives you a robust mental model for the weapon's consistency. A smaller means a more reliable weapon; a larger means a more random, "swingy" one.

For more precise questions ("what's the chance of doing more than 130 damage?"), you use the Z-score, as shown in the video. The Z-score is a universal translator that rephrases the question in terms of standard deviations from the mean:

For our rifle, the Z-score for 130 damage is . This means 130 damage is exactly 2 standard deviations above the mean. By looking this up in a Z-table (or using a calculator), you can find the exact probability. In this case, it's about 2.28%.

The paper below gives some simple game-related examples for these distributions.

Harnessing Probability for Dynamic and Balanced Game Design

This research paper, 'Harnessing Probability for Dynamic and Balanced Game Design', provides simple, direct applications of these distributions in game contexts.

Scan the examples provided for the Binomial Distribution (basketball shots) and the Normal Distribution (player performance/card shuffling) to see how these concepts are framed in a game design context.


A Glimpse at Other Useful Distributions

While Binomial and Normal are the two most fundamental distributions, your work in RTS and Grand Strategy games will often involve other patterns of randomness. The video you watched mentions a few others that are highly relevant:

  • Exponential Distribution: Models the time between events, like how long until the next resource harvester arrives or an enemy squad spawns. If the average rate of spawning is known, this distribution tells you the probability of the wait time.
  • Poisson Distribution: Models the number of rare events happening over a fixed interval of time or space. For example, how many meteorites strike a map sector in a 5-minute period, given an average rate.
  • Negative Binomial Distribution: This is a crucial one for player experience. Instead of asking "how many drops in 10 chests?", it asks "how many chests must I open to get 3 drops?". This is the math behind "pity timers" in games, which prevent extreme bad luck by putting an upper bound on how long a player has to wait for a reward. The Red Blob Games article you read (LINK) introduces this in its later sections if you are curious.

Don't worry about mastering these right now; the goal is to be aware that there is a whole family of distributions, each telling a different story about randomness.


Summary and Next Steps

Today you've gained a powerful new way to model and control randomness in your games. You've moved beyond simple averages to describing the entire range of possibilities for a given mechanic.

Key Takeaways:

  • Probability distributions describe the likelihood of every possible outcome of a random event.
  • The Binomial distribution is your tool for modeling discrete "how many successes in n trials?" scenarios, like critical hits or successful dodges. It's defined by the number of trials () and the probability of success ().
  • The Normal distribution (bell curve) is your tool for modeling continuous outcomes that cluster around an average, like damage rolls. It's defined by the mean () and standard deviation ().
  • The shape of a distribution is a design lever. By changing parameters like or , you directly control the consistency and feel of your mechanics.

In our next lesson, we will build directly on this foundation to explore expected value. The expected value is the mean of a probability distribution, representing the average outcome you'd expect if you ran the random event countless times. This will give us a single, powerful number to compare the long-term value of different strategic choices, like whether to build an economic or a military unit.