← Learn AI
C_000162 · mathematical foundations · intermediate

Fitting Distributions

Choosing a parametric family and estimating its parameters from data, then checking whether the fit is adequate rather than assuming it.

Step 1 of 4

In words

What it is, why it matters, and what it is like.

Why am I learning this?

Fitting distributions is the skill that lets you summarize a pile of data with just two or three numbers, turning a chaotic list of measurements into a clear picture of what usually happens and what is rare. Imagine you collect the wait times for 100 buses: listing all 100 numbers tells you little, but saying "the waits are roughly normally distributed with an average of 12 minutes and a spread of 4 minutes" gives you immediate power. You can predict that most buses will arrive within a predictable window, flagging any delay as an anomaly rather than noise. This skill is the foundation for understanding uncertainty in your work. Without it, every new set of data feels like starting from scratch. With it, you recognize patterns—whether they are symmetric bell shapes or lopsided curves—and can make informed decisions based on what the data actually shows, not just what it looks like at a glance.

The idea, in plain terms

Think of a distribution as a smooth, idealized curve that represents the pattern underlying your messy real-world data. Real data is jagged; every measurement is unique. But if you plot how often different values occur, a shape emerges. Fitting a distribution is like trying to trace that emerging shape with a pre-made stencil from a book of standard curves.

You do not draw the curve from scratch. Instead, you pick a family of curves—for example, the "normal" curve, which is symmetrical and bell-shaped—and then you adjust its "knobs." These knobs are called parameters. For a normal curve, the two knobs are the center (the mean) and the width (the standard deviation). You twist these knobs until the stencil hugs your data as closely as possible.

How do you know which knob settings are the best? The most common method is called "maximum likelihood." This sounds complex, but it simply means: choose the knob settings that make the actual data you have the most probable outcome. If your data has many values near 10 and few near 20, you adjust the curve so its peak sits near 10. You are looking for the scenario where your observed data was most likely to be generated.

Once you have set the knobs, you must verify the fit. A curve might look good in the middle but fail at the edges. This is where you check for "goodness-of-fit." You ask: does this curve honestly represent the entire dataset, including the rare extremes? To check this, you often use diagnostic plots—visual comparisons between your actual data counts and the counts predicted by your curve—or statistical tests that quantify the mismatch.

Crucially, not all data fits a bell shape. Sometimes data is "skewed," meaning it is lopsided, with a long tail stretching out to one side (like income data, where most people earn modest sums but a few earn vastly more). If your data is skewed, a normal curve will never fit well, no matter how you twist the knobs. You must then try a different family of curves, one designed for lopsided shapes.

An analogy

Imagine you are trying to capture the shadow of a complex object on a wall using only a few light bulbs. The data is the actual shape of the object casting the shadow. Fitting a distribution is like choosing a handful of standard light sources—perhaps a round spotlight, a rectangular panel, or a focused beam—and adjusting their brightness and position until the combined light creates a silhouette that matches the object as closely as possible.

You don't paint the shadow pixel by pixel; you adjust the positions (parameters) of your fixed light shapes (distribution families) to approximate the result. If the object is a perfect sphere, a single round spotlight might suffice. If the object is an L-shape, you might need two spotlights at different angles. The process involves adjusting the knobs until the approximation is as close as possible, and then checking from different angles (goodness-of-fit) to ensure no parts of the object are hidden or misrepresented by the lights.

The analogy breaks down slightly because, unlike light bulbs, you cannot change the shape of the distribution family itself; you can only move it and stretch it. If your object is a starburst shape, no amount of moving standard circles or rectangles will make them fit perfectly.

Definition

Fitting a distribution involves selecting a standard mathematical curve from a known family, adjusting its parameters to maximize the probability that this curve would produce your observed data, and then verifying that the fit adequately captures the data's structure across all ranges, not just the center.

Where this sits

This concept sits at the heart of understanding how samples relate to populations. It connects directly to Sampling Distributions, which describes how the parameter estimates you find (like the mean) would vary if you collected many different samples from the same population. It also connects to Concentration Inequalities, which provide mathematical guarantees about how closely your sample's average will likely stay to the true population average, helping you trust your fitted parameters.

Signal from the Frontier

Get the next essay on mind, machine, and meaning

Essays at the intersection of AI, philosophy, and Indian governance. No promotional content.

We'll send a one-click sign-in link to confirm. No password needed.

Views expressed are personal and do not represent the Government of India or the Government of Uttarakhand.

Fitting Distributions — Learn AI — Dr. B.V.R.C. Purushottam