fixed use of different sample (with and without replacement) in the two functions that handle confidence intervals.