src/main/java/com/xceptance/neodymium/visual/ai/image/HistogramStatistics.java
/**
     * Calculate Skewness value.
     * 
     * @param values
     *            Values.
     * @param mean
     *            Specified mean.
     * @param stdDeviation
     *            Specified standard deviation.
     * @return Returns skewness value of the specified histogram array.
     */
Calculate Skewness value.

@param values
Values.
@param mean
Specified mean.
@param stdDeviation
Specified standard deviation.
@return Returns skewness value of the specified histogram array.
Calculate Skewness value . @param values Values . @param mean Specified mean . @param stdDeviation Specified standard deviation . @return Returns skewness value of the specified histogram array .
public static double Skewness(int[] values, double mean, double stdDeviation)
    {
        double n = 0;
        for (int i = 0; i < values.length; i++)
            n += values[i];
        double part1 = n / (n - 1) * (n - 2);
        double part2 = 0;
        for (int i = 0; i < values.length; i++)
        {
            part2 += Math.pow((i - mean) / stdDeviation, 3) * values[i];
        }
        return part1 * part2;
    }
public static double Skewness ( int [ ] values , double mean , double stdDeviation ) { double n = 0 ; for ( int i = 0 ; i < values . length ; i ++ ) n += values [ i ] ; double part1 = n / ( n - 1 ) * ( n - 2 ) ; double part2 = 0 ; for ( int i = 0 ; i < values . length ; i ++ ) { part2 += Math . pow ( ( i - mean ) / stdDeviation , 3 ) * values [ i ] ; } return part1 * part2 ; }
Calculate Skewness value.
Calculate Skewness value .