All pastes #261025 Raw Edit

poop

public text v1 · immutable
#261025 ·published 2006-11-28 21:25 UTC
rendered paste body
public double getStandardDeviation(){
		DecimalFormat formatter = new DecimalFormat("#0.00");
		double sum = 0;
		int index = 0;
		while(numbers != null && index < numbers.length){
			sum = Math.pow((numbers[index] - getAverage()), 2) + sum;
			index++;
		}
		String deviation = "";
		deviation = formatter.format(Math.sqrt(sum/(numbers.length - 1)));
		return Double.parseDouble(deviation);