commons-statistics-regression/src/main/java/org/apache/commons/statistics/regression/util/matrix/StatisticsMatrix.java
/**
     * Computes the mean or average of all the elements.
     *
     * @return mean
     */
Computes the mean or average of all the elements.
@return mean
Computes the mean or average of all the elements . @return mean
public double mean() {
        double total = 0;
        final int n = getNumElements();
        for (int i = 0; i < n; i++) {
            total += get(i);
        }
        return total / n;
    }
public double mean ( ) { double total = 0 ; final int n = getNumElements ( ) ; for ( int i = 0 ; i < n ; i ++ ) { total += get ( i ) ; } return total / n ; }
Computes the mean or average of all the elements.
Computes the mean or average of all the elements .