Estimating values based on samples