Introductory lecture: some puzzles

Alright, let’s begin!

The main structure of this class will be working through the text. However, I want to start off with some problems/puzzles/thoughts to get you thinking. I suggest that you spend some time thinking about these: it will be fun, and will help you make the material your own. I am not expecting that you will be able to find complete answers at this time, though.

I’m not asking you to hand in your work on these problems. However, if you have work on them you would like to show me, please do so! You can upload anything you want to show me to the Google Drive folder, and we can talk about it on Slack.

I encourage you to chat with other people in the class about these problems, either in person (if possible), or on Slack. However, please DO NOT look these problems up on the internet or in books. That takes the fun out of it! It’s not the point right now; I want to get you thinking on your own. And if you already know the answers, please don’t spoil the fun for others.

A lottery

Puzzle 1: Suppose that we play a lottery repeatedly. Each time we play, there is a one in one million chance we win. Suppose that we play one million times. What is the chance we win at least once?

I’m assuming here that the chance doesn’t change from one play to the next. So for example, this is not like a raffle, where there is a limited number of tickets. Every time we play, it starts fresh, and it is the same 1/1,000,000 chance to win.

Coin tosses

Puzzle 2: Suppose that I flip two coins. I show you one, and it is heads. What is the probability that the other coin is heads?

Don’t be too hasty answering here!!

Sometimes this puzzle is asked in a different form:

Puzzle 2′: Suppose that you are doing a census (going to people’s houses asking information on the people who live there). The adult who answers the door says they have two children, and one is a boy. What is the probability that the other is a boy?

Again, don’t be too hasty!

(In Puzzle 2′, we are making the (unrealistic) assumption that boys and girls are equally likely, that children are unambiguously either boys or girls, and that the assumptions of their gender don’t change. Old-fashioned assumptions! For that reason I like the coin version better, but both are worth thinking about.)

Runs

Puzzle 3: Suppose that we flip a coin 10 times, and it comes up heads every time. What is the probability that it will come up heads on the 11th time?

Note that this puzzle is very dependent on underlying assumptions, and on the exact wording. (Neither of which I have been careful about in stating the puzzle!) If you believe you have an answer, try to state the assumptions and the puzzle more carefully so that your answer is definitely true. Also, change the assumptions or the wording just a bit so that a different answer is true.

This is related to another question about runs:

Puzzle 3′: We flip a coin 10 times. Which outcome is more likely,

HHHHHHHHHH, or

HHTTTHHTHT ?

(If one is more likely, how much more likely? How about other possibilities, like HTHTHTHTHT ?)

Monty Hall

Here is a famous problem you may have seen before. If you have, please don’t give it away to those who haven’t!

Monty Hall was the host of a television game show called Let’s Make a Deal, which ran in the US and Canada through the 1960’s and 1970’s. The “Monty Hall problem” is a probability question about one of the main games in the show:

Puzzle 4: Monty Hall shows you three closed doors. He says that behind one, and only one of the doors, there is a fabulous prize; behind the other two doors are worthless joke prizes. You pick one of the three doors.

Before Monty shows you what is behind your door, he opens one of the doors you did not choose, and shows you that behind it there is a goat (one of the joke prizes).

Now he asks you, do you want to stick with the door you chose, or do you want to switch to the other remaining unopened door?

Should you switch?

What is random anyway?

What do we mean by “random”?

We might say that a coin flip is random. It comes up heads half the time, and tails half the time, unpredictably. But what does that mean exactly?

I don’t have a puzzle here, but I have some things to think and talk about.

Thing one

If we knew the initial position and velocity of the coin, and the effect of air resistance, and when and how it was caught, presumably we could predict which way it turns up. In what way is this random?

(When we were kids, my sister could not flip a coin, so she would hold the coin, show it to you, and then flip it over onto her arm. She could not be convinced that this was not sufficiently random.)

Thing two

A real, physical coin is not going to necessarily come up heads and tails exactly 1/2 the time each. It may be unevenly weighted or shaped, even just slightly. So what does it mean to say a coin flips with 1/2 probability of H or T each?

Also, even if a real coin did flip H or T with probability exactly 1/2 each, how would we ever know? We could only ever do finite sequences of flips. In a finite sequence, the number of H and T is not going to be exactly 1/2, even if the coin is exactly fair.

Thing three

In fact, if the proportion of heads was always exactly 1/2, that would be very suspicious! If we flipped a coin 100 times, and every time it came up 50 heads and 50 tails, that would be weird. We would expect it to vary from 50. Yet, we would expect it to average about 50; and we would expect that it wouldn’t be “too far” from 50, at least not “too often”.

What are “too far” or “too often”? How would we tell?

Thing four

Also, a randomly flipped coin will have longer strings of either H or T than most people expect.

One exercise I have done when I have taught statistics in the past is to give students the assignment of flipping a coin 100 times, and writing down the results (a string of 100 H’s and T’s). But there is a catch: I tell students they can choose to do the assignment honestly, or they can cheat, and just write down a random string of 100 H’s and T’s.

After they hand in the assignment, the next day I hand it back, and tell them who was honest and who cheated. This is possible because people have a very bad natural intuition of what “random” is.

Here’s another example: which of these two images are randomly generated?

From Steven Pinker, The Better Angels of our Nature

Since you know I am trying to trick you, you probably guessed it: the pattern on the left was truly generated randomly. The pattern on the right deviates from randomness, because the dots are “avoiding” each other: each new dot is less likely to land in a spot near another dot; the probability is not uniform. Our human intuition thinks of the picture on the right as “random”, but it isn’t.

Actually, the dots on the right really are avoiding each other: the image on the right is a map of the locations of glowworms on the ceiling of the Waitomo cave in New Zealand.

Here‘s a computer simulation, with which you can generate more examples of truly random dots versus “random-looking” dots.

Please read this great article for more examples of this type: What Does Randomness Look Like, by Aatish Bhatia, Wired Magazine, December 2012.

Thing five

There is a trickier philosophical problem here as well. What does “random” mean exactly? If I showed you the digits

8327950288419716939937510582097494459230781640628620899862…

you might initially conclude that these are random. Using the method I used to generate these, I could provide a longer sequence to a computer, and it would pass any test I know of for randomness. But if you find out that these are the decimal digits of $\pi$, starting at the 26th digit, then they are not random at all—they are totally deterministic!

So, how could you generate “truly” random digits? It can’t be done with a deterministic computer! And how would you test if a given random number generator, or physical process, was “truly” random?

This philosophical question has very practical consequences. For example, most computer security algorithms use random numbers in an essential way. But computer-generated “random” numbers are never “truly” random. Many hacks of security have been devised to try to exploit hidden regularities in these “random” choices.

You can also use the human difficulty at making random choices against them in games. For example, “rock, paper, scissors” has no winning strategy. If you choose completely randomly, it is impossible for me to choose a strategy where I will win in the long term. The best I can do is tie with you, on average.

However, most people CANNOT choose truly randomly! Therefore, a clever player—or a clever computer—can exploit hidden regularities in human choice, and they can win more than 50% of the time on average.

Try playing against the computer at this link, from the New York Times archive. (You may have to download Adobe Flash, and allow it to run on for that site.) Play it on “Veteran” mode: I think you’ll be surprised how often it is able to win! (If you have trouble running it, there are other programs that play rock paper scissors readily available; I picked this one because it beat me the worst. The other ones I found were not as impressive.)

Conclusion

These puzzles don’t touch on everything that we will be learning about in this class. But thinking about them is a good place to start!

Next time, we will start on reading the text, Chapter I, and laying some of the foundations.

Leave a Reply

Your email address will not be published.

css.php