# Random walk - why is the STD equal sqrt(n)

Member warned that the homework template must be used
typical random walk :
one step forward or backward with equal probability and independence of each step , what is the expectation and Variance .

so i define indicator variable xi ={1 or -1 with equal probabilty .
E(xi) = 0
Var(xi) = 1

now define Sn as the sum of i=1,...,n
each step is independent and identical to the other so
i can say that Sn = nxi
now from definition of Expectation and Variance :
E(Sn) = E(nxi) = nE(xi) = 0
Var(Sn) = Var(nxi) = n2Var(xi) = n2 ⇒σsn=n
but i know for certain that actually the answer is σsn=sqrt(n)
how is that ?
thank you!

Related Precalculus Mathematics Homework Help News on Phys.org
.Scott
Homework Helper
##S_n## is the sum of ##x_i: i=1..n##
That is not ##nx_i##.

##S_n## would be {##-n, ... , +n##} with a binomial distribution.

Last edited:
##S_n## is the sum of ##x_i: i=1..n##
That is not ##nx_i##.

##S_n## would be {##-n, ... , 0, ..., +n##} with a binomial distribution.
could you elaborate further?

.Scott
Homework Helper
could you elaborate further?
For n=4:
##Sn## would be {-4, p=1/16; -2, p=4/16; 0, p=6/16; +2, p=4/16; +4, p=1/16}
or {-4, -2, -2, -2, -2, 0, 0, 0, 0, 0, 0, 2, 2, 2, 2, 4}

Actually, in post #2, that zero I put in the middle is wrong (I'll edit it):
For n=5:
##Sn## would be {-5, p=1/32; -3, p=5/32; -1, p=10/16; +1, p=10/32; +3, p=5/32; +5, p=1/32}
or {-5, -3, -3, -3, -3, -3, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 3, 3, 3, 5}

For n=4:
##Sn## would be {-4, p=1/16; -2, p=4/16; 0, p=6/16; +2, p=4/16; +4, p=1/16}
or {-4, -2, -2, -2, -2, 0, 0, 0, 0, 0, 0, 2, 2, 2, 2, 4}

Actually, in post #2, that zero I put in the middle is wrong (I'll edit it):
For n=5:
##Sn## would be {-5, p=1/32; -3, p=5/32; -1, p=10/16; +1, p=10/32; +3, p=5/32; +5, p=1/32}
or {-5, -3, -3, -3, -3, -3, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 3, 3, 3, 5}
yes but how do you show that σ=√n

.Scott
Homework Helper
I was just showing that your logic was wrong. I wasn't computing what it would actually be.

I was just showing that your logic was wrong. I wasn't computing what it would actually be.
are you sure you are capable to assist me ?
i think you might not know what an indicator random variable is and thus you confuse me and might cause actual damage , even though i'm sure your intentions are good

o.k so i figured it out by myself , sor anyone who might stumble upon this confusion i will explain :
so sn ≠ nxi but actually sn = ∑ni=1 xi
so E(sn) = E(x1) +....+ E(xn) = 0
and Var(sn) = Var(x1) +...Var(xn) = n ⇒σsn= √n
my mistake was for doing sn = nxi when actually it is sn = ∑ni=1 which is tremendously different .
good luck!

.Scott
Homework Helper
I am using the same nomenclature that you introduced.
if ##x_i## = {##-1, 1##} with equal distribution
then the distribution you will get with ##S_n## will be what I showed.
When I take the population standard deviation of some example ##S_n##'s, I get ##\sqrt{n}##.

What is very likely is that your ##nx_n## is not normal multiplication. But if it isn't, you would be running into trouble when you use it as normal multiplication later in your work.

gony rosenman
Ray Vickson
Homework Helper
Dearly Missed
I am using the same nomenclature that you introduced.
if ##x_i## = {##-1, 1##} with equal distribution
then the distribution you will get with ##S_n## will be what I showed.
When I take the population standard deviation of some example ##S_n##'s, I get ##\sqrt{n}##.

What is very likely is that your ##nx_n## is not normal multiplication. But if it isn't, you would be running into trouble when you use it as normal multiplication later in your work.
What is more likely is that the OP originally made an error, and wrote down something without giving it a lot of thought.

In fact, the original argument of the OP is almost right: each ##X_i## has mean zero, so each has variance ##\text{Var}(X_i) = E(X_i^2)##. However, since it really is true that all the ##X_i^2 = 1## are identical, it follows that the variance is ##\sum 1 = n.##

Last edited:
.Scott