double getVariance(List<Double> data) {
        double mean = getMean(data);
        double temp = 0;
        for (double a : data) {
            temp += (mean - a) * (mean - a);
        }
        return temp / data.size();
    }