Applying probability to a random sample