AI

June 9, 2026 14 min read

Laplace Distribution to Mean Absolute Error Loss

Why Laplace distribution errors lead to mean absolute error loss, using mansion-priced outliers to explain MAE, fat tails, and calmer penalties.

Stories by Sagar Kharel

Pre-requisite

This article assumes you are comfortable with the bridge between probability distributions and loss functions.

In particular, we will use these ideas:

  • likelihood
  • maximum likelihood
  • IID: “same setup, fresh wiggle”
  • negative log-likelihood

If those ideas feel familiar, keep going.

If they feel rusty, read this foundation article first:

Read the setup first From Probability Distributions to Loss Functions

Laplace and the Mansion Street

Imagine a quiet neighborhood.

Most homes sell in the same narrow range: $430k to $520k.

The prices wiggle, but they wiggle like neighbors.

Then a few mansions appear.

One is worth $5.0 million.

Another is worth $5.2 million.

One more is worth $6.1 million.

They are still part of the neighborhood.

But in the price list, they stretch far away from everyone else.

That is the clue.

Most values stay close.

A few values wander far.

You can spot this same pattern everywhere.

Daily commute: Most days, your drive takes about twenty minutes. Then one crash turns the same route into a two-hour ordeal.

Flight departures: Most flights leave close to schedule. Then one winter storm does not create a five-minute delay. It creates a tomorrow problem.

Restaurant wait times: Most nights, “twenty minutes” means something close to twenty minutes. Then one holiday crowd turns it into two hours.

Package delivery: Most packages arrive near the promised day. Then one gets stuck in a warehouse maze and shows up wildly late.

Here is the pattern hiding inside all those examples.

The ordinary case is crowded.

Most values sit close to the middle.

But real life sometimes throws in a value that is not just a little far away.

It is far away.

That is the Laplace world:

Crowded middle.
Sharp center.
Long tails.

The middle stays calm. The tails leave room for chaos.

Out of place? Think La-place.


Laplace Visualized

Start with the neighborhood on the left.

Most home prices are similar, except the mansions show up as extreme values.

Now connect that picture to the curves on the right.

Neighborhood

With 3 mansions

Neighborhood map with prices and median shift Normal homes form a U-shaped neighborhood with house prices outside the curve. Three mansions sit inside the curve with mansion prices below them. A dotted line marks the median without mansions, and a solid line marks the median with mansions.

Laplace Curve

Laplace curve with median shift The dotted line marks the median without mansions. The solid line marks the median with mansions. The Laplace curve is pointier at the center and keeps fatter tails than the normal curve.

The Laplace curve on the right looks like a tent.

The center is the tent pole.

It holds the shape up.

That center also behaves like the median: the balance point of the data.

Half the values sit on one side.

Half sit on the other side.

Even after three mansions arrive, the center only shifts from $505k to $527.5k.

Why?

Each mansion gets one vote, not a megaphone.

That is the key difference from squared-error thinking.

A mansion is still far away.

But distance alone does not give it a megaphone.

The center moves a little. But it does not sprint toward them.

Now read the Laplace tent in two parts.

First: the sharp peak.

The peak is the tent pole.

The Laplace curve rises quickly near the center.

That means it expects many values to crowd around the ordinary case.

In our story, that is the regular neighborhood homes.

The normal curve also has a center, but it is smoother and rounder.

Laplace is pointier.

It plants the pole harder in the crowded middle.

Second: the fat tails.

Now look at the far edges of the tent.

The normal curve fades away faster as you move from the center.

It treats extreme values as more surprising.

The Laplace curve stays higher for longer.

Those thicker edges are the fat tails.

They say:

Extreme values are rare, but real life still leaves room for them.

That is why Laplace feels right for this street.

Most homes are ordinary.

A few mansions are extreme.

The pole stays planted, but the canvas stretches farther.

Out of place? Think La-place.

La-place tent: The pole stays planted. The canvas stretches.


Naming the Model

Now we can officially name this model:

ϵLaplace(μ,b)\epsilon \sim \text{Laplace}(\mu, b)

Read that as:

The error ϵ\epsilon follows a Laplace distribution.

The two values inside the parentheses are the parameters.

In plain English, they are the two knobs that shape the curve.

The first knob is the location, μ\mu.

That is the center of the spike.

In the house-price story, μ\mu is where the ordinary home prices gather.

Move μ\mu left or right, and the whole curve slides with it.

The second knob is the scale, bb.

That controls how quickly the curve falls away from the center.

A small bb means the curve is tight.

The spike is sharp, and the tails fade quickly.

A large bb means the curve spreads out.

The spike gets lower, and the tails stretch farther.

So if the ordinary homes are tightly packed, bb should be small.

If the prices are more spread out, or extreme prices appear more often, bb gets larger.

μ\mu and bb in action

The plot below answers the two knob questions.

μ moves the center

β = 35

Laplace curves with different location values Three Laplace curves share the same beta value but use different mu values. The peak moves while the shape stays the same.

Scale β flattens the peak, fattens the tail

μ = $505k

Laplace curves with different beta values Three Laplace curves share the same mu value but use different beta values. This teaching view lifts the tails visually so the spread is easier to compare.

μ plants the pole. β stretches the tent.

On the left: the μ\mu knob.

Keep bb locked and move μ\mu.

The tent slides left or right, but the shape holds still.

Same neighborhood. Different zip code.

Moving μ\mu is how we ask:

Where is ordinary?

For a Laplace story, that ordinary center behaves like a median.

Before the mansions appear, the median sits with the regular homes.

After the mansions appear, the median may move a little.

But it does not sprint toward the mansions.

It still listens to the crowd.

On the right: the bb knob.

Keep μ\mu locked and move bb.

A small bb makes the curve tall, sharp, and tight.

A large bb lowers the spike and stretches the tails.

Moving bb is how we ask:

How much room should we leave for extremes?

If the prices are tightly packed, bb stays small.

The curve acts like a strict neighborhood: values should stay close to ordinary.

If extreme prices appear more often, bb grows.

The curve opens the tent wider.

The center stays planted, but the tails get more room.


Laplace Density Curve Model

The equation for the Laplace density curve is:

p(x)=12bexp(xμb)p(x) = \frac{1}{2b} \exp\left( -\frac{|x-\mu|}{b} \right)

Here, xx is the home price.

The ordinary center is μ\mu.

So the error gap from ordinary is:

ϵ=xμ\epsilon = x - \mu

Read that as:

ϵ=home priceordinary center\epsilon = \text{home price} - \text{ordinary center}

So ϵ\epsilon near 0 means the price landed near the center.

A big positive ϵ\epsilon means the price landed far above ordinary.

A big negative ϵ\epsilon means the price landed far below ordinary.

Using the shortcut ϵ=xμ\epsilon = x-\mu, the Laplace equation becomes:

p(ϵ)=12bexp(ϵb)p(\epsilon) = \frac{1}{2b} \exp\left( -\frac{|\epsilon|}{b} \right)

For a well-centered price pattern, the center error should be 0, so we write:

ϵLaplace(0,b)\epsilon \sim \text{Laplace}(0, b)

Read it as:

The error gaps follow a Laplace distribution around zero.


From Laplace to MAE

We have the Laplace distribution.

Now we convert that distribution into a loss function.

The conversion uses maximum likelihood estimation (MLE).

We covered that bridge in the foundation article, so we will use it here without rebuilding every step.

Need the bridge first? From Probability Distributions to Loss Functions

Here, we only ask:

When the errors follow a Laplace distribution, what loss function appears?

If we assume the error gaps follow a Laplace distribution, maximum likelihood asks:

Which model makes these observed errors most likely?

For one error gap:

p(ϵi)=12bexp(ϵib)p(\epsilon_i) = \frac{1}{2b} \exp\left( -\frac{|\epsilon_i|}{b} \right)

For many errors, we multiply the probabilities:

i=1n12bexp(ϵib)\prod_{i=1}^{n} \frac{1}{2b} \exp\left( -\frac{|\epsilon_i|}{b} \right)

As in the foundation article, MLE starts by multiplying the likelihoods.

Negative log-likelihood then turns that product into a sum we can minimize.

That gives us:

i=1nlog(12b)+i=1nϵib-\sum_{i=1}^{n} \log\left(\frac{1}{2b}\right) + \sum_{i=1}^{n} \frac{|\epsilon_i|}{b}

Now fill the error gap using EGO:

Error = Ground truth − Output

ϵi=y(i)y^(i)\epsilon_i = y^{(i)} - \hat{y}^{(i)}

In our story:

  • y(i)y^{(i)} is the actual home price.
  • y^(i)\hat{y}^{(i)} is the model’s predicted ordinary price.

So the full negative log-likelihood becomes:

log(L)=i=1nlog(12b)constant+1bfixed scalei=1ny(i)y^(i)prediction errors\begin{aligned} -\log(L) &= \underbrace{ -\sum_{i=1}^{n} \log\left(\frac{1}{2b}\right) }_{\text{constant}} \\ &\qquad + \underbrace{ \frac{1}{b} }_{\text{fixed scale}} \underbrace{ \sum_{i=1}^{n} |y^{(i)}-\hat{y}^{(i)}| }_{\text{prediction errors}} \end{aligned}

Here, we treat bb as fixed while training the prediction model.

With bb fixed, the first two pieces are dead weight.

They do not depend on the prediction y^\hat{y}.

So dropping them does not change which model wins.

The part the model actually minimizes is:

i=1ny(i)y^(i)\sum_{i=1}^{n} |y^{(i)}-\hat{y}^{(i)}|

And if we average it:

1ni=1ny(i)y^(i)\frac{1}{n} \sum_{i=1}^{n} |y^{(i)}-\hat{y}^{(i)}|

we get Mean Absolute Error.

That is the secret:

Laplace does not punish the square of the miss.

It punishes the size of the miss.

That is why the MAE loss curve looks like a V.

Move one unit away from zero, the loss rises by one.

Move ten units away, the loss rises by ten.

The slope stays steady.

The Naming Trap: μ\mu, Median, and Mean

One small trap is worth clearing up.

In the Laplace formula, the center is called μ\mu.

That can feel confusing because μ\mu often means “mean.”

But here, think of μ\mu as a blank nametag.

It means: the center of the tent.

Now the question is:

How do we find that center?

For a normal bell curve, the best center is the mean.

The average.

That is why big mansions can pull the center hard.

For a Laplace tent, the best center behaves like the median.

The middle.

A mansion still counts, but it does not get extra power just because its price tag is huge.

So when we say the Laplace center behaves like a median, we are talking about the prediction.

Now look at the name Mean Absolute Error.

That “mean” is doing a different job.

After the model makes predictions, we calculate all the absolute misses.

Then we average those misses.

That average is the MAE.

So remember:

Median finds the center. Mean averages the misses.


Interpreting MAE

Here is the formula we finally care about:

MAE=1ni=1ny(i)y^(i)\text{MAE} = \frac{1}{n} \sum_{i=1}^{n} |y^{(i)} - \hat{y}^{(i)}|

Here, (i)(i) is the row number, not an exponent.

So y(1)y^{(1)} means the first real value, and y^(1)\hat{y}^{(1)} means the first prediction.

The formula looks heavier than the question it is asking.

MAE is easiest to read as a distance counter.

It is asking:

How large is the average miss?

Read it with EGO:

Error = Ground truth − Output

error(i)=y(i)y^(i)\text{error}^{(i)} = y^{(i)} - \hat{y}^{(i)}

Then MAE takes the absolute value.

That means it keeps the size of the miss and throws away the direction.

A prediction that is too low by $20k and a prediction that is too high by $20k both have the same absolute error:

20k=20k|20k| = 20k 20k=20k|-20k| = 20k

Let’s calculate that penalty using one real home price.

Suppose the actual home price is:

y=$500ky = \$500k

Now the model makes different predictions.

For one example, ignore the average for a moment:

loss=yy^\text{loss} = |y - \hat{y}|

Using EGO:

loss=error\text{loss} = |\text{error}|

Now watch what the absolute value does.

Tiny Miss: Prediction Off by $10k

Suppose the model predicts:

y^=$490k\hat{y} = \$490k

The actual price was $500k.

So the error is:

error=500k490k=10k\text{error} = 500k - 490k = 10k

The MAE loss for this one prediction is:

loss=10k=10k\text{loss} = |10k| = 10k

The model was close.

So the penalty stays small.

Medium Miss: Prediction Off by $20k

Now suppose the model predicts:

y^=$520k\hat{y} = \$520k

The actual price was still $500k.

So the error is:

error=500k520k=20k\text{error} = 500k - 520k = -20k

The negative sign only tells us the prediction was too high.

MAE only cares about the size of the miss:

loss=20k=20k\text{loss} = |-20k| = 20k

The miss doubled.

The penalty doubled.

That is the calm personality of MAE.

Wild Miss: Prediction Off by $4.5M

Now suppose the model predicts:

y^=$5.0M\hat{y} = \$5.0M

The actual price was still $500k.

So the error is:

error=500k5,000k=4,500k\text{error} = 500k - 5{,}000k = -4{,}500k

The MAE loss is:

loss=4,500k=4,500k\text{loss} = |-4{,}500k| = 4{,}500k

That is a big penalty.

MAE is not blind.

It does not pretend the prediction was close.

But it charges the model for the distance.

It does not square the distance and turn one wild prediction into the whole neighborhood boss.

Average the Absolute Errors

Now average the three misses we just calculated:

MAE=1ni=1ny(i)y^(i)\text{MAE} = \frac{1}{n} \sum_{i=1}^{n} |y^{(i)} - \hat{y}^{(i)}|

Fill it with the three prediction misses:

MAE=error1+error2+error33=10k+20k+4,500k3=10k+20k+4,500k3=1,510k\begin{aligned} \text{MAE} &= \frac{ |\text{error}_1| + |\text{error}_2| + |\text{error}_3| }{3} \\ &= \frac{|10k| + |-20k| + |-4{,}500k|}{3} \\ &= \frac{10k + 20k + 4{,}500k}{3} \\ &= 1{,}510k \end{aligned}

So the average absolute miss is:

$1.51M\$1.51\text{M}

That is the bill.

One wild prediction made the average large.

But it did not explode the bill the way squared error would.

The Bottom of the V

So MAE does not simply punish being wrong.

It punishes distance.

If the prediction lands close to the actual price, the loss stays low.

If the prediction drifts far away, the loss rises steadily.

That is why the MAE loss curve looks like a V.

For one home, the bottom of the V is where:

y^=y\hat{y} = y

For many homes, MAE asks for the prediction that makes the average absolute miss as small as possible.

That center behaves like the median.

The regular homes pull on it.

The mansions pull on it too.

But each mansion gets distance, not distance squared.

That matches the Laplace story.

Under the Laplace distribution, many errors still crowd near the center.

But the tails stay thicker.

So when a prediction lands far away, MAE reacts.

It just does not panic.

MAE respects big misses, but it does not let them run the neighborhood.

When MAE Works

Use MAE when big misses are real, but should not hijack the model.

It is a good fit for messy regression problems with ordinary cases and occasional extremes.

House prices, wait times, delivery delays, and travel times often live in this world.

When MAE Gets Dangerous

MAE can be too calm when large mistakes deserve special punishment.

If one 10-unit miss should hurt much more than ten 1-unit misses, MSE may be the better rulebook.

MAE says: big misses count.

MSE says: big misses should hurt.


Where Will You See MAE?

MAE shows up when a model predicts a number and you want the error in the original units.

If the target is dollars, MAE is in dollars.

If the target is minutes, MAE is in minutes.

That makes it easy to explain:

Our house-price model is off by about $18k on average.

or:

Our delivery estimate is off by about 12 minutes on average.

Here is where MAE lives.

Robust regression:
Use MAE when you want a trend line that does not get dragged around by extreme data points.

Tree models:
Decision trees, random forests, gradient boosted trees, and XGBoost-style models can use absolute-error-style objectives.

That makes them less eager to chase one wild outlier.

Time series forecasting:
Daily sales, delivery times, wait times, and travel delays often have weird spikes.

MAE helps protect the baseline from one chaotic day.

Business forecasting:
Revenue, demand, inventory, and staffing forecasts often have messy real-world extremes.

MAE keeps the miss in plain units, so the result is easier to explain.

The Scale Still Matters Trap

MAE does not square errors, but scale can still take over.

If a model predicts both house price and commute time, house-price errors may dominate the loss just because dollar numbers are bigger.

That does not mean house price is the only thing that matters.

It means the bigger unit got the louder microphone.

For a deeper look at scaling during preprocessing, read:

Feature Scaling: Making Elephants and Bees Comparable

The Secret Prize of MAE

MSE trains the model toward the mean.

MAE trains the model toward the median.

That sounds like a tiny math detail.

It changes what kind of center the model loves.

Love the Mean When Total Pull Matters

The mean is the center of gravity.

Every value pulls on it.

Big values pull harder because they are far away.

That is useful when the total matters.

Imagine a basketball team.

Nine players score 0 points.

One player scores 100 points.

The median score is 0.

The mean score is 10.

If you are asking, “What did a typical player score?” the median tells the story.

But if you are the coach looking at the scoreboard, the 100-point player matters.

The outlier did not ruin the game.

The outlier won the game.

So love the mean when big values should pull hard.

That is the MSE personality:

Every big miss should hurt extra.

Love the Median When Typical Experience Matters

The median is the middle of the line.

It listens to the crowd.

Big values still count, but they do not get a megaphone.

Imagine a neighborhood.

Nine homes cost $300k.

One castle costs $50M.

The mean gets dragged toward the castle.

The median stays with the ordinary homes.

If you are a normal buyer asking, “What does a typical home cost here?” the median is the better answer.

That is the MAE personality:

Big misses count, but they do not take over.

So the choice is not just technical.

It is a values question.

Use MSE when big errors should be treated like special failures.

Use MAE when big errors are real, but should not bully the center.

Mean chases the center of gravity.

Median protects the middle of the crowd.


Before You Forget

Laplace distribution

The tent-shaped rulebook: a sharp center for ordinary values, with long tails for the weird stuff.

Laplace distribution. The tent-shaped rulebook: a sharp center for ordinary values, with long tails for the weird stuff.


Quiz

86% of people love quizzes after learning. Are you one of them?

Question 1 of 12 🏆 0 / 120 ⚡ Attempt 1 of 2

Question text