0
$\begingroup$

What I am trying to do is generate random data based on a normal distribution and plot different paths of the process. But how can I add multiple paths instead of repeating the process over and over and storing it in variables? Here is the code and image for reference:

In[100]:= Randnmbr = RandomVariate[NormalDistribution[], 1000];
          Randnmbr2 = RandomVariate[NormalDistribution[0, 2], 1000];
          CumulativePlus = Join[{0}, Accumulate[Randnmbr ]];
          CumulativePlus2 = Join[{0}, Accumulate[Randnmbr2]];
          ListLinePlot[{CumulativePlus, CumulativePlus2},PlotTheme -> "Scientific"]

enter image description here

$\endgroup$

1 Answer 1

2
$\begingroup$
ListLinePlot[
 Table[Accumulate[RandomVariate[NormalDistribution[], 1000]], 10]]

enter image description here

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.