Hello,
First of all, thanks for taking the time to write the awesome introduction! I've learned a lot :)
I was reading the code and the error Error::ZeroVariance returned here got me thinking: does it make sense for confidence_interval() to only return this error when both the samples have a zero variance?
Numerically, when both are zero we have a problem (v would divide by zero). But when only one is zero (let's say x.var), the code would collapse to:
// Estimate the variance of the `y.mean - x.mean`
let var_delta = y.mean_var();
// Approximate the degrees of freedom of `var_delta`
let v = (y.count - 1) as f64;