Author 
Comment/Response 
Adam Kustka

08/01/12 09:58am
Hi,
I’d like to run an evaluation say, 1000 times, on a notebook which computes a value based on random numbers from a standard normalized population. I’ve figured out using OpenAppend, Write and Close to collect the data in a spreadsheet but can’t figure out how to loop the calculation. I’ve read up on Do and Loops. It seems Do is not the right command here, since Do works on predefined expressions rather than ones that I’ve created and defined once. I hope I can articulate this clearly.. If I try to concatenate all of my expressions to calculate the value of interest in a Do function, every time the expression Table[RandomVariate[NormalDistribution[0,1]],{<row number>}] is entered, a new set of standard normal distribution numbers will be generated. I need the calculated value to draw on the same set of random variates of from the standard normal population.
When I define this, as RSND= Table[RandomVariate[NormalDistribution[0,1]],{67}] (67 is my row number in this case), Do does not seem to recognize my definition.
This might be naïve, and further reveal that I’m a bit new… but is there a way to simply ask Mathematica to go to line 50 (for example) and repeat the analysis x times? I hate asking questions that are probably simple to many but I have been trying to get this to work for several days. Thanks for your help!!
URL: , 
