You are viewing a single comment's thread. Return to all comments →
java....
public static void stdDev(List<Integer> arr) { int sum=0; for (Integer value : arr) { sum+=value; } Float mean=(float)sum/arr.size(); Float sqr; float finalSum=0; for (Integer integer : arr) { sqr=(integer-mean)* (integer-mean); finalSum+=sqr; } double last=Math.sqrt(finalSum/arr.size()); System.out.println(last); }
Seems like cookies are disabled on this browser, please enable them to open this website
Day 1: Standard Deviation
You are viewing a single comment's thread. Return to all comments →
java....