Visualizing unintuitive math results

Sometimes mathematical results feel wrong, even after you have gone through a formal proof. But once you see it in the right way, it becomes painfully obvious. This is an example of how a clear visual can build a solid intuition.

The Unintuitive Statement

Given a probability density function(PDF) \(f\) that is symmetrical around 0, i.e. \(f(x) = f(-x)\) the following integral holds

$$ \int_{-y}^{y}F(x)\partial x = y $$

where \(F(x)\) is the cumulative function of \(f\).

This integral, for any symmetrical PDF will evaluate to the simplest of lines. The result feels to simple for it to apply so broadly. But it is true.

The Visual Intuition

Instead of providing a proof, I’ll give you a visual of what the integral actual does. Just look at it.

visual_explanation

  • The integral steps from the center (\(x=0\)) outwards.
  • Every step outwards, we add two bars – to the left and to the right – of size \(F(x)\) and \(F(-x)\) to the integral.
  • Due to symmetry (\(F(x) + F(-x) = 1\)) we end up adding a bar of height \(1\) every step outward.
  • Ultimately, these bars of height \(1\) sum up to a rectangle of size \(1\cdot y\).

Actual Proof

For an actual proof we just need two facts:

  • Integrating \(g(x)\) over a negative range \([-y, 0]\) is equivalent to integrating the negative \(g(-x)\) over the flipped interval \([0, y]\): \(\int_{-y}^0g(x) = \int_{0}^y g(-x)\)
  • For a symmetrical PDF the following holds: \(F(-x) = 1 - F(x)\)

First we split the interval \([-y, y]\) into positive and negative ranges and apply the range flip.

$$ \int_{-y}^{y}F(x)\partial x = \int_{-y}^{0} F(x)\partial x + \int_{0}^{y}F(x)\partial x = \int_{0}^{y}F(-x)\partial x \int_{0}^{y} F(x)\partial x $$

Then we use the little fact about the cumulative functions(second point above) and arrive at what we wanted.

$$ \int_{0}^{y}F(-x)\partial x \int_{0}^{y} F(x)\partial x = \int_{0}^{y}1- F(x)\partial x \int_{0}^{y} F(x)\partial x = \underbrace{\int_{0}^{y}1 \partial x}_{=y} - \underbrace{\int_{0}^{y} F(x)\partial x \int_{0}^{y} F(x)\partial x}_{=0} $$