## Interview Question: Like Symmetry

Sample Question #264 (statistics)

Show that Var(x)=Var(1-x).
This entry was posted in Sample Qs. Bookmark the permalink.

### 5 Responses to Interview Question: Like Symmetry

1. Brett says:

First of all, you should know Var() stands for variance.

This is an easy one. Var(x+a), where a is a constant, is the same as Var(x). This follows from the Var() formula.

2. Clement says:

Var(x)=(1/N)*sum[(x_i-x_mean)^2]
Var({x+a})=(1/N)*sum[({x+a}_i-{x+a}_mean)^2]
=(1/N)*sum[(x_i+a-(x_mean+a))^2]

=(1/N)*sum[(x_i+a-x_mean-a)^2]

=(1/N)*sum[(x_i-x_mean)^2]

=Var(x)

3. Clement says:

More precisely, it should be:

Var(x)=(1/N)*sum[(x_i-x_mean)^2]
Var({a-x})=(1/N)*sum[({a-x}_i-{a-x}_mean)^2]
=(1/N)*sum[({-x}_i+a-{-x}_mean-a)^2]
=(1/N)*sum[({-x}_i-{-x}_mean)^2]
=(1/N)*sum[(-({x}_i-{x}_mean))^2]
=(1/N)*sum[({x}_i-{x}_mean)^2]
=(1/N)*sum[(x_i-x_mean)^2]
=Var(x)

4. Clement says:

I have consulted a clever guy today:
var(x)=E[(x-mean)^2]
var(-x+a)=E[((-x+a)-(-mean+a))^2]
=E[(-x+a+mean-a)^2]
=E[(-x+mean)^2]

=E[(-(x-mean))^2]
=E[(x-mean)^2]
=var(x)

5. Brett says:

Yes, if you want to work out the math from the definition of Var(), you should use expectations, not sum (which is for sample variance).

You can also memorize the easy formula that Var(x+a)=Var(x), because Var(a)=0 and Cov(x,a)=0.
-brett