Estimating area under a curve