Random FakeOut

Computer Lab




1)    This lab will involve some waiting, since there are times when you need me to come look at your screen and make a guess. During that wait time, you should read over the handout on using the Julia set applet. You can alternate between the Randomania program and Internet Explorer by hitting Alt-Tab.


2)    Choose "Fool the Teacher" from the main menu. You will come to a screen where you are supposed to type in random digits. Type in the sequence that you created for homework last night. (You can have your partner read it to you as you type, if that helps.) Hit Enter when you are finished typing your sample. The computer will now use its random number generator to create its own sequence of 100 digits. They will both be displayed on the screen in random colors, in a random position.

Call me over. My job is to figure out which sample the computer made and which one you made. If I can do better than 50% on guessing this, then something very strange is going on. How could I possibly tell which one is yours?


3)    After you test out your homework sequence, enter a new sequence just by banging on the keys. This has to be random, right? Call me over and see if I can pick yours out.


4)    You may be surprised to find out what can pop up in a random sequence. It will probably help for you to look at a bunch of them that are computer-produced. Go back to the main menu and choose "View Samples." Choose Random Samples and then just look at several of them. Pick some type of thing to look for, like how often you get a consecutive pair (e.g. 5-6), some sort of characteristic like that. This might give you ideas about what to include in your fake sequences.


5)    Try Fool the Teacher again, incorporating what you noticed in #4. Try to develop your own guessing skills, too, by having your partner create a sequence to try to fool you. If you become a good guesser, you can go around to other groups and see if you can guess theirs correctly. I may need a few deputies to help me with the guessing.


6)    The program is set up to do some testing on large groups of samples. From the main menu, choose "Run Trials." Then pick "Random Samples." Get ready to record your data, because we are going to aggregate the results for the whole class. If there is another computer free, take it and get an experiment running there also, so we can have more data. Choose "Look for Pairs." It will ask you for the length of sequence to create. Say "100." It will then ask you for the number of trials. Say "10000."

For each trial, the computer will make a random sequence of 100 digits. It will then check through the sequence to see how many times the sequence has a same-digit pair, like two fours right next to each other. If the sequence has nine such pairs, then that result will be recorded in the "9" column on the histogram that you see being created on the screen.

This is just like the graph we made in class yesterday for height and birth month. Remember when I called out "July" and then I made an x mark for each July birthday? The more x marks, the taller the stack. That is what the computer is doing as it runs through random samples. Instead of x marks, though, it draws a little horizontal line. The taller the stack for a particular number, the more often that result occurs.

If you're having trouble understanding what the histogram is showing you, please ask for help immediately.


7)    When the experiment is done, hit Enter once to see a list of how often each event occurred. Copy down the numbers of the frequency distribution. You will need this for class later on. The frequency distribution tells you how often something happens. For example, out of your 10000 trials, how many of the sequences had just 5 pairs? Is that an event that occurs relatively often?


8)    So how many pairs should you expect to find in the typical hundred-digit random sequence? Is this result surprising to you? How can you make use of it to design better fakes? (By the way, if you get three digits in a row (5 5 5) that will count as 2 pairs. We just look at two adjacent numbers, and then move over one space and look at the next two numbers.


9)    While you can see that most samples have between 8 and 12 pairs, it is also possible to see some pretty weird events. For example, you might have had a few occurrences that were greater than twenty. That's a lot of pairs in one sample! If you used something like that in Fool the Teacher, I would probably guess it was a fake. And yet the computer does sometimes come up with such a result.

This brings up an important idea in thinking about probability: unlikely events do occur, if you're willing to wait long enough. On the other hand, at any single point in time, we don't really expect to see such an event. So, when you type in a fake random sequence with no pairs at all, I say to myself "that's not likely." If I follow that strategy, I do pretty well picking out the fakes. But sometimes, I will probably be fooled. Every once in a while the computer may produce something like that.

In fact, if you ran your 10,000 trials and you always got between 8 and 12 pairs, then I would think something was wrong with the computer! Am I confusing you yet? It's really very strange.


10)    From the main menu, choose "View Samples." Then pick "Non-Random Samples." These actually have some method to their madness. This is not to say that there is a single formula which predicts all of the numbers in the sequence. Instead, I have included some sort of diabolical device that will cause bias in the results, i.e., at any given stage in the sequence, it is NOT true that each number has an equal likelihood of being picked.

There are four different methods being used to make the samples. Each time you get a sample, the method could be any one of the four. See if you can figure out how each method works.


11)    I imagine you have already done this simply out of curiosity, but try looking at "Names" under View Samples.


QR Home Page Glossary Previous Worksheet Next Worksheet