title: Passing list as an argument in wolfram mathematica
body: <p>I have a problem. I need to calculate the mean, but I don't understand why the code below doesn't work. I read the documention and this function should accept a list and return the mean value. What am I doing wrong? Why can't I pass a list to a function this way?  How should I do it to get the correct result? 
  Thank you in advance.</p>
  
  <pre><code>size = 15;
  list = Table[0, {size}]; (*Declare a list*)
  count = 0;
  While[count &lt; size,
       list[[count]] = 
       InverseCDF[NormalDistribution[0, 1], RandomReal[]];
       count++
  ]  
  Mean[list] (*Try to get the mean value*)
  </code></pre>