How to expand integral of variance for continuous random variable?

66 Views Asked by At

Variance of continuous random variable: $$E[(X-\mu_X)^2]=\int_x (x-\mu_X)^2 f_X(x)dx $$

I should expand into two parts, but I don't know how to move from here and I doubt it's even correct:

$$\int_x (x-\mu_X)^2 f_X (x)dx = \int_x(x^2-2x\mu_x+\mu^2_X)f_X dx$$

1

There are 1 best solutions below

0
On BEST ANSWER

Well, yes, this is perfectly fine. If you want to continue computing, you could do something like this: $$\int x^2 f_X(x) dx - 2 \mu_X \int x f_X(x) dx + \mu_X^2 \int f_X(x) dx = \mathbb{E}[X^2] - 2 \mu_X \mathbb{E}[X] + \mu_X^2 = \mathbb{E}[X^2] - 2 (\mathbb{E}[X])^2 + (\mathbb{E}[X])^2 = \mathbb{E}[X^2] - (\mathbb{E}[X])^2,$$ where I only used the definitions of $\mu_X, \, f_X$ and the law of the unconscious statistician. I hope this is what you meant.