ci function

Calculation of confidence intervals (based on normal approximation or t-distribution)