calc_ci function

Calculate Confidence Intervals