This section contains modules to compute statistical values of datasets.
In this program there is the different notion of "mean" and "average"
to distinguish two different kinds of treatment of missing values.
While computing the mean, only the not missing values are considered
to belong to the sample with the side effect of a probably reduced sample
size. Computing the average is just adding the sample members and divide
the result by the sample size. For example, the mean of 1, 2, miss and 3
is (1+2+3)/3 = 2, whereas the average is (1+2+miss+3)/4 = miss/4 = miss.
If there are no missing values in the sample, the average and the mean are
identical.\\
In this section the abbreviations as in the following table are used:

\vspace{3mm}

\fbox{\parbox{15cm}{
\begin{eqnarray*}
\begin{array}{l}
\makebox[3cm][l]{{\bf sum}} \\
\end{array}
 &  &
\sum_{i=1}^{n} x_i 
\\
\begin{array}{l}
\makebox[3cm][l]{{\bf mean} resp. {\bf avg}} \\
\end{array}
 &  &
 n^{-1} \sum_{i=1}^{n} x_i 
\\
\begin{array}{l}
\makebox[3cm][l]{{\bf mean} resp. {\bf avg}} \\
\mbox{weighted by} \\
\{w_i, i=1, ..., n\}  \\
\end{array}
 & &
  \left ( \sum_{j=1}^{n} w_j \right )^{-1} \sum\limits_{i=1}^{n} w_i \, x_i \\
\\
\begin{array}{l}
\makebox[3cm][l]{Variance} \\
\makebox[3cm][l]{{\bf var}} \\
\end{array}
 &  &
 n^{-1} \sum_{i=1}^{n} (x_i - \overline{x})^2
\\
\begin{array}{l}
\makebox[3cm][l]{{\bf var} weighted by} \\
\{w_i, i=1, ..., n\}  \\
\end{array}
 & &
  \left ( \sum_{j=1}^{n} w_j \right )^{-1} \sum\limits_{i=1}^{n} w_i \, 
  \left ( x_i - \left ( \sum_{j=1}^{n} w_j \right )^{-1} \sum\limits_{j=1}^{n} w_j \, x_j \right)^2 \\
\\
\begin{array}{l}
\makebox[3cm][l]{Standard deviation} \\
\makebox[3cm][l]{{\bf std}} \\
\end{array}
 &  &
\sqrt{ n^{-1} \sum_{i=1}^{n} (x_i - \overline{x})^2 }
\\
\begin{array}{l}
\makebox[3cm][l]{{\bf std} weighted by} \\
\{w_i, i=1, ..., n\}  \\
\end{array}
 & &
\sqrt{
  \left ( \sum_{j=1}^{n} w_j \right )^{-1} \sum\limits_{i=1}^{n} w_i \, 
  \left ( x_i - \left ( \sum_{j=1}^{n} w_j \right )^{-1} \sum\limits_{j=1}^{n} w_j \, x_j \right)^2 } \\
\end{eqnarray*}
}}
