Question: Do loop problem

Hello

I am trying to do a do loop

X[1] := Statistics:-Sample(Binomial(200, .5), 1);

for i to 10 do X[i+1] := Statistics:-Sample(Binomial(200-X[i], .5), 1) end do;

And it shows error like this

Error, (in rtable/Sum) invalid arguments.

Did I do something wrong in my code?

Please Wait...