question: private double mean ( double [ ] vec ) { double result = 0 ; for ( int i = 0 ; i < vec . length ; i ++ ) result += vec [ i ] ; return result / vec . length ; }
target:  the mean of the values in the double array