Math 151 , Spring 2005:  Sampling with SPSS, addendum


SPSS sampling quirk. 
It gives you the same samples each time if you start from opening.  It starts from the same fixed  "seed" each time. (D&V p.217 bottom).

The random number seed is automatically reset to 2,000,000 every time you start a new SPSS session. (Like always starting at line 20 of the random number table).  From there, it seems to keep on reading from where it left off, each time you do a new analysis requiring random numbers.  How to get "different" numbers?  (To see sampling variability, for instance.) 

At the beginning of your session:   Do Transform> Random number seed>    Make sure Random Seed is selected, and click OK.   This does the equivalent of closing your eyes and putting your finger on the random number table page, to start with.
(Without your clicking OK, it starts with seed 2,000,000. ) Now you (and others) will get a different sequence of random numbers/samples even though you open SPSS and do exactly the same thing.  You only need to do it once, to start each SPSS session. 


What if you might want to repeat a process exactly,
getting the same " random" sample again?   
Do Transform> Random number seed> Choose Set Seed: You can put in any number from 1 to 2,000,000,000.  (Then, if you want to repeat your session exactly, you could do Transform>Random number seed>Choose Set Seed, put in the same number again, do OK,  and it would then reset to the same starting point.)

How to ensure you're not using a seed you -- or someone else in the class -- has used?  How about this?  The hour, minutes, seconds, month, and day, right now:   hhmmssmmdd, or  h,hmm,ssm,mdd  It fits, and is unlikely to be ever duplicated.  Do OK.  Don't reset again for this session, it'll just keep churning out its random numbers as if reading across sequential lines in the random number table.  If you think you'll want to repeat the process, write down your seed.


Sievers home  Math151-Sp05/SPSSsamplesmore.htm  10pm 3/24/05
This page belongs to Sally Sievers who is solely responsible for its content. Please see our statement of responsibility.