calculate mean of array.
loop through values
array value = (indexed value - mean)^2
calculate sum of the new array.
divide the sum by the array length
square root it
edited:
I'll show you how to loop through the array and everything is pretty much this same step just with a different calculation.
// calculating mean.
int total = 0;
for(int i = 0; i < array.length; i++){
total += array[i]; // this is the calculation for summing up all the values
}
double mean = total / array.length;
edit2:
After reading your code, the part you are doing wrong is that you are not looping through the values and subtracting it with average correctly.
aka this part.
eleven = average_total - mean;
eleven = Math.pow(average_total,average_total);
you need to do this.
for(int i = 0; i < array.length; i++){
array[i] = Math.pow((array[i]-mean),2)
}
essentially you need to change every value in the array with newvalue = oldvalue - mean(average).
then calculate the sum... then square root that.