Introduction

Welcome back to Building Probability Models! You are now on lesson three of five, meaning you have crossed the halfway mark of this course. So far, you have learned how to check whether a probability model is valid and how to build a uniform model for equally likely outcomes. Those skills form a solid foundation for what comes next.

In this lesson, we tackle the kind of situation you will encounter most often in the real world: outcomes that are not equally likely. We will learn how to construct a non-uniform probability model from observed data or known rates, verify it, and use it to find event probabilities. The same build–verify–use workflow you practiced last time still applies, but the way we assign probabilities changes.

When Outcomes Are Not Equally Likely

A uniform model gives every outcome the same probability. That works well for fair coins, balanced dice, and random draws. But many everyday situations do not split evenly. Think of a clothing store tracking returns by reason: "wrong size" might account for half of all returns, while "defective item" might be quite rare. Or consider a city's weather patterns, where sunny days could be far more common than snowy ones.

When some outcomes naturally occur more often than others, forcing equal probabilities would misrepresent reality. Instead, we need a model that lets each outcome carry its own weight, and that is exactly what a non-uniform probability model provides.

Two pie charts comparing a uniform model with equal slices to a non-uniform model with unequal slices
Building a Non-Uniform Model from Data
Verifying the Model
Using the Model to Find Event Probabilities
Classifying Tech Support Tickets: A Complete Example
Conclusion and Next Steps
Sign up
Join the 1M+ learners on CodeSignal
Be a part of our community of 1M+ users who develop and demonstrate their skills on CodeSignal