This site is designed solely for the use of Mr. Habib's MAT 120 classes.  All rights reserved.  No part of this site or its contents from MAT textbook (STATISTICS Informed Decisions Using Data by: Michael Sullivan, III) may be reproduced by any process without written permission by the author or publisher and/or Mr. Habib.

 

Previous Page

 

 

Generating a Simple Random Sample

 

Example1:  The village of Lemont wants to learn the opinion of its residents regarding the construction of a new shopping mall.  The mayor wishes to obtain a simple random sample of 10 from the 8791 residents of Lemont. The mayor must first obtain a list of all residents in the village, the frame, and assign the residents numbers from 1-8791.  Finally, the mayor will randomly select 10 residents to be in the sample.  Once an individual is selected to be in the sample, he or she cannot be selected again.  This is call sampling without replacement.  We sample without replacement so that we don’t select the same individual twice.

 

 

The first step is to set the seed by selecting a “starting number” and storing this number in rand. Suppose, for this example, that we select the number “34” as the starting number. Type 34 into your calculator and press the STO key found on the lower left section of the calculator keys. Next press he MATH key found in the upper left section of the calculator keys. The Math Menu will appear.

 

 

Use the blue right arrow key, , to move the cursor to highlight PRB. The Probability Menu will appear.

 

 

The first selection on the PRB menu is rand, which stands for “random number”. Notice that this highlighted. Simply press ENTER and the starting value of “42” will be stored into rand and will be used as the seed for generating random numbers.

 

 

Now you are ready to generate a random integer. Press MATH again and the Math Menu will appear. Use the blue right arrow key, , to move the cursor to highlight PRB. The Probability Menu will appear. Select : RandInt (by using the blue down arrow key, , to highlight it and pressing ENTER or by pressing the 5 key. RandInt (should appear on the screen. This function requires two values: the starting integer, followed by a comma (the comma is found on the black key above the 7 key), and the ending integer. Close the parentheses and press ENTER. (Note: it is optional to close the parenthesis at the end of the command.) This command will generate one random number.

 

Now here is an example. In this example, one random number between 1 and 15 has been generated. The random number is 2.

 

 

If you want to generate several random numbers with one command, you can change the RandInt command so that it contains three values: the starting value, the ending value, and the number of values you want to generate.

 

For an example, suppose you want to generate 15 values from the integers ranging from 1 to 50. The command is randInt (1, 50, 15).

 

 

Press ENTER and a partial display of the 15 random integers should appear on your screen. (Note: your numbers will probably be different from the ones you see here. The numbers that are generated will depend on the seed that is initially selected.)

 

 

Use the right arrow to scroll through your 15 items. You might find that you have some duplicate values. The TI-83 uses a method called “sampling with replacement” to generate random numbers. This means that it is possible to select the same integer twice.

 

In the example in the text, you are asked to select a random sample of 10 residents from the 8,791 residents in the Village of Lemont. One way to choose the sample is to number the residents from 1 to 8,791 and randomly select 10 different residents. This sampling process is “without replacement”. Since the way to obtain 10 different residents is to generate more than 10 random integers, and to select the first 10 different numbers from the list. To be safe, you should generate 15 random integers.

 

 

Use the right arrow to scroll to the right to see the rest of the list and write down the first 10 distinct values. Note: The numbers you generate depend on the seed and will differ from the numbers in this example.

 

********************************************************************************

 

Example 2: Refer to table below:

 

 

 

a.     To obtain a simple random sample of size 10, press MATH , using the blue right arrow to

        highlight PRB and select 5: randInt. Enter the starting value of 1, the ending value of 50 and a

        sample size of 15. We are generating more numbers than we actually need because of the

        possibility of getting duplicates in the sample. To obtain your sample of 10, select the first 10

        distinct numbers in the sample that you generated. (Note: In this example, we did not set a new

        seed . Setting a seed is optional. It is not required.)

 

b.     Repeat the steps in a and generate another sample of integers.

 

**********************************************************************************