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?

__________________
Strong, but gentle. Firm, but kind.

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?

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

__________________ When I'm goin' fornicatin', I've got my ceramic Satan
Sittin' on the dashboard of my car
Women know I'm on the level, thanks to the wide-eyed stoneware devil
Sneerin' from the dashboard of my car

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.

If you have already picked one sock out lets say white than there are 11 white socks left and 12 black socks so the odds are higher that you would not pick out the matching color sock.

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.

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.

__________________
"The best argument against democracy is a five-minute conversation with the average voter." -Winston Churchill
"The richest man is not he who has the most, but he who needs the least." -Unknown
"I like you just the way you are." -Fred Rogers
"Another day, another dolour." -Me

Location: Not necessarily Formerly known as Solid Snake

Posts: 18,188

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.

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

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.

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:

Quote:

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

__________________
"Religion is regarded by the common people as true, by the wise as false, and by the rulers as useful."

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?

This is my thought, as well.

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.

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.

__________________
I have nothing to say. My dvds
Xbox Gamertag: tonyc3742

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

(1) With one sock in your hand, there's an 11/23 chance that the second sock will match it. Math says 47.8%, you got 48%. That's well within the margin of error - correct!

(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

__________________ Sweed goes down with an achillies injury. As a Steelers fan, this is great news. - Tarantino, 5-02-10 If Tebow beats the Steelers today, I will post a pic of me Tebow'ing in one of my Pittsburgh jerseys. - Tarantino, 1-08-12 I can picture a post-apocalyptic world where lone survivor Marvin Lewis coaches a bunch of giant cockroaches in orange striped football uniforms. - Decker 1-05-18

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.

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).

__________________
"The best argument against democracy is a five-minute conversation with the average voter." -Winston Churchill
"The richest man is not he who has the most, but he who needs the least." -Unknown
"I like you just the way you are." -Fred Rogers
"Another day, another dolour." -Me

Location: Not necessarily Formerly known as Solid Snake

Posts: 18,188

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.

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.

No way, Abob. Man, I wish I remembered this probabilities stuff better (it was a fascinating and useful math course), because this question is such a beginner one, but 2/3 is definitely wrong as the odds of both socks matching.
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!

__________________
"The best argument against democracy is a five-minute conversation with the average voter." -Winston Churchill
"The richest man is not he who has the most, but he who needs the least." -Unknown
"I like you just the way you are." -Fred Rogers
"Another day, another dolour." -Me