public static void main(String[] args) {
double[] array = {2,3,4,4,7};
double sum = 0;
for(int i=0;i<array.length;i++){
sum+=array[i];
}
double average = sum/array.length;
double standarDeviation = 0;
double total = 0;
for(int i=0;i<array.length;i++){
total+=(array[i]-average)*(array[i]-average);
}
standarDeviation = Math.sqrt(total/array.length);//标准差
System.out.println(standarDeviation); //1.6733201
}