How to Find E[X] and E[X²]
This guide explains how to compute Expectation of X and Expectation of X² for practical GATE exam problems.
Step 1: Identify What’s Given
In practical problems, the random variable X is usually:
- Discrete (PMF or table)
- Continuous (PDF)
- A function of another random variable
Case 1: Discrete Random Variable
E[X] = Σ xi pi
E[X²] = Σ xi² pi
Example
| X | -1 | 0 | 2 |
|---|---|---|---|
| P(X) | 0.2 | 0.3 | 0.5 |
E[X] = (-1)(0.2) + 0(0.3) + 2(0.5) = 0.8
E[X²] = (1)(0.2) + 0 + (4)(0.5) = 2.2
Case 2: Continuous Random Variable
E[X] = ∫ x f(x) dx
E[X²] = ∫ x² f(x) dx
Example
Given PDF: f(x) = 2x, for 0 ≤ x ≤ 1
E[X] = ∫01 x(2x) dx = 2∫01 x² dx = 2/3
E[X²] = ∫01 x²(2x) dx = 2∫01 x³ dx = 1/2
Case 3: Using Symmetry
If the distribution is symmetric about zero:
- E[X] = 0
- E[X²] ≠ 0
Examples: Normal (0, σ²), Uniform (−a, a)
Case 4: Function of a Random Variable
If Y = g(X), then E[Y] = E[g(X)]
Example
If Y = X² + 3:
E[Y] = E[X²] + 3
Case 5: Shortcut Formula
E[X²] = Var(X) + (E[X])²
This is extremely useful in fast GATE numericals.
Summary
- PMF/Table → Use summation
- PDF → Use integration