I wrote this to simulate m random walks of n steps
Li[n_] := 2*RandomVariate[BinomialDistribution[n, 1/2], n] - n; Tb[n_, m_] := Table[Li[n], {i, 1, m}]; y = table[10, 10] The walker has to start at (0) I don't know how to adjust the function to get that. And I have to write a function that finds the average position after n steps and the average of the square of the distance between the walker after n steps and the origin without using Mean or StandardDeviation. We can take n=10 and m=10
For the average position I wrote that but I don't get the same result as when I use Mean ( and I think I have to do that in one function)
averagepos[n_] := Total[y]/n; Total[averagepos[n]] For the average of the square of the distance walker-origin I don't get what I should calculate.


0, not{0, 0}? $\endgroup$Prependto get the right starting position, like I did here. $\endgroup$