My book says that for the random walk $W_n$ generated by i.i.d. $X \sim \text{Ber}_{\pm1}(p), W_0=0$ the law of large numbers implies that $\frac{1}{n} W_n$ grows lineary with slope $2p-1$.
It is not explained why, so I wondered. I know the law of large numbers, but doesn't it say that if you repeat an experiment independently a large number of times and average the result, what you obtain should be close to the expected value? I do not understand how that implies the linear growth here and would appreciate your help!
A random walk is a sum of i.i.d. random variables. In this case, you can write $$ W_n = X_1 + \cdots + X_n, $$ where $(X_i)$ is a sequence of i.i.d. $Ber(p)$ random variables. Then the law of large numbers tells you that $$ \lim_{n \to + \infty}\frac{W_n}{n} = E(X_1) = 2 p - 1. $$ Informally, this is indeed saying that $W_n$ (not $W_n/n$) grows linearly with slope $2p-1$.