Learning to Reason About Samples and Sampling Distributions