0

I'm sure this should be straight forward but somehow i can't find a similar example online.

How do i calculate expectation and variance in this case:

A random walker takes 1 step backwards (-1) with p= 0.2, 1 step forward (+1) with p= 0.5, and stays at the same position with p = 0.3.

How do i find expectation and variance after n steps?

  • If each step is independent, then you are trying to find the mean and variance of a random variable $X(n)$ which is the sum of $n$ independent random variables, for fixed $n$. – Joe May 04 '21 at 14:26
  • Wait, but what do you mean “in 2D”, when you say there are only two directions: forwards and backwards? – Joe May 04 '21 at 14:28
  • oh, you are right, that was an error – LushyIvy May 04 '21 at 14:44
  • Do you know how to find the mean and variance for each individual step? Then, do you know how to find the mean and variance of the sum of a fixed number of independent random variables? – Joe May 04 '21 at 14:57
  • Well, kinda, I guess. I'm thinking the following but i have doubts. So for example to find the expectation: let's assume n = 1 then E(X_1) = (-1)0.2+(0)0.3+(1)*0.5 = 0.3, so with one step the expectation is 0.3. Then if we have n steps do we just multiply this by n? – LushyIvy May 04 '21 at 15:31
  • and then for the variance nVar(X1) = n( (-1)^2 * 0.2 + (0)(0.3) + (1)* 0.5 )=n(0.7) – LushyIvy May 04 '21 at 15:56
  • For the mean, yes, since each step has the same mean, adding up all of the means is the same as multiplying by $n$. – Joe May 04 '21 at 15:59
  • The same is true for the variance in this problem, BECAUSE the steps are independent. However, the calculation you did in your comment is $\mathbb{E}[X_1^2]$, not $\operatorname{Var}[X_1^2]$ – Joe May 04 '21 at 16:00

1 Answers1

0

Here are some of the concepts that you need to understand to solve this problem:

(1) The final location can be viewed as the sum of steps from the initial location: $$X(n) = X(0)+S(1)+S(2)+\dots+S(n)$$

Here $X(0)$ is the initial location, which also contributes to the mean and variance of $X(n)$. Often $X(0)$ is given as the origin (deterministic initial condition), in which case it has a mean and variance of zero, so can be ignored. I do not see an initial condition given in your problem. You would need that to determine the answer.

(2) The mean of a sum of random variables is equal to the sum of the means of the random variables. This is ALWAYS true (when each random variable has a mean), since the expected value is a linear operator:

When $a$ and $b$ are nonrandom: $$\mathbb{E}[aX+bY] = a\mathbb{E}[X]+b\mathbb{E}[Y]$$

(3) When random variables are INDEPENDENT (as in this problem), then the variance of their sum is equal to the sum of their variances.

Without independence, the formula is: $$\operatorname{Var}[aX+bY] = a^2\operatorname{Var}[X]+b^2\operatorname{Var}[Y] + 2ab \operatorname{Cov}[X,Y]$$ Independence implies that $\operatorname{Cov}[X,Y]=0$ (independence is a stronger condition)

(4) You need to know how to compute the mean and variance of each step. Your computation of the mean in the comments is correct (you should edit your original post to include that, rather than have it in the comments). Your computation of the variance is not correct, your computation is actually for $\mathbb{E}[S_1^2] = 0.2(-1)^2 + 0.5(1)^2 + 0.3(0)^2$. In order to compute the variance, you could use that computation, together with the identity: $$\operatorname{Var}[X] = \mathbb{E}[X^2] - \left( \mathbb{E}[X]\right)^2$$

Joe
  • 2,661