Domain: codepad.org
Stories and comments across the archive that link to codepad.org.
Comments · 7
-
Re:Who supports it
Here's some Python: http://codepad.org/UzSmoxF2
-
Re:buggy struct
Can it be used for BFS traversal, as in http://codepad.org/BQJLkdCv ?
-
Re:Giant crazy displays
I don't have any screenshots available offhand, but I have source. It's in C++, and I'm very definitely not a C++ guy, but it works.
-
Re:The other problem posed in TFA
No, you're wrong. Look at this. If Mr. Smith has two children, at least one of whom is a boy, it is two times as likely for him to have a boy and a girl than it is for him to have a boy.
Your mistake is in believing that, by virtue of naming one of the boys Peter, the probabilities are magically equalized. They're not. The correct probabilties for your table are:
Peter, Boy = 1/6
Boy, Peter = 1/6
Peter, Girl = 1/3
Girl, Peter = 1/3 -
Re:Science and Intuition defeating Fun Math
You are literally thinking like the girl in this joke.
But ok, I guess the only way to settle this is by experiment. Start sending in women, and I'll get back to you in nine months. -
Re:Let's try it without reading TFAThere are no games with words: the problem statement is perfectly clear if you read it carefully.
We are only separating the cases by order of birth to help you understand how the probabilities work out. We could just as well say that there are three cases:- "two boys", with probability 1/4
- "two girls", with probability 1/4
- "a boy and a girl", with probability 1/2
The last case is twice as likely as either of the others because the two births are independent events (by assumption; in real life there is probably a slight correlation, girl births are more likely than boy births, etc., but it doesn't deviate very far from that).
If you're still unconvinced, look at this: http://codepad.org/kMVsqzyT -
Re:Independent Verification
Exactly. It seems biased to me, but any arbitrary stopping place would be biased I suppose.
BTW, I posted an earlier comment where I considered all the prime below 1 million and it looks like this:
Begins with 1: 12.21%
Begins with 2: 11.64%
Begins with 3: 11.41%
Begins with 4: 11.14%
Begins with 5: 10.97%
Begins with 6: 10.77%
Begins with 7: 10.74%
Begins with 8: 10.60%
Begins with 9: 10.48%Here's all primes below 2 million:
Begins with 1: 53.72%
Begins with 2: 6.13%
Begins with 3: 6.1%
Begins with 4: 5.87%
Begins with 5: 5.78%
Begins with 6: 5.67%
Begins with 7: 5.66%
Begins with 8: 5.59%
Begins with 9: 5.52%And here's all primes below 3 million:
Begins with 1: 36.90%
Begins with 2: 35.52%
Begins with 3: 4.13%
Begins with 4: 4.3%
Begins with 5: 3.97%
Begins with 6: 3.90%
Begins with 7: 3.89%
Begins with 8: 3.84%
Begins with 9: 3.79%Perhaps an unbiased "test" would be one where you average the results of several tests, picking a random number each time as the stopping place (either the upper limit or the # of primes, probably doesn't matter).
P.S. Here's my source code (uses openssl library): http://codepad.org/0DfZ8uOG