If a random variable X can take values -1 and 1, is the variance of X 1?

86 Views Asked by At

Consider a particle that starts at position 0. At each time step, the particle moves one step to the left or one step to the right with equal probability. What is the variance of the particle at time step n?

$X = X_1 + X_2 + ... + X_n$

The answer is n but I'm a little confused about how to calculate $Var[X_i]$.

As far as I understand it X can take values -1 and 1. Thus, $$ E[X_i] = \mu = 0 $$

which implies

$$ Var[X_i] = E[X_i^2]. $$

Now, the solution says that $Var(X_i) = 1$. Is that because $Var(X_i) = E[1^2] = E[(-1)^2] = 1$ or is there something I am missing? Thanks.

2

There are 2 best solutions below

3
On

$X_i^2=1$ so $Var(X_i)=\mathbb E[X_i^2]=\mathbb E[1]=1$.

0
On

More generally, if $\mathbb P(X_1=1)=p = 1-q = \mathbb P(X_1=-1)$, by independence we have $$ \mathbb E[S_n] = \mathbb E\left[\sum_{i=1}^n X_i\right] = \sum_{i=1}^n \mathbb E[X_i] = \sum_{i=1}^n (-q+p) = n(2p-1). $$ Moreover, the variance of $X_1$ is $$ \operatorname{Var}(X_1) = \mathbb E[X_1^2] - \mathbb E[X_1]^2 = (q(-1)^2+p)-(2p-1)^2 = 4pq. $$ Again by independence we have $$ \operatorname{Var}(S_n) = \operatorname{Var}\left(\sum_{i=1}^n X_i\right) = \sum_{i=1}^n\operatorname{Var}(X_i) = \sum_{i=1}^n 4pq = 4npq. $$ In the symmetric case where $p=q$, the variance at time step $n$ is simply $4n(1/2)^2 = n$.