public double[] drain(boolean[] bitsequence) {
		double[] drain = new double[2];
		double mu = 0;
		double sigma = 0;
		int bitToInt = 0;
		
		for (int i = 0; i < bitsequence.length; i++) {
			bitToInt = (bitsequence[i]) ? 1 : 0;
			mu += bitToInt;
		}
		
		mu /= bitsequence.length;
		
		for (int i = 0; i < bitsequence.length; i++) {
			bitToInt = (bitsequence[i]) ? 1 : 0;
			sigma += Math.pow(bitToInt - mu, 2);
		}
		
		sigma = Math.sqrt(1/(double)(bitsequence.length-1) * sigma);
		
		drain[0] = mu;
		drain[1] = sigma;
		return drain;
	}