private void calculateMinMaxAndAverage()
    {
        float mean = 0;
        for (Float data: dataSet)
        {
            if (data != null)
            {
                if (data < min)
                {
                    min = data;
                }
                if (data > max)
                {
                    max = data;
                }
                usefulData++;
                mean += data;
            }
        }
        if (usefulData == 0)
        {
            min = null; max = null;
        }
        else
        {
            average = mean / (float)usefulData;
            differenceMinMax = Math.abs(min - max); 
            ratioMinMax = min / max;
        }
    }