title: Matlab create array random samples Gaussian distribution
body: <p>I'd like to make an array of random samples from a Gaussian distrubution.</p>
  
  <p>Mean value is 0 and variance is 1.</p>
  
  <p>If I take enough samples, I would think my maximum value of a sample can be 0+1=1.
  However, I find that I get values like 4.2891 ...</p>
  
  <p>My code:</p>
  
  <pre><code>x = 0+sqrt(1)*randn(100000,1);
  mean(x)
  var(x)
  max(x)
  </code></pre>
  
  <p>This would give me a mean like 0, a var of 0.9937 but my maximum value is 4.2891?</p>
  
  <p>Can anyone help me out why it does this?</p>