Random Walk in einer Dimension

Simulation

Clear[x];
x[0]:=0;
x[n_]:=x[n]=x[n-1]+2(Random[Integer]-1/2);
ListLinePlot[Table[x[j],{j,1,1000}]]

Wahrscheinlichkeitsverteilung

Manipulate[
ListPlot[{Table[If[OddQ[n-k],{k,0},{None,None}],{k,-n,n}],Table[{k,(2^(-n))Binomial[n,((n-k)/2)]},{k,-n,n,2}]},PlotRange->All,PlotStyle->{Blue,{Red,PointSize[0.007]}},ImageSize->600],
{{n,50},10,300,1,Appearance->"Labeled"}]