Modeling by using machine learning exists because of uncertainty. If we could perfectly map inputs to outputs, there would be no need for models. But real-world data is messy, incomplete and noisy—so we model likelihoods instead of certainties. Learning about probabilities lays the fundamentals of everything machine learning and artificial intelligence (AI). Theories in probabilities allow us to understand the data we used to model in a beautiful and elegant way. It plays a critical role in modeling uncertainties in ML models predictions. It helps us quantify likelihood, probability and certainties for a statistical model so we can confidently measure the outcome models we create. Diving into the world of probabilities and learning the fundamentals will help ensure that you understand the basis of all statistical learning models and how their predictions come to be. You will learn how we can make inference and produce probabilistic outcomes.
In order to learn popular distributions and model your data with confidence, let’s get to the basics and clarify some terminologies.
Random variable: A numerical representation of an outcome of a random phenomenon. It's a variable whose possible values are numerical outcomes of a random process.
Discrete random variable: A random variable that can take on a finite or countably infinite number of distinct values. For example, the outcome of a coin flip (Heads = 1, Tails = 0), or the number of spam emails received in an hour.
Continuous random variable: A random variable that can take on any value within a given range. For example, the height of a person, the temperature in a room or the amount of rainfall.
Event: A set of one or more outcomes from a random process. For example, rolling an even number on a die (outcomes: 2, 4, 6) or a customer churning.
Outcome: A single possible result of a random experiment. For example, flipping a coin yields either "Heads" or "Tails."
Probability : A numerical measure of the likelihood that an event will occur, ranging from 0 (impossible) to 1 (certain).
Conditional probability : The probability of event occurring, given that event has already occurred. This step is crucial in ML, as we often want to predict an outcome given specific features.
Probability is a measure of how likely an event is to happen, from 0 (impossible) to 1 (certain).
In machine learning, this often takes the form of conditional probability
Example: A logistic regression model might say
> “Given age = 45, income = USD 60K, and prior history,
> the probability of churn is 0.82.”
This example doesn’t mean that the customer will churn—it’s a belief based on the statistical patterns in the training data.
In the modern era of gen AI, probabilistic models such as logistic regression plays a huge role in determining the results and outputs of a model. This role is often in the form of an activation function in the layers of neural networks.