Expected Absolute Value of Normal

[Jump to AI Interview]

Problem Statement

If X \sim N(0, 1) is a standard normal random variable, what is E[|X|]?

Solution

This problem requires computing the expected value of the absolute value function, which involves integrating over the absolute value of the normal PDF.

Step 1: Set Up the Expectation

For a continuous random variable X with PDF f(x), the expected value of g(X) is:

E[g(X)] = \int_{-\infty}^{\infty} g(x) f(x) \, dx

In our case, g(X) = |X| and X \sim N(0, 1), so:

E[|X|] = \int_{-\infty}^{\infty} |x| \cdot \frac{1}{\sqrt{2\pi}} e^{-x^2/2} \, dx

Step 2: Use Symmetry

Since the standard normal distribution is symmetric about 0 and |x| is an even function, we can simplify:

E[|X|] = \int_{-\infty}^{\infty} |x| \cdot \frac{1}{\sqrt{2\pi}} e^{-x^2/2} \, dx = 2 \int_{0}^{\infty} x \cdot \frac{1}{\sqrt{2\pi}} e^{-x^2/2} \, dx

The factor of 2 appears because the integral from -\infty to 0 equals the integral from 0 to \infty by symmetry.

Step 3: Evaluate the Integral

We need to compute:

I = \int_{0}^{\infty} x e^{-x^2/2} \, dx

Use the substitution u = x^2/2, so du = x \, dx:

I = \int_{0}^{\infty} e^{-u} \, du = \left[-e^{-u}\right]_{0}^{\infty} = 0 - (-1) = 1

Step 4: Combine Results

E[|X|] = 2 \cdot \frac{1}{\sqrt{2\pi}} \cdot 1 = \frac{2}{\sqrt{2\pi}} = \sqrt{\frac{2}{\pi}}

Step 5: Numerical Evaluation

E[|X|] = \sqrt{\frac{2}{\pi}} \approx \sqrt{\frac{2}{3.14159}} \approx \sqrt{0.6366} \approx 0.798

Final Answer

E[|X|] = \sqrt{\frac{2}{\pi}} \approx 0.798

Generalization

For X \sim N(0, \sigma^2) (normal with mean 0 and variance \sigma^2):

E[|X|] = \sigma \sqrt{\frac{2}{\pi}}

This can be derived similarly, with the \sigma factor coming from the scaling property of the normal distribution.

For X \sim N(\mu, \sigma^2) with \mu \neq 0, the calculation is more complex and involves the error function.

Alternative Derivation Using Integration by Parts

We can also use integration by parts on:

E[|X|] = 2 \int_{0}^{\infty} x \cdot \frac{1}{\sqrt{2\pi}} e^{-x^2/2} \, dx

Let u = x and dv = e^{-x^2/2} dx. However, the substitution method shown above is more straightforward.

Key Insights

  1. Symmetry Simplifies: The symmetry of the standard normal distribution about 0 allows us to compute the integral over [0, \infty) and double it.

  2. Even Function Property: Since |x| is even and the standard normal PDF is even, their product is even, simplifying the integration.

  3. Scaling Property: For X \sim N(0, \sigma^2), we have E[|X|] = \sigma E[|Z|] where Z \sim N(0, 1), giving E[|X|] = \sigma \sqrt{\frac{2}{\pi}}.

  4. Comparison to Standard Deviation: For standard normal, E[|X|] = \sqrt{\frac{2}{\pi}} \approx 0.798, while \text{SD}(X) = 1. The expected absolute value is smaller than the standard deviation.

  5. Mean Absolute Deviation: E[|X - \mu|] for X \sim N(\mu, \sigma^2) is the mean absolute deviation (MAD). For \mu = 0, this equals E[|X|] = \sigma \sqrt{\frac{2}{\pi}}.

Applications

  • Robust Statistics: Mean absolute deviation is a robust measure of spread.

  • Error Analysis: Expected magnitude of measurement errors.

  • Risk Metrics: Expected absolute deviation from a target in finance.

  • Signal Processing: Expected amplitude of noise signals.