Skip to content
AI360XpertBeta

Fisher Information

How sharply the data pin down a parameter. Sharp likelihood peaks mean tight estimates, while flat ones mean the data barely speak.

Ten coin flips give a flat likelihood with information 40 and a 0.158 error floor, while one hundred flips sharpen the peak to information 400 and a 0.05 floor
Ten coin flips give a flat likelihood with information 40 and a 0.158 error floor, while one hundred flips sharpen the peak to information 400 and a 0.05 floor

Why Does This Exist?

Two experiments can report the same estimate and deserve very different trust. Six heads in ten flips and six hundred heads in one thousand flips both say p^=0.6\hat{p} = 0.6, but the second pins pp down while the first barely constrains it. The estimate alone cannot tell them apart, so every interval and sample-size calculation needs a separate number for how much the data speak.

Fisher information is that number. It measures the expected curvature of the log-likelihood: sharp peaks carry information and give tight estimates, flat peaks carry little and give wide ones. It sets the floor in the Cramer-Rao bound, drives the standard errors behind confidence intervals, and weights steps in natural-gradient methods. It assumes the likelihood setup in maximum likelihood estimation.

The one idea you need first

The score s(θ)=∇θlog⁡p(x;θ)s(\theta) = \nabla_{\theta} \log p(x; \theta) is the slope of the log-likelihood: how strongly a small move in the parameter would raise the fit. Its average over data is zero at the truth, so the average slope tells you nothing. Its variance tells you everything. Large variance means the data tug hard on the parameter, which is exactly what high curvature means. Fisher information is that variance.

Think of It Like This

A valley felt out in fog

You stand somewhere in a valley in thick fog and feel the ground under your feet. In a sharp V-shaped gully, two steps tell you where the bottom is within a pace. In a wide flat bowl, you can wander several meters and the slope still feels near zero, so your position stays vague.

Fisher information is the curvature at your feet. Observed information is the ground you actually feel today. Expected information averages that curvature over all the weather the valley could have shown. Where the analogy stops: curvature is local. A sharp local dip inside a multimodal landscape still misleads globally, and no local number warns you about a second valley over the ridge.

How It Actually Works

Under regularity conditions, meaning the support of the data does not move with θ\theta and differentiation can pass under the integral, two definitions agree. Here p(x;θ)p(x; \theta) is the model density, ∇θ\nabla_{\theta} is the gradient with respect to the parameter, and E\mathbb{E} averages over data drawn at θ\theta:

I(θ)=Var(∇θlog⁡p(X;θ))=−E[∇θ2log⁡p(X;θ)]I(\theta) = \mathrm{Var}(\nabla_{\theta} \log p(X; \theta)) = -\mathbb{E}[\nabla^{2}_{\theta} \log p(X; \theta)]

In words: the variance of the score equals minus the expected second derivative. Information adds per independent observation, so In(θ)=n i1(θ)I_{n}(\theta) = n \, i_{1}(\theta), where i1i_{1} is one observation's share. For vectors the same idea becomes the information matrix, and natural gradients precondition an update by its inverse because the matrix says which directions the data actually constrain.

For a Bernoulli trial with success chance pp, one flip carries i1(p)=1/(p(1−p))i_{1}(p) = 1 / (p (1 - p)), so nn flips carry In=n/(p(1−p))I_{n} = n / (p (1 - p)). Wald standard errors then use 1/I(θ^)1 / \sqrt{I(\hat{\theta})}: estimation error cannot sit far below that floor once nn is large.

Worked example

Take n=100n = 100 flips at p=0.5p = 0.5. Then p(1−p)=0.25p (1 - p) = 0.25 and:

I=100/0.25=400,floor=1/400=1/20=0.05I = 100 / 0.25 = 400, \quad \text{floor} = 1 / \sqrt{400} = 1 / 20 = 0.05

At p=0.6p = 0.6, p(1−p)=0.24p (1 - p) = 0.24, so I=100/0.24≈416.7I = 100 / 0.24 \approx 416.7 and the floor is 1/416.7≈0.0491 / \sqrt{416.7} \approx 0.049. Same sample size, slightly sharper peak because the variance p(1−p)p(1-p) is smaller away from one half.

Now drop to n=10n = 10 at p=0.5p = 0.5: I=10/0.25=40I = 10 / 0.25 = 40 and the floor is 1/40≈0.1581 / \sqrt{40} \approx 0.158. Same estimate scale, triple the wobble. That factor of 10≈3.16\sqrt{10} \approx 3.16 is the whole point: information turns more data into a number, and the error floor falls with the square root of nn.

Code

The point is the check: evaluate the definition where it matters, with standard-library arithmetic only.

import math

def bernoulli_info(n: int, p: float) -> float:    return n / (p * (1.0 - p))

def error_floor(info: float) -> float:    return 1.0 / math.sqrt(info)

for n, p in [(100, 0.5), (100, 0.6), (10, 0.5)]:    info = bernoulli_info(n, p)    print(n, p, round(info, 1), round(error_floor(info), 3))# -> 100 0.5 400.0 0.05# -> 100 0.6 416.7 0.049# -> 10 0.5 40.0 0.158

Information 400 gives the 0.05 floor from the worked example, and dropping to ten flips triples it to 0.158. The code is the definition, evaluated at the three cases the page reasons about.

Watch Out For

Quoting expected information when the model is wrong

I(θ)I(\theta) averages under the assumed model. When the model is only a working approximation, the true sampling wobble follows the sandwich form H−1VH−1H^{-1} V H^{-1} instead of I−1I^{-1}, where HH is the expected curvature and VV is the true variance of the score. Model-based intervals then run narrow and overconfident.

Symptom: intervals that miss far more often than their nominal rate while residuals look structured. Fix: use observed information or sandwich standard errors when the model is approximate, and distrust I−1I^{-1} whenever diagnostics suggest misspecification.

Trusting curvature at the boundary

Near p=0p = 0 or p=1p = 1, the Bernoulli value 1/(p(1−p))1 / (p (1 - p)) explodes while the regularity behind it frays: the estimate piles at the edge and the normal approximation breaks. Wald intervals built from I−1I^{-1} can then spill outside [0,1][0, 1].

Symptom: an estimate of exactly 0 or 1 with a tiny reported standard error. Fix: reparameterize through the logit, or switch to exact or profile intervals. If the estimate sits on the edge, the curvature number is fiction.

The Quick Version

  • Fisher information is expected log-likelihood curvature: sharp peaks mean tight estimates.
  • For Bernoulli data, In=n/(p(1−p))I_{n} = n / (p (1 - p)); 100 fair flips give 400 and a 0.05 floor.
  • Ten flips give 40 and a 0.158 floor, so error falls with the square root of nn.
  • Information adds per observation when regularity holds.
  • It sets Cramer-Rao floors, Wald standard errors, and natural-gradient steps.
  • Under misspecification use sandwich errors, not I−1I^{-1}; at boundaries go exact.