Welcome back to Building Probability Models! In the previous lesson, you learned how to evaluate whether a set of outcome–probability pairs qualifies as a valid probability model by checking two requirements: every probability falls between 0 and 1, and all probabilities sum to exactly 1. With that skill in hand, you are ready for the next step.
In this second lesson out of five, we shift from checking models to building them. Specifically, we will focus on the uniform probability model, the simplest and most widely used type. By the end, you will know how to construct a uniform model from scratch, confirm it is valid, and use it to calculate the probability of any event.
Why Equally Likely Outcomes Lead to a Special Model
Many everyday chance processes treat every possible result the same way. Flipping a fair coin gives heads and tails an equal shot. Rolling a fair six-sided die treats every face identically. Drawing a name at random from a hat gives every name the same chance of being picked.
What these situations share is a key property: no single outcome is favored over any other. When this is true, fairness itself dictates the structure of the model. Because no outcome deserves a larger or smaller slice of the total probability, every outcome must receive the same value. This is the defining feature of a uniform probability model, and it makes construction straightforward, as we will see next.
Building a Uniform Probability Model
Suppose a chance process has n equally likely outcomes. Since every outcome gets the same probability and all probabilities must add to 1, each outcome is assigned:
P(each outcome)=n1
Verifying the Model
Building a model is only half the job; we should always confirm it passes both validity checks from the previous lesson. Let us verify the die model.
Requirement 1 — each probability between 0 and 1: Every value is 61≈0.167, comfortably inside the range . ✓
Finding Event Probabilities with a Uniform Model
A model becomes truly useful when we apply it to answer questions about events. An event is any collection of outcomes from the sample space, and its probability equals the sum of the probabilities of all outcomes in that event:
P(event)=∑P(favorable outcomes)
Let us try this with our die model. Suppose we want the probability of rolling an even number. The favorable outcomes are {2,4,, so we add their probabilities:
Raffle Night: A Full Example
Let us bring all three steps together with a new real-world scenario. A community center is holding a raffle with 8 equally likely prizes: 3 gift cards, 2 movie tickets, and 3 book bundles. One prize is selected at random from these 8 prizes, and we want the probability of selecting movie tickets.
Step 1 — Build the uniform model. There are n=8 prizes, so each one gets a probability of 81:
Prize
Probability
Gift Card 1
Conclusion and Next Steps
A uniform probability model assigns the same probability, n1, to each of n equally likely outcomes. Because every value automatically lies between 0 and and the total is always , uniform models are valid by construction. To find the probability of an event, sum the probabilities of its favorable outcomes, which in a uniform model simplifies to .
Be a part of our community of 1M+ users who develop and demonstrate their skills on CodeSignal
That single formula is the heart of a uniform model. Let us put it to work with a familiar example. When we roll a standard six-sided die, the sample space is {1,2,3,4,5,6}, giving us n=6 outcomes. Each outcome gets a probability of 61:
Outcome
Probability
1
61
2
61
3
61
4
61
5
61
6
61
That table is the uniform probability model for a fair die. Every outcome appears exactly once, and every probability is the same.
[0,1]
Requirement 2 — probabilities sum to 1:
61+61+61+61+61+61=66=1
Both requirements hold, so this is a valid model. In fact, for any uniform model with n outcomes the sum is guaranteed to be n×n1=1, and each value n1 is automatically between 0 and 1 when n≥1. This built-in guarantee is one reason uniform models are so convenient — they are valid by design.
6
}
P(even)=61+61+61=63=21
Because every outcome in a uniform model shares the same probability, there is a handy shortcut. If there are k favorable outcomes out of n total equally likely outcomes, the event probability simplifies to:
P(event)=nk
For rolling an even number, k=3 and n=6, so P(even)=63=21 — exactly what we got by summing. Either approach works: summing individual probabilities is the general method, while the nk shortcut is a quick alternative unique to uniform models.
81
Gift Card 2
81
Gift Card 3
81
Movie Ticket 1
81
Movie Ticket 2
81
Book Bundle 1
81
Book Bundle 2
81
Book Bundle 3
81
Step 2 — Verify the model. Each probability is 81=0.125, which lies between 0 and 1. The sum is 8×81=1. Both requirements hold, so the model is valid.
Step 3 — Find the event probability. The event "win movie tickets" includes k=2 favorable outcomes. Summing their probabilities:
P(movie tickets)=81+81=82=41
There is a 41, or 25%, chance of winning movie tickets. Notice how the three-step process — build, verify, use — gives us a clear and reliable path from a real situation to a meaningful answer.
1
1
nk
Now it is time to put these ideas into practice! In the upcoming exercises, you will build uniform models for everyday scenarios, verify their validity, and use them to compute event probabilities. Jump in and see how quickly the build–verify–use workflow becomes second nature.