Simple Random Sample

If we wanted a sample of 500 students from the undergraduate body of 15,000 at a university, we could obtain names of students from the register, put each name on a slip of paper, put the names in a hat, shake the hat to mix the slips of paper up, and choose 500 slips of paper from the hat. Instead of slips of paper and hats, computers can be programmed to take random samples by generating random numbers and then identifying the names of students who have that number in the registrar's file of student names.