1.3.17 · D1Probability & Statistics

Foundations — Maximum a posteriori estimation (MAP)

2,576 words12 min readBack to topic

Before you can read the parent note Maximum a posteriori estimation (MAP), you must own every symbol it uses without flinching. This page builds each one from nothing — plain words, then a picture, then why the topic needs it. Read top to bottom; each block leans on the one above.


1. What is a "parameter" ?

Picture it. Imagine a coin whose chance of landing heads is not fixed at . That hidden chance is . If , the coin is heads-biased; if , it is tails-biased. lives on a number line from to here.

Figure — Maximum a posteriori estimation (MAP)

Why the topic needs it. MAP's (Maximum a Posteriori's) whole job is to estimate — to point at one spot on that line and say "this is my best guess." Everything else is machinery for choosing that spot.


2. The "hat" — an estimate of

Picture it. The true is a fixed but invisible dot on the number line. Our method plants a flag where it thinks the dot is. They may not coincide — the hat is a guess.

Why the topic needs it. MAP produces one particular guess, written (read "theta-hat MAP"): the estimate of chosen by the Maximum a Posteriori rule. The subscript just labels which estimation method made the guess — you will also meet from a different method.


3. What is "data" ?

Picture it. You flip the coin 10 times and write down the results: That list of 10 outcomes is , and here .

Why the topic needs it. is invisible; is what we can see. MAP (Maximum a Posteriori) is the bridge that walks from the visible data to the hidden knob.


4. Probability and the pipe

Picture it. might be . But jumps to — knowing about the clouds changed the probability. The pipe is a filter: it throws away every world where is false, then measures inside what remains.

Figure — Maximum a posteriori estimation (MAP)

Why the topic needs it. MAP is built on two conditional probabilities pointing in opposite directions:

  • — "if the knob were , how likely is this data?"
  • — "given this data, how likely is the knob to be ?"

The entire subject is about flipping the first into the second.


5. Independence and i.i.d. data

Before we can multiply probabilities together, we must know when that is legal.

Picture it. Ten separate coin flips: the 3rd flip does not care what the 2nd did, and every flip uses the same biased coin. That is exactly i.i.d.

Why the topic needs it. Independence is the permission slip that lets a joint probability factor into a product: . Without it, the neat notation in Section 11 would be wrong. Every worked example in the parent silently assumes i.i.d. data.


6. The three named probabilities

Each conditional above has a name. Learn them like faces.

Picture it. Start with a wide, vague "prior" hump over . The data reshapes it into a sharper "posterior" hump. The peak of that final hump is the MAP estimate .

Figure — Maximum a posteriori estimation (MAP)

Why "posterior" is the target. It is the only one of the three that answers the actual question: given everything I now know, what is ? Likelihood ignores prior knowledge; prior ignores data; the posterior fuses both.


7. Bayes' theorem — the flipping machine

Plain words. Posterior equals likelihood times prior, divided by the evidence .

Why we need it. We can compute (models tell us how likely data is for a given knob). We want . Bayes' theorem is the exact machinery that turns the one we can compute into the one we want. See Bayes Theorem.


8. The operator

Picture it. On a curve of posterior-vs-, is the height of the summit; is the -coordinate directly under the summit. MAP wants the location, so it uses .

Figure — Maximum a posteriori estimation (MAP)

Why the topic needs it. "Most probable parameter" literally means "the where the posterior is tallest" — that is exactly .


9. The logarithm — why it appears

Why the topic needs it. Likelihoods are products of many tiny probabilities (one per data point). Multiplying hundreds of numbers near zero underflows a computer to . Taking converts the product into a friendly sum, and because is monotonic, the location of the peak does not move. So: Same answer, numerically safe, easier calculus.


10. The derivative — finding the peak

Why the topic needs it. At the very top of a smooth hill, the ground is momentarily flat — slope . So to find the peak of the log-posterior we set its derivative to zero and solve. This is why every worked example ends with "." The flat-top rule is how we locate algebraically.


11. Product and sum notation

Why the topic needs it. Because the data is i.i.d. (Section 5), the joint likelihood factors into the product of each point's likelihood — hence . After taking (Section 9), that product becomes a . This is the exact move in the parent's Gaussian example.


Prerequisite map

Parameter theta true knob

Likelihood P of x given theta

Estimate theta hat

MAP estimate theta hat MAP

Data x

Probability and the pipe given

Prior P of theta

Independence and iid

Bayes theorem

Evidence P of x marginal

Posterior P of theta given x

argmax operator

Logarithm

Derivative equals zero plus boundary check

Sum and product

Maximum a Posteriori the topic

Each arrow means "you need the tail before the head makes sense." Notice that the likelihood and prior both feed Bayes' theorem, which produces the posterior, which + log + derivative finally squeeze into the MAP estimate .


Where these lead next

Once these symbols are solid, you can read how MAP (Maximum a Posteriori) connects outward:

  • Maximum Likelihood Estimation (MLE) — MAP with a flat prior. A flat (or uniform) prior is one that assigns the same to every allowed ; being constant, it adds nothing to the , so MAP collapses back into pure likelihood maximization.
  • Conjugate Priors and Beta Distribution — priors that keep the algebra clean.
  • Regularization in ML, Ridge Regression, Lasso Regression — MAP wearing a disguise.
  • Overfitting — the disease the prior cures.

Equipment checklist

Cover the right side and answer each. If you stall, reread that section.

What do the letters "MAP" stand for?
Maximum A Posteriori — "the peak of the belief we hold after seeing the data."
What does the symbol represent, in plain words?
An unknown number (the "knob") that controls a probability model — the thing MAP estimates.
What is the difference between and ?
is the true unknown value nature uses; ("theta hat") is our computed estimate of it. The hat means "guess, not truth."
What does mean?
"Theta-hat MAP" — the specific estimate of produced by the Maximum a Posteriori rule.
What does bold mean and what is ?
The full list of observed data points; is how many there are.
Read aloud.
"Probability of given " — probability of assuming is already known true.
What does it mean for data to be i.i.d.?
Every point is independent of the others and drawn from the same model with the same ; this lets the joint probability factor into a product.
Name the three probabilities in Bayes' theorem.
Likelihood , prior , posterior .
Which one does MAP maximize?
The posterior .
What is the evidence and why has it no ?
The marginal likelihood (or a sum over ); integrating out leaves a fixed number with no inside.
Why can MAP drop the denominator ?
It contains no , so dividing by it never moves the peak's location.
What does return — a height or a location?
The location (the ) where the function is tallest.
Why do we take before optimizing?
It turns products into sums (avoids underflow, easier calculus) and, being monotonic, keeps the peak in the same place.
Why set the derivative to zero to find the peak, and what edge case does this miss?
A smooth maximum has zero slope; but the peak may sit on a boundary of 's range, where the slope need not be zero — so check the endpoints too.
When does turn into ?
When you take the of an i.i.d. product likelihood.
What is a "flat" prior and what does it do to MAP?
A prior that gives equal probability to every allowed ; being constant it drops out of , so MAP reduces to MLE.