Making inferences from random samples