+ float varA = 4 / Atotal * (sumPcubed - a * a);
+ float varB = 4 / Btotal * (sumQcubed - b * b);
+ float varD = sumPQsq / Atotal + sumPsqQ / Btotal - d * d * (1/Atotal + 1/Btotal);
+ float covAD = 2 / Atotal * (sumPsqQ - a * d);
+ float covBD = 2 / Btotal * (sumPQsq - b* d);
+
+ float varT = d * d * (varA + varB) / pow(a + b - d, (float)4.0) + pow(a+b, (float)2.0) * varD / pow(a+b-d, (float)4.0)
+ - 2.0 * (a + b) * d / pow(a + b - d, (float)4.0) * (covAD + covBD);
+
+ float ci = 1.95 * sqrt(varT);
+