Gamestudio Links
Zorro Links
Newest Posts
Trading Journey
by howardR. 04/28/24 09:55
Zorro Trader GPT
by TipmyPip. 04/27/24 13:50
Help with plotting multiple ZigZag
by M_D. 04/26/24 20:03
Data from CSV not parsed correctly
by jcl. 04/26/24 11:18
M1 Oversampling
by jcl. 04/26/24 11:12
Why Zorro supports up to 72 cores?
by jcl. 04/26/24 11:09
Eigenwerbung
by jcl. 04/26/24 11:08
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
3 registered members (AndrewAMD, exile, Ayumi), 1,085 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
wandaluciaia, Mega_Rod, EternallyCurious, howardR, 11honza11
19049 Registered Users
Previous Thread
Next Thread
Print Thread
Rating: 4
Page 54 of 142 1 2 52 53 54 55 56 141 142
Re: The Go-Off-Topic Topic [Re: Lukas] #327340
06/05/10 22:49
06/05/10 22:49
Joined: Mar 2006
Posts: 3,538
WA, Australia
J
JibbSmart Offline
Expert
JibbSmart  Offline
Expert
J

Joined: Mar 2006
Posts: 3,538
WA, Australia
Quote:
The propabilities are like this:
B-B: 50%
B-G: 25%
G-B: 25%
G-G: 0%
(which is not easily seen in your way)
The reason it's not "easily seen" in my way is that this is incorrect.

Under normal circumstances, if the woman has two children there are four possible outcomes:
b-b
b-g
g-b
g-g
Each outcome is equally likely, that is 1:4.

Damocles' challenge says that we know one of the children is a boy, so we eliminate the fourth outcome:
b-b
b-g
g-b
Each with a 1:3 likelihood.

Exactly one of those outcomes is that the woman has two boys. Accordingly, the probability of the woman having two boys amongst two children given that she has at least one boy is 1:3.

Jibb

EDIT:
@Quadraxas: Actually, the challenge states that at least one of the woman's children is a boy.

Last edited by JulzMighty; 06/05/10 22:50.

Formerly known as JulzMighty.
I made KarBOOM!
Re: The Go-Off-Topic Topic [Re: JibbSmart] #327342
06/05/10 23:05
06/05/10 23:05
Joined: May 2007
Posts: 2,043
Germany
Lukas Offline

Programmer
Lukas  Offline

Programmer

Joined: May 2007
Posts: 2,043
Germany
If one case is eliminated, you can't assume that the others still all have the same propability.

However, I did a statistical test with this C++ program:
Click to reveal..

Code:
#include <cstdlib>
#include <iostream>

using namespace std;

#define BOY 0
#define GIRL 1

int main(int argc, char *argv[])
{
    int child1, child2;
    int i;
    int hits;
    int tries;
    
    srand ( time(NULL) );
    
    
    cout << "\nMan:";
    hits = 0;
    tries = 0;
    for(i=0;i<1000;i++)
    {
        child1 = BOY;
        child2 = rand() % 2;
         
        if((child1 == BOY) || (child2 == BOY)) tries++;
        if((child1 == BOY) && (child2 == BOY)) hits++;
    }
    cout << "\n" << hits << "/" << tries << " = " << static_cast<double>(hits)/tries;
    
    
    cout << "\nWoman:";
    hits = 0;
    tries = 0;
    for(i=0;i<1000;i++)
    {
        child1 = rand() % 2;
        child2 = rand() % 2;
         
        if((child1 == BOY) || (child2 == BOY)) tries++;
        if((child1 == BOY) && (child2 == BOY)) hits++;
    }
    cout << "\n" << hits << "/" << tries << " = " << static_cast<double>(hits)/tries;
    
    
    cout << "\n";
    
    system("PAUSE > NUL");
    return EXIT_SUCCESS;
}




It shows that you are actually right and I was wrong, but I still don't see why. This seems pretty strange to me, because that "three possibilities" argument is not quite valid in my eyes. Still, the propability seems to be 1:3.

You can try the program I posted while I reread your and Quadraxas' posts and rack my brain about this...

Re: The Go-Off-Topic Topic [Re: JibbSmart] #327343
06/05/10 23:12
06/05/10 23:12
Joined: Sep 2003
Posts: 5,900
Bielefeld, Germany
Pappenheimer Offline
Senior Expert
Pappenheimer  Offline
Senior Expert

Joined: Sep 2003
Posts: 5,900
Bielefeld, Germany
Doesn't it depend on whether the succession is relevant or not?
When you say 'both boys' and 'half boy, half girl', then the probability is equal.

Re: The Go-Off-Topic Topic [Re: Pappenheimer] #327346
06/05/10 23:20
06/05/10 23:20
Joined: May 2007
Posts: 2,043
Germany
Lukas Offline

Programmer
Lukas  Offline

Programmer

Joined: May 2007
Posts: 2,043
Germany
Ok, I think i finally understood it now. I made a diagramm of it:



As I found out when making the C++ program, I found out that I can make a "normal" tree to see the overall propabilities and rule out those that do not meet the requirements. Then I can divide all other propabilities by the remaining propability which results to 33.3%.

But I wonder if this is valid. Because I still think the information that the child that is a boy is the older one shouldn't make any difference. But Damocles teacher said it and he's got authoritah...


EDIT: For some reason you can't see the picture in my post. At least I can't. But this link works: http://www.brogames.de/TwoBoys.jpg

Last edited by Lukas; 06/05/10 23:22.
Re: The Go-Off-Topic Topic [Re: Lukas] #327348
06/05/10 23:32
06/05/10 23:32
Joined: May 2007
Posts: 2,043
Germany
Lukas Offline

Programmer
Lukas  Offline

Programmer

Joined: May 2007
Posts: 2,043
Germany
Ok, I changed the C++ program a little and now it says that I'm right and you are wrong:

Click to reveal..

Code:
#include <cstdlib>
#include <iostream>

using namespace std;

#define BOY 0
#define GIRL 1

int main(int argc, char *argv[])
{
    int child1, child2;
    int i;
    int hits;
    int tries;
    
    srand ( time(NULL) );
    
    
    cout << "\nMan:";
    hits = 0;
    tries = 0;
    for(i=0;i<1000;i++)
    {
        child1 = BOY;
        child2 = rand() % 2;
         
        if((child1 == BOY) || (child2 == BOY)) tries++;
        if((child1 == BOY) && (child2 == BOY)) hits++;
    }
    cout << "\n" << hits << "/" << tries << " = " << static_cast<double>(hits)/tries;
    
    
    cout << "\nWoman:";
    hits = 0;
    tries = 0;
    for(i=0;i<1000;i++)
    {
        if(rand() % 2)
        {
                  child1 = BOY;
                  child2 = rand() % 2;
        }
        else
        {
                  child1 = rand() % 2;
                  child2 = BOY;
        }
        
         
        if((child1 == BOY) || (child2 == BOY)) tries++;
        if((child1 == BOY) && (child2 == BOY)) hits++;
    }
    cout << "\n" << hits << "/" << tries << " = " << static_cast<double>(hits)/tries;
    
    
    cout << "\n";
    
    system("PAUSE > NUL");
    return EXIT_SUCCESS;
}




Now it doesn't try all possibilities and eliminate those that are known to be false in the first place, but first decides which child is the child that is known to be a boy and randomizes the other child. This seems more like it's valid, so I believe again that the propability is 50% for both, the man and the woman.

Re: The Go-Off-Topic Topic [Re: Lukas] #327350
06/05/10 23:38
06/05/10 23:38
Joined: Mar 2006
Posts: 3,538
WA, Australia
J
JibbSmart Offline
Expert
JibbSmart  Offline
Expert
J

Joined: Mar 2006
Posts: 3,538
WA, Australia
That's kinda what I was going for, but my illustration is really vague and inconsistent tongue

Also, the older one being a boy doesn't make a difference in the end. The sequence only matters for the man's situation, which we agreed upon from the get-go, and if it instead said that the younger child had to be male we'd still get the same probability for the man.

@Pappenheimer: "Both boys" has a 1:4 chance since it can only be accomplished in one way, but "Half boy, half girl" has a 1:2 chance because there are two ways to accomplish it: Boy-Girl, and Girl-Boy (try not to look at this as a sequence, but as an indicator of two unique bodies that may be one sex or the other).

Jibb

EDIT: Posted while you posted. Reading your new post now.

Last edited by JulzMighty; 06/05/10 23:38.

Formerly known as JulzMighty.
I made KarBOOM!
Re: The Go-Off-Topic Topic [Re: JibbSmart] #327351
06/05/10 23:42
06/05/10 23:42
Joined: Mar 2006
Posts: 2,252
Hummel Offline
Expert
Hummel  Offline
Expert

Joined: Mar 2006
Posts: 2,252
dont you guys have to develop some stunning games related stuff instead of expanding this thread to infinity? grin

Re: The Go-Off-Topic Topic [Re: Hummel] #327352
06/05/10 23:48
06/05/10 23:48
Joined: Oct 2007
Posts: 5,210
İstanbul, Turkey
Quad Offline
Senior Expert
Quad  Offline
Senior Expert

Joined: Oct 2007
Posts: 5,210
İstanbul, Turkey
yeah i will make a stunning game that will be so bad it will cause brain damage and stun you you to death.


3333333333
Re: The Go-Off-Topic Topic [Re: Quad] #327353
06/06/10 00:08
06/06/10 00:08
Joined: Mar 2006
Posts: 3,538
WA, Australia
J
JibbSmart Offline
Expert
JibbSmart  Offline
Expert
J

Joined: Mar 2006
Posts: 3,538
WA, Australia
Farout, I'm just confusing myself now.

If I was right before, and I consider all three possible outcomes (BB, BG, GB) equally likely like I did right at the beginning, this suggests that there's only a 1:3 chance of any particular child being a girl, which doesn't sit right with me.

Alternatively, if we say that the likelihood of any one child being a boy or girl is equal unless the conditions of the challenge prohibit it, we get this new tree:

Which suggests only a 1:4 chance of getting two boys from the woman. Of course, this doesn't sit right with me either.

So now I try to unthink everything and go back to the beginning, ignoring the man's situation:

The woman has a boy. She has one other child.

What are the chances that she has two boys?

This is the same as,
What are the chances that her other child is a boy?

That is an obvious 1:2 == 50%.

By considering the man's situation I was fooled into considering order for the woman's situation, which is actually irrelevant if I read the question ignoring the man.

So I think you are right laugh

Jibb

EDIT:
@Hummel: Boy do I wish I had the motivation. I just removed Sculptris from my computer since not only was it crashing regularly, but a whole bunch of other problems with my otherwise-flawless computer cropped up around the same time I downloaded it, so I'm feeling particularly loathsome towards it. At the same time, I miss having a sculpting program with a "crease" tool.

Last edited by JulzMighty; 06/06/10 00:10.

Formerly known as JulzMighty.
I made KarBOOM!
Re: The Go-Off-Topic Topic [Re: JibbSmart] #327355
06/06/10 00:43
06/06/10 00:43
Joined: Mar 2006
Posts: 2,252
Hummel Offline
Expert
Hummel  Offline
Expert

Joined: Mar 2006
Posts: 2,252
There are no probs which seem to be related with Scultris here, well in fact I have absolute no probs anyway wink
Btw, what is the crease tool good for? As I remember right the guy in this video used it for sculpting lips, right?

Page 54 of 142 1 2 52 53 54 55 56 141 142

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1