final double upper = binBounds[bin];
// Compute bMinus = sum or mass of bins below the bin containing the point
// First bin has mass 11 / 10000, the rest have mass 10 / 10000.
final double bMinus = bin == 0 ? 0 : (bin - 1) * binMass + firstBinMass;
final RealDistribution kernel = findKernel(lower, upper);
final double withinBinKernelMass = kernel.cumulativeProbability(lower, upper);
final double kernelCum = kernel.cumulativeProbability(lower, testPoints[i]);
cumValues[i] = bMinus + (bin == 0 ? firstBinMass : binMass) * kernelCum/withinBinKernelMass;
}
return cumValues;
}