Main content

## Statistics and probability

### Course: Statistics and probability > Unit 6

Lesson 2: Sampling and observational studies- Reasonable samples
- Valid claims
- Making inferences from random samples
- Identifying a sample and population
- Identify the population and sample
- Examples of bias in surveys
- Example of undercoverage introducing bias
- Correlation and causality
- Identifying bias in samples and surveys
- Simulation and randomness: Random digit tables

© 2023 Khan AcademyTerms of usePrivacy PolicyCookie Notice

# Simulation and randomness: Random digit tables

CCSS.Math:

We can simulate events involving randomness like picking names out of a hat using tables of random digits. Tables of random digits can be used to simulate a lot of different real-world situations. Here's 2 lines of random digits we'll use in this worksheet:

Line 1: 9656505007166058119414873041978557645195

Line 2: 1116915529332418359401727865956572382322

Things to know about random digit tables:

- Each digit is equally likely to be any of the 10 digits 0 through 9.
- The digits are independent of each other. Knowing about one part of the table doesn't give away information about another part.
- The digits are put in groups of 5 just to make them easier to read. The groups and rows have no special meaning. They are just a long list of random digits.

## Problem 1: Getting a random sample

There are 90 students in a lunch period, and 5 of them will be selected at random for cleaning duty every week. Each student receives a number 01, minus, 90 and the school uses a random digit table to pick the 5 students as follows:

- Start at the left of Line 1 in the random digits provided.
- Look at 2-digit groupings of numbers.
- If the 2-digit number is anything between 01 and 90, that student is assigned lunch duty. Skip any other 2-digit number.
- Skip a 2-digit number if it has already been chosen.

Line 1: space, 9656505007166058119414873041978557645195

## Problem 2: Doing a simulation

A cereal company is giving away a prize in each box of cereal and they advertise, "Collect all 6 prizes!" Each box of cereal has 1 prize, and each prize is equally likely to appear in any given box. Caroline wonders how many boxes it takes, on average, to get all 6 prizes.

She decides to do a simulation using random digits as follows:

- Start at the left of Line 2 in the random digits provided.
- Look at single digit numbers.
- The digits 1, minus, 6 represent the different prizes.
- She ignores the digits 0, comma, 7, comma, 8, comma, 9.
- One trial of the simulation is done when all 6 digits have appeared.
- At the end of the trial, she counts how many digits it took for every digit 1, minus, 6 to appear (ignoring the other digits).

Line 2: space, 1116915529332418359401727865956572382322

## Want to join the conversation?

- I still don’t understand how to assign random digits for a simulation. For example, if the problem gives you something like “Bob makes freethrow shots 70% of the time, and his coach wants to calculate the likelihood of Bob making his free throws 4 out of the 5 times”. How would you assign digits to that type of problem??(8 votes)
- Let each random digit represent one free throw. We could let a digit less than 7 represent making a free throw (note that this occurs with probability 7/10=70% since 7 of the 10 possible values from 0 to 9 are less than 7), and let a digit greater than or equal to 7 represent missing a free throw.

Now generate a larger number of separate groups of 5 random digits. Count the number of groups, and also count how many of these groups contain 4 or more digits that are less than 7 (or equivalently no more than 1 digit that is greater than or equal to 7) . The number of groups containing 4 or more digits that are less than 7, divided by the number of groups, is an estimate of the likelihood (or probability) of making at least 4 out of 5 free throws.

Example: let's look at the 16 groups of 5 random digits given in this lesson.

96565 05007 16605 81194 14873 04197 85576 45195 11169 15529 33241 83594 01727 86595 65723 82322

Out of these 16 groups, we find that 9 have 4 or more digits that are less than 7. So 9/16 is an estimate of the likelihood of making at least 4 out of 5 free throws.

By the way, the theoretical likelihood is

(5 choose 4)(0.7)^4 (0.3) + (5 choose 5)(0.7)^5 = 5*0.07203 + 1*0.16807 = 0.52822.

So the estimate 9/16 = 0.5625 is not bad, considering that we used only 16 groups of 5 random digits.(38 votes)

- So when assigning random digits, how do you know when to use double digits and when to use singe digits?(4 votes)
- How many digits you use all depends on your sample size. If you are assigning digits to a sample of 100 people, then you'll need double digits, all numbers from 0 to 99.

A general rule of thumb is to subtract your sample size by one and assign that many digits. So for a sample size of 20, you'll need the amount of digits in 19 (20 - 1), which is 2 digits.

Hope this helped.(9 votes)

- How could we solve Question A of problem 2 without using random tables?(1 vote)
- Jerry's answer is great, and following link is a wikipedia link to this concept

https://en.wikipedia.org/wiki/Coupon_collector%27s_problem(0 votes)

- I don't understand the first and third one about choosing numbers between 1-90 and why more chances for the prizes?(2 votes)
- it basically tries to say in a random sense what are the chances of 5 students to be assigned for cleaning duty. And in a random sense what are the chances of someone winning 6 prizes.(2 votes)

- What does random numbers means?(3 votes)
- Why is the box number 14.2 and not rounded to the nearest whole digit.(2 votes)
- Is it just me or there is a typo in Problem 1 when the parameters are given? It says

'If the 2-digit number is anything between 01 and 90, that student is assigned LUNCH duty. Skip any other 2-digit number.'

Then the question goes on an asks about CLEANING duty. I spent a good ten minutes thinking about how I'm supposed to solve it with no cleaning duty related information.. So it's a bit confusing.(1 vote)- Yeah mate. Cleaning duty or Lunch duty, I think they are talking about ignoring numbers 0 and 91-99.(3 votes)

- How likely are three "1"s in sequence to appear in one table of random digits?(1 vote)
- Assume every digit in the sequence is independent of each other, the digit generator is fair, so that would leave us with 3 digits in sequence.

Your question is a bit vague, but let us assume

we have a sequence of 10 digits.

We know, that the probability of 3 digits in sequence is

1/10 * 1/10 * 1/10 = 1/1000.

Now, let's look at the number of places in a sequence of 10 digits, where 3 ones can be placed.

111xxxxxxx

x111xxxxxx

...

xxxxxxx111

which leaves us with 8 possibilities.

So in total, we have 8 times 1/1000 = 8/1000 or

a probability of 1/125 so a bit less than 1%.(2 votes)

- What is assimilation value in Math?(1 vote)
- What is random means in math?(1 vote)