# Probability mass function of a random walk process

Let $Y_n$ be a random walk process defined as $Y_n = Y_{n-1} + X_n$; $n = 1,2\ldots$ and $Y_0 = 0$, where $X_k = +1$ with probability $p$ and $-1$ with probability $1-p$. Write down the pmf for $Y_n$, and $E[Y_n]$ and $\operatorname{Var}[Y_n]$.

-
For pmf, let $z=(n+y)/2$. So $z$ steps forward, $n-z$ steps back, $z$ heads, $n-z$ tails. For $E(Y_n)$, the pmf is less pleasant than just writing down the answer. For variance, don't use pmf, use expectation of a sum fact. –  André Nicolas Nov 24 '11 at 21:47

HINTS: $Y_1 = Y_0 + X_1 = X_1$, $Y_2=Y_1+X_2 = X_1+X_2$, $Y_3 = Y_2 + X_3 = X_1+X_2+X_3$, $\ldots$
Each $X_k = 2 U_k - 1$, where $U_k$ is Bernoulli rv, with $\mathbb{P}(U_k = 1) = p$.
The sum of $n$ i.i.d. Bernoulli random variables follows the well-known distribution.