c{1}{N} \sum_{n=1}^N
x_n. \]</span> It is an error to the call the mean function with an array of
size <span class="math inline">\(0\)</span>.</p>
<!-- real; variance; (real[] x); -->
<p></p>
<p><code>real</code> <strong><code>variance</code></strong><code>(real[] x)</code><br>
The sample variance of the elements in x. For <span class="math inline">\(N &gt; 0\)</span>, <span class="math display">\[
\text{variance}(x) \ = \ \begin{cases} \frac{1}{N-1} \sum_{n=1}^N (x_n
- \bar{x})^2 &amp; \text{if } N &gt; 1 