Name(s):                                                :
Math 203 Introduction to Statistics
Activity on SRS's from the TI-83
Tom Linton and Wendy Weber, Spring 2001
The random digits table (Table B in the text) can be used to select an SRS of size n from any population that has been labeled with numbers. However, the process has its drawbacks and is rather time consuming. Today we will learn to use the TI-83 to quickly select our SRS's and explore some of the reasons why we use random samples.

A simple random sample (SRS) of size n is a sample chosen in such a way that all groups of n individuals from our population have an equal chance of being selected. SRS's tend to match the characteristics of the population. This limits the impact of under-representation, bias, lurking variables and other problems that may occur from alternate sampling techniques. If a population consists of several different types of individuals, say 42% with brown hair, 33% with blonde hair, 20% with black hair and 5% with red hair, then a random sample (assuming it is large enough) from this population should come close to matching these percentages. The reason is that every individual is equally likely to be included, so about 42% of the chosen individuals will have brown hair (because 42% of the population does and everyone is equally likely to be included), about 33% will have blonde hair (since 33% of the population does), and so on.

A random sample tends to reproduce the characteristics of the population on a smaller scale.

However, even random samples can give poor matches to population characteristics. We might actually pick 10 persons from the population above, all of whom have red hair. It isn't very likely, but it can happen. For sure, we should expect our samples to be slightly different than the population, and we must realize that different samples will have different characteristics (all samples will NOT be the same). It is unlikely that any two samples (of a large size) will exactly match the population, or exactly match one another.
 

  1. Let's explore the typical variation and population matching power amongst random samples from a population with three types of individuals, say 33% who prefer diet pop, 60% that prefer regular pop and 7% that do not drink pop. Our make believe population will be the numbers from 1 to 100. Individuals 1 to 33 like diet pop, individuals 34 to 93 prefer regular pop, and individuals 94 to 100 do not drink pop. Note: there are 33 / 100 = 33% who prefer diet and 60 / 100 = 60% that prefer regular pop, and 7 / 100 = 7% that do not drink pop. If we select 10 random individuals from this population, we'd expect 3 or 4 to prefer diet pop, 6 or so to prefer regular pop and 0 or 1 that do not drink pop. However, different samples will have different numbers that prefer diet pop, regular pop, or do not drink pop. We'll use our TI-83's to generate our random samples of size 10. In essence, the TI-83 contains its own version of Table B, however the one in the calculator has some fancy features that make SRS selection more convenient. To make sure that different groups select different samples, we need to seed our calculator's random number generator. Each member of your group should use the same seed, and you only need to seed your calculator once today.

  2.  
    1. Pick a number (not a nice round one like 7500, but a messy one) from 5000 to 10000 and record it here                   . This number is your seed value.

    2.  
    3. On your home screen, type in the number you selected above, then the [STO>] key. Now press [MATH] [left-arrow] (to select the probability sub-menu, [PRB], you can also press [right-arrow] three times), select [1:rand], and finally press [ENTER]. This command tells your calculator to start generating random numbers starting at the location specified by your seed value chosen in part (a). It is similar to the process of using Table B, starting at a certain row. Your screen should look something like the one below (with your seed value replacing 5678).
       
       
    1. Several of the commands we use today will come from the [PRB] (probability) sub-menu of the [MATH] menu. You should remember how to get to this sub-menu. Next, we want to have our calculator select 10 numbers (randomly) each having a value from 1 to 100 and store them in the list L1. The 10 numbers that the calculator selects will be the individuals in our sample. Similar to using Table B, to use the calculator, your population must be labeled with numbers. The command below asks the TI-83 to select our sample (do NOT execute this command just yet).
    randInt(1,100,10)[STO>][2nd]L1 [ENTER]
      The randInt command is located on the probability sub-menu of the [MATH] menu. The first two parameters (the 1 and the 100) tell the TI-83 to select numbers between 1 and 100 (including the endpoints, so a 1 and a 100 may be selected), while the third number (the 10) tells the TI-83 to select 10 random integers. The results are then stored in the list L1.
       
    1. If you wanted to store 15 numbers from 0 to 47 in L2, what command would you use? Make sure that everyone in your group understands the answer to this question. You can quickly select an SRS of size n from any population using the randInt command!

    2.  

       
       
       
       
       
       
       
       
       
       
       
       

    3. Suppose that you asked your calculator for an SRS of size 4 from the labels 1 to 23 and your calculator gave:
    3, 21, 3, 11.
      The four selected individuals get to go to Hawaii! Which four people get to go? Is there a problem?
       
       
       
       
       

      This is one drawback to the randInt command, sometimes we get repeated individuals in our samples, and these MUST be removed. When this happens, you can enter another version of the randInt command (just omit the third parameter), and keep pressing [ENTER] until you have enough individuals in your sample. For example, the command randInt(1,23) will generate a single random value from 1 to 23. If you then press [ENTER], the calculator will generate another single random number from 1 to 23. You can simply continue to generate single individuals for your sample, until you have a total of n different individuals (that is, until all of your repeated values have been replaced).

    1. Suppose you wanted to select 10 people from the labels 1 to 100 and randInt(1,100,10) gave you 1,1,3,3,3,6,7,12,15,17. Use randInt(1,100) repeatedly to replace the duplicates. Record the numbers that end up in your sample.

    2.  

       
       
       
       
       
       
       
       

      Remember, use randInt(1,100,10) to pick a sample of size 10, and then use randInt(1,100) to replace any duplicates. The second version of the command will give an endless supply of possible substitutes to get rid of duplications in your original sample!
       
       

      Execute the randInt command from part (c) above . It will be much easier to work with sorted lists of labels (or a sorted sample). To sort the list L1 from smallest to largest (ascending order), press

      [2nd][LIST][right-arrow]
      (to select the [OPS] submenu of the [LIST] menu) and then
      [1:SortA(] [2nd][L1] [)][ENTER]
      The last key press before [ENTER] is a closing parenthesis. The list L1 will now contain the numbers of the persons in your sample, sorted from smallest to largest. Take a look at the statistics editor to make sure that the list L1 is sorted.
       
       
    3. If your sample has repeated values, generate new individuals for your sample using randInt(1,100) until you have a sample of size 10. Record your sample below, sorting it from smallest (column 1) to largest (column 10).
    Sample 1
    1 2 3 4 5 6 7 8 9 10
                       
    1. Count the number of individuals in your first sample that prefer diet pop (these correspond to the numbers 1 to 33). Call this count D1 and record the value in the table below, following part (j).

    2.  

       
       
       
       
       
       
       
       
       
       
       

    3. Count the number of individuals who do not drink pop (i.e. the number of individuals with numbers 94 to 100) in your sample. Call this number N1 and record it in the no pop table below.

    4.  

       
       
       
       
       
       
       
       
       
       
       

    5. Now, each group should generate a total of 5 samples (so you need to do 4 more samples) of size 10 and count the number of individuals in the samples that prefer diet pop and the number that do not drink pop. Be sure to remove any duplicate entries in your samples, using the randInt(1,100) command. Record the number of individuals from each sample that prefer diet pop and the number that do not drink pop in the tables below, and add your data to the class data set on the board.
    Diet Pop Counts
    D1 D2 D3 D4 D5
             

     
    No Pop Counts
    N1 N2 N3 N4 N5
             
    1. Record the counts for the class data set below (how many samples had D = 1, 2, 3 etc. individuals that preferred diet pop).
Diet Pop Counts for the class
D =  0  10
Class Totals                      
    1. Comment on the variation in the class sample counts and how well the random samples did in reproducing the population characteristics of 33% preferring diet pop. Maybe look at a histogram of the data in the table above. You should note the a sample of size 10 is not really large enough to give a good representation of this population. To make a histogram of the data above, enter the D values (0,1,2,3, ... the top row) in L1 and the counts (frequencies) from the second row in L2. Set up stat plot 1 for a histogram with XList = L1 and Freq = L2.

    2.  

       
       
       
       
       
       
       
       
       
       
       
       
       
       
       
       

    3. Record the counts for the class data set below (how many samples had N = 1, 2, 3 etc. individuals that do not drink pop).

    4.  
      No Pop counts for the class
      N = 0 1 2 3
      Class Total
             
    1. How well did the random samples do in reproducing the population characteristics of 7% that do not drink pop?

    2.  

       
       
       
       
       
       
       
       
       
       
       
       
       
       
       
       

  1. (This is exercise 3.7) A firm wants to understand the attitudes of its minority managers toward its system for assessing management performance. Below is a list of all the firm's managers who are members of minority groups. Use the randInt command (specify the values you use in the command) to select a sample of size 6 from this population. List the 6 members selected below, along with the output of the randInt command.

  2.  
       
      Agarwal Dewald Huang Puri
      Anderson Fenandez Kim Richards
      Baxter Fleming Liao Rodriguez
      Bowman Gates Mourning Santiago
      Brown Goel Naber Shen
      Castillo Gomez Peters Vega
      Cross Henandez Pliego Wang

     
     
     
     
     
     
     
     
     
     
     
     
     
     
  3. Suppose now that you need to split the group of minority managers above into three groups (say group 1 with 9 people, group 2 with 9 people and group 3 with the remaining 10 persons). Use your randInt command to select the persons in group 1 (remove any duplications). Use randInt again to select the people for group 2, this time however, anyone from group 1 that gets selected for group 2, must be replaced (along with all the repeated selections). Once you finally get 9 distinct individuals for group 2 (that are not also in group 1) let group 3 consist of the leftover 10 persons. List the commands you use, their outputs, and the replacement values, showing your three groups.

  4.  

     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     

    When you use randInt to help answer a question (especially on exams or quizzes), be sure to clearly explain the setup of the problem (which labels go with which individuals etc.), and give both the input values to the randInt command as well as the values that randInt produces as output. It is probably best on exams and quizzes to seed your calculator and record the seed value with your solution.