# Thread: discrete random variable prove var[x]=E[x^2]- (E[x])^2

1. ## discrete random variable prove var[x]=E[x^2]- (E[x])^2

If X is a discrete random variable and E[X] exists and the function given by f(x) for each x in the domain of the function is the probability mass function at x, then
VAR[x]=E[x^2] - (E[x])^2

Im confused on what im suppose to satisfy for the hypothesis. i know the claim is true by trial and error, but can i just pick any discrete function and show it (solved it using a bernoulli) ? or do i have to show it for all functions which i don't know how to do.

2. The expected value of a random variable is its mean $\mu$

The variance of a random variable is its second central moment.

$V(X) = E(X - \mu)^2 = E(X - E(X))^2 = E [ X^2] -2XE[X] +(E(X))^2] = E(X^2) -2E(X \; E(X)) +E(X)^2$

since, $E(X \; E(X)) = E(X)E(X) =E(X)^2$

what do you get???

3. This is a standard proof. Here it is on wiki
Variance - Wikipedia, the free encyclopedia

4. thakn you both!! i knew the answer but just needed direction on how to get there!