Advanced Mathematics

Probability Densities

Probability for quantities that vary continuously, described by a density whose area over an interval is the chance of landing there.

Needs a step first: 16

A height or a waiting time can take any value, so the chance of any one exact value is zero. Instead a density f(x)≥0f(x)\ge0 with total area 11 gives P(a≤X≤b)=∫abf(x) dxP(a\le X\le b)=\int_a^b f(x)\,dx, and the distribution function F(x)=P(X≤x)F(x)=P(X\le x) is its integral. Expectations become integrals too: E[X]=∫x f(x) dxE[X]=\int x\,f(x)\,dx. The uniform, exponential and normal densities, the central limit theorem, entropy for continuous variables and generative models all work in this setting.

Where it shows up: A generative image model learns a density over pictures, and its training loss compares densities using cross-entropy.

How to hold it: In your head

See a density as probability per unit length, so probability is the area under it, and see why a density can exceed 11 while a probability cannot.

What knowing it looks like

  • Find the constant that makes a function a density, and compute probabilities as integrals.
  • Find the mean, variance and median of a continuous distribution.
  • Explain why a density can be larger than 11 while a probability cannot.

Test yourself

XX has density f(x)=kxf(x)=kx for 0≤x≤20\le x\le2 and 00 elsewhere. Find kk, P(X>1)P(X>1), E[X]E[X] and the median of XX.
Show the worked answer
Total area: ∫02kx dx=2k=1\int_0^2kx\,dx=2k=1, so k=12k=\tfrac12. P(X>1)=∫12x2 dx=4−14=34P(X>1)=\int_1^2\tfrac x2\,dx=\tfrac{4-1}{4}=\tfrac34. E[X]=∫02x22 dx=86=43E[X]=\int_0^2\tfrac{x^2}{2}\,dx=\tfrac86=\tfrac43. The median mm solves F(m)=m24=12F(m)=\tfrac{m^2}{4}=\tfrac12, so m=2≈1.41m=\sqrt2\approx1.41. Note f(2)=1f(2)=1: the values of a density are not probabilities; only its areas are.

Needs a step first: 16

Learn it with an AI

Copy this prompt into any AI assistant. It will take you through step by step at your level and finish with the test above.

Be my maths tutor. I'm learning "Probability Densities" (Undergraduate I tier): Probability for quantities that vary continuously, described by a density whose area over an interval is the chance of landing there.
I already know: Binomial, Poisson and Normal Distributions, Techniques of Integration.
Teach it Socratically: first ask what I already know; then explain the core idea with one concrete example and why it's true; then give me three problems, one at a time, easy to hard. Wait for my answer, check every step, and point out mistakes without giving the answer away.
Finish by testing me with this: $X$ has density $f(x)=kx$ for $0\le x\le2$ and $0$ elsewhere. Find $k$, $P(X>1)$, $E[X]$ and the median of $X$.
Use LaTeX for formulas. When you say where it's used later (machine learning, quantum mechanics), be specific.

On the way to

Recommended