# I think too much: probability puzzle

#

**1**DVD Talk Legend

Thread Starter

**I think too much: probability puzzle**

First, this question that has been around for a while:

Suppose you have a drawer with 12 white socks and 12 black socks in it. If you pull out one sock, what is the probability that the second sock you pull out will match it?

Anyone familiar with this sort of calculation will know that is it slighly less than 50%.

But, what if you put both hands into the drawer, and pull out two socks at the same time?

-----------

That question led me to this puzzle -

Suppose you lay out a grid, any even number of cells. Assign half of them black, and half of them white.

Choose two cells at random. What is the probability that they match?

Now, using the same grid, with no cells assigned colors. Choose two cells at random. Then, randomly assign colors to the cells.

Is the probability different?

Suppose you have a drawer with 12 white socks and 12 black socks in it. If you pull out one sock, what is the probability that the second sock you pull out will match it?

Anyone familiar with this sort of calculation will know that is it slighly less than 50%.

But, what if you put both hands into the drawer, and pull out two socks at the same time?

-----------

That question led me to this puzzle -

Suppose you lay out a grid, any even number of cells. Assign half of them black, and half of them white.

Choose two cells at random. What is the probability that they match?

Now, using the same grid, with no cells assigned colors. Choose two cells at random. Then, randomly assign colors to the cells.

Is the probability different?

#

**2**DVD Talk Limited Edition

**Re: I think too much: probability puzzle**

I think they're the same, but I'm not certain. This isn't like the Monty Hall problem, where it wasn't all random.

#

**3**DVD Talk Legend

**Re: I think too much: probability puzzle**

For me, the probability of doing this is precisely zero. Plus, I will drop at least one of the socks on the floor.

#

**4****Re: I think too much: probability puzzle**

If you haven't picked out any socks than it should be 50/50, but I can't remeber the exact formulas form my staistics class right now.

#

**5**DVD Talk Legend

**Re: I think too much: probability puzzle**

I could have given you definitive answers 25 years ago when I took a fascinating probabilities class (Finite), but I'm afraid I have forgotten much of it. These are pretty easy questions as probabilities problems go.

I think the first answer, the easiest, is quite clearly that you have an 11 in 23 chance to pull out a matching sock. The second part of this question should be simple, but I can't wrap my head around it. Part of me wants to say that you have a 22/23 (if 11/22 occurs with one hand, then double that occurs with two hands) chance to pull out one that will match the first, but I think that's too high.

-----------------

Grid: Let's say you have 64 cells on the grid. You choose 1. It's black. Now you have 31 black cells and 32 white cells remaining. So, as with the question above, I would say you have a 31/63 chance of choosing another black cell.

The second part is actually as simple as it gets, unlesss I'm missing something. If the entire grid is blank and you choose two cells, you are essentially starting with a blank slate for the second part. If one assumes that there is an equal number of black and white cells, you have a 50/50 chance of choosing either.

I think the first answer, the easiest, is quite clearly that you have an 11 in 23 chance to pull out a matching sock. The second part of this question should be simple, but I can't wrap my head around it. Part of me wants to say that you have a 22/23 (if 11/22 occurs with one hand, then double that occurs with two hands) chance to pull out one that will match the first, but I think that's too high.

-----------------

Grid: Let's say you have 64 cells on the grid. You choose 1. It's black. Now you have 31 black cells and 32 white cells remaining. So, as with the question above, I would say you have a 31/63 chance of choosing another black cell.

The second part is actually as simple as it gets, unlesss I'm missing something. If the entire grid is blank and you choose two cells, you are essentially starting with a blank slate for the second part. If one assumes that there is an equal number of black and white cells, you have a 50/50 chance of choosing either.

#

**6****Re: I think too much: probability puzzle**

I have a 100% chance of zoning out and abandoning this thread.

#

**7**DVD Talk Legend

Join Date: Aug 1999

Location: Not necessarily Formerly known as Solid Snake

Posts: 22,786

Received 223 Likes
on
177 Posts

**Re: I think too much: probability puzzle**

I’m not sure which questions we are answering ...

The two hands thing shouldn’t change the probability, as each hand can only pull out one sock and both hands cannot pull out the same sock. It doesn’t matter if they are silmultaneous or sequential occurrences.

Now, somebody here will tell us that a computer ran the simulations and in Tuesdays those odds change.

Is the cat in the drawer alive or dead?

The two hands thing shouldn’t change the probability, as each hand can only pull out one sock and both hands cannot pull out the same sock. It doesn’t matter if they are silmultaneous or sequential occurrences.

Now, somebody here will tell us that a computer ran the simulations and in Tuesdays those odds change.

Is the cat in the drawer alive or dead?

*Last edited by Abob Teff; 03-04-18 at 04:58 PM.*

#

**10**DVD Talk Hero

**Re: I think too much: probability puzzle**

So it looks like the odds are about the same whether they're pulled at the same time or at random, unless I screwed up the program, which is possible since my BASIC is really rusty. (And I used the cbmHandBASIC app on my iPad to write it, and typing and editing code on a touchscreen and virtual keyboard is a chore.)

Here's the program:

100 DIM S$(24)

110 FOR J=1 TO 12

120 S$(J) = "black"

130 S$(J+12) = "white"

140 NEXT J

150 M=0:NM=0

160 FOR C=1 TO 10000

170 X=INT(RND(1)*24)+1

180 Y=INT(RND(1)*24)+1

190 IF X=Y THEN GOTO 170

200 IF S$(X) = S$(Y) THEN M=M+1

210 IF S$(X) <> S$(Y) THEN NM=NM+1

220 NEXT C

230 PRINT:PRINT

240 PRINT "matching pairs =";M

250 PRINT "unmatched pairs =";NM

260 END

110 FOR J=1 TO 12

120 S$(J) = "black"

130 S$(J+12) = "white"

140 NEXT J

150 M=0:NM=0

160 FOR C=1 TO 10000

170 X=INT(RND(1)*24)+1

180 Y=INT(RND(1)*24)+1

190 IF X=Y THEN GOTO 170

200 IF S$(X) = S$(Y) THEN M=M+1

210 IF S$(X) <> S$(Y) THEN NM=NM+1

220 NEXT C

230 PRINT:PRINT

240 PRINT "matching pairs =";M

250 PRINT "unmatched pairs =";NM

260 END

#

**11**DVD Talk Hall of Fame

**Re: I think too much: probability puzzle**

**The two hands thing shouldn’t change the probability, as each hand can only pull out one sock and both hands cannot pull out the same sock. It doesn’t matter if they are silmultaneous or sequential occurrences.**

Now, somebody here will tell us that a computer ran the simulations and in Tuesdays those odds change.

Is the cat in the drawer alive or dead?

Likewise with the grid. The problem is still whether or not two random choices out of the 64 match, and you can't choose the same square, just like you can't choose the same sock.

#

**13**DVD Talk Hall of Fame

**Re: I think too much: probability puzzle**

The real question is, who puts their socks back in the drawer singly?

Why don't you match the socks before you put them back in the drawer after doing laundry?

I reach in, there's a 100% (or 99.9% owing to chaos theory) that I get a matching pair.

Why don't you match the socks before you put them back in the drawer after doing laundry?

I reach in, there's a 100% (or 99.9% owing to chaos theory) that I get a matching pair.

#

**17**DVD Talk Hall of Fame

#

**18**DVD Talk Hall of Fame

#

**20**DVD Talk Legend

**Re: I think too much: probability puzzle**

I wrote a program in BASIC to simulate this experiment, and got fairly consistent results. You get a matched pair about 48% of the time. In the twenty or so times I ran this program, I did not once get more matched pairs than unmatched pairs.

Here's the program:

100 DIM S$(24)

110 FOR J=1 TO 12

120 S$(J) = "black"

130 S$(J+12) = "white"

140 NEXT J

150 M=0:NM=0

160 FOR C=1 TO 10000

170 X=INT(RND(1)*24)+1

180 Y=INT(RND(1)*24)+1

190 IF X=Y THEN GOTO 170

200 IF S$(X) = S$(Y) THEN M=M+1

210 IF S$(X) <> S$(Y) THEN NM=NM+1

220 NEXT C

230 PRINT:PRINT

240 PRINT "matching pairs =";M

250 PRINT "unmatched pairs =";NM

260 END

Here's the program:

100 DIM S$(24)

110 FOR J=1 TO 12

120 S$(J) = "black"

130 S$(J+12) = "white"

140 NEXT J

150 M=0:NM=0

160 FOR C=1 TO 10000

170 X=INT(RND(1)*24)+1

180 Y=INT(RND(1)*24)+1

190 IF X=Y THEN GOTO 170

200 IF S$(X) = S$(Y) THEN M=M+1

210 IF S$(X) <> S$(Y) THEN NM=NM+1

220 NEXT C

230 PRINT:PRINT

240 PRINT "matching pairs =";M

250 PRINT "unmatched pairs =";NM

260 END

(2) One minor tweak to your program... there's no need to re-draw both X *and* Y if the random number generator happens to draw the same value for both. Just re-draw Y:

190 IF X=Y THEN GOTO 180

#

**21**DVD Talk Legend

**Re: I think too much: probability puzzle**

I misunderstood the OP's intention for the second part of the question. Assuming you have 24 pairs of socks, 12 white and 12 black, and they are randomly ordered in the drawer, I believe there's a 25% chance both hands will come out with the same "colour" sock (either black or white).

#

**22**DVD Talk Legend

Join Date: Aug 1999

Location: Not necessarily Formerly known as Solid Snake

Posts: 22,786

Received 223 Likes
on
177 Posts

**Re: I think too much: probability puzzle**

Actually, it’s a 67% chance. You only have three possible outcomes: white-white, black-white, black-black. Two of those are a match, one is not. The number of socks does not matter as long as there are equal numbers.

You have to watch what is being asked (and that is where I got lost in the OP). Is the question about the chance of pulling a matching pair in the end (67%) or is the question about the chance of the second draw matching the first (50% — you have eliminated the relevance of the first draw since the second draw will either match or not).

Whether the first and second draws occur at the same time or sequentially doesn’t change anything as the number of possible socks for the second draw is the same either way.

I have another point, but I am going to hold on to it for a moment.

You have to watch what is being asked (and that is where I got lost in the OP). Is the question about the chance of pulling a matching pair in the end (67%) or is the question about the chance of the second draw matching the first (50% — you have eliminated the relevance of the first draw since the second draw will either match or not).

Whether the first and second draws occur at the same time or sequentially doesn’t change anything as the number of possible socks for the second draw is the same either way.

I have another point, but I am going to hold on to it for a moment.

#

**24**DVD Talk Legend

**Re: I think too much: probability puzzle**

You have to watch what is being asked (and that is where I got lost in the OP). Is the question about the chance of pulling a matching pair in the end (67%) or is the question about the chance of the second draw matching the first (50% — you have eliminated the relevance of the first draw since the second draw will either match or not).

Whether the first and second draws occur at the same time or sequentially doesn’t change anything as the number of possible socks for the second draw is the same either way.

I have another point, but I am going to hold on to it for a moment.

Independently, with no socks removed, both hands have a 50/50 chance of picking up one or the other, but where I'm losing it is in calculating the second hand. It does make a difference. I'm going to stand by my 25%, but someone with a firmer grasp/clearer memory of probabilities has to chime in. Grrrr!

#

**25****Re: I think too much: probability puzzle**

Does it really matter? You get what you get!