Jump to content
The Dark Mod Forums

For Nerds Only - How To Calculate Odds


Komag

Recommended Posts

Okay, I read an article last month that really opened up my eyes to being able to calculate more advanced odds. I can't do anything really complicated, but one new technique I've been using now and then (in my more nerdy moments) and I thought I'd go ahead and share it.

 

First of all, what are the odds of getting a 6 on one roll of a 6-sided die?

 

1 in 6, or 1/6, or about 17%, whichever way you want to look at it

 

What about getting two 6's in a row? (or rolling two dice together and getting two 6's)

 

1 in 36, of course. You all probably know that you simply multiply the fractions straight across: 1 x 1 is 1, 6 x 6 is 36, so it's 1/36.

 

What about getting six 6's in a row? (or rolling six dice together and getting six 6's)

 

1 in 46656!

 

Okay okay, but what about the odds of rolling at least ONE 6 within six rolls???

This is the problem that I could never solve. You might be tempted to ADD the odds, 1/6 plus 1/6... to get 6/6, but that's not true, you're not 100% guaranteed to get a 6.

 

The same is true with flipping a coin. The odds of getting heads on one flip is 50/50, or 1 in 2, but the odds of getting at least one head on two flips is not 100% - it could be tails and tails again.

 

In order to figure these type of odds you have to figure the odds of NOT getting what you want, then just do the inverse.

 

The odds of NEVER rolling a 6 within six rolls is 5/6 x 5/6 x 5/6 x 5/6 x 5/6 x 5/6 = 15625/46656, which boils down to almost exactly 1/3. So your chances of NEVER rolling a 6 within six rolls are 1 in 3, or 33%. That means that your odds of GETTING at least one six are 2 in 3, or 66%

 

If you doubt it, try it empirically. Grab six dice and roll them, recording whether you see at least one six or not. Do it about 30 times for a good sample, and you should notice that you saw a 6 roughly 20 times and saw no 6 about 10 times.

 

With a coin, the odds of getting at least one heads within two flips will be the inverse of the odds of NEVER getting a heads (which happens to simply be the odds of getting two tails). The odds of getting two tails are 1/2 x 1/2 = 1/4. So the odds of getting at least one heads is 3 in 4, or a 75% chance. You can test that one two - flip two coins, recording when you see at least one heads. After 40 flips, you should have around 30 with at least one heads, and just 10 with no heads.

 

This trick of finding the odds of getting the inverse of what you want comes in handy in card games and other things.

 

I recently figured out the odds of at least two people sharing the same birthday within a group of 10 people. You might be tempted to simply divide the days in the year, saying the odds would be 1 in 36 that someone has the same birthday as another, but after doing the real calculations it turns out the odds are just 1 in 9 (IIRC), not so extremely unlikely after all.

 

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

 

PS - I have this deja vu feeling that I wrote something about this before, but I couldn't find it, so if I did, sorry!

shadowdark50.gif keep50.gif
Link to comment
Share on other sites

To be accurate, you are calculating probability not odds. The probability of rolling a 6 is 1/6, while the odds are 5:1 against.

 

Now here's a puzzle for the probability nerds. Your neighbour has two children, one of which is a girl. What is the probability that the other one is a girl?

Link to comment
Share on other sites

A gameshow host places a prize behind one of three closed doors. The host knows which one, you do not.

 

You pick a door at random, but do not yet open it. The host opens one of the two other doors that the prize is not behind. The host then gives you an option to switch your original choice to the other remaining closed door.

 

If you were to switch your choice to the other door and open it, does the probability of finding the prize:

A ) remain the same

B ) get better (larger)

C ) get worse (smaller)

(compared to sticking with your original choice)

Link to comment
Share on other sites

Yeah, that's a classical one. It's one of those examples with a seemingly illogical solution, which can occur (more than once) in probability theory.

 

Kramers-Kronig? I think I got in touch with those relations in my quantum mechanics exercises, but I never got to use them again, so I forgot the whole thing. Not that I'm terribly sorry about that... :)

Link to comment
Share on other sites

Now here's a puzzle for the probability nerds. Your neighbour has two children, one of which is a girl. What is the probability that the other one is a girl?

Spoiler:

The events are independent, so the answer is whatever the probability of a person being a girl is. (Close to 1/2.)

 

 

A gameshow host places a prize behind one of three closed doors. The host knows which one, you do not.

 

You pick a door at random, but do not yet open it. The host opens one of the two other doors that the prize is not behind. The host then gives you an option to switch your original choice to the other remaining closed door.

 

If you were to switch your choice to the other door and open it, does the probability of finding the prize:

A ) remain the same

B ) get better (larger)

C ) get worse (smaller)

(compared to sticking with your original choice)

Spoiler:

It depends. This problem is not well defined, since we don't know how the host makes his choice in the event that your initial guess is correct (in which he has a choice between two doors). If he always chooses with uniform probability, then the answer is B (you should switch). If he always chooses a particular door when possible, then the answer is A (the probability remains the same because his choice cannot give you significant additional information).

 

Note that I am assuming that the prize is distributed with uniform probability.

 

 

My memory of the latter problem is somewhat sketchy but I think I got it mostly right. :)

My games | Public Service Announcement: TDM is not set in the Thief universe. The city in which it takes place is not the City from Thief. The player character is not called Garrett. Any person who contradicts these facts will be subjected to disapproving stares.
Link to comment
Share on other sites

Spoiler:

The events are independent, so the answer is whatever the probability of a person being a girl is. (Close to 1/2.)

 

Nope. ;)

 

Hint:

The phrasing of the problem is important. I said "one of which is a girl", not "the first one is a girl". (It is however a subtle problem and it is possible I have cocked up the presentation, although I think it is right as written).

 

 

Spoiler:

It depends. This problem is not well defined, since we don't know how the host makes his choice in the event that your initial guess is correct (in which he has a choice between two doors). If he always chooses with uniform probability, then the answer is B (you should switch). If he always chooses a particular door when possible, then the answer is A (the probability remains the same because his choice cannot give you significant additional information).Note that I am assuming that the prize is distributed with uniform probability.

 

That is an interesting point, however I can't immediately agree with it.

 

Spoiler:

 

The information is not dependent on which door the host chooses, it is a simple case of the probability of YOUR choice (1/3) versus NOT_YOUR_CHOICE (2/3)

 

Link to comment
Share on other sites

Now here's a puzzle for the probability nerds. Your neighbour has two children, one of which is a girl. What is the probability that the other one is a girl?

The probability that somebody is the father of two girls (or two boys) is 1/4. This is analogous to the probability of rolling two sixes in a row. This would be my tip without googling the problem ;).

 

It would be something different to ask, what the probability would be for a father of one girl to get another (yet unborn) girl. This would be 1/2, as the birth events are independent, as Crispy already stated.

Link to comment
Share on other sites

Nope. ;)

 

Hint:

The phrasing of the problem is important. I said "one of which is a girl", not "the first one is a girl". (It is however a subtle problem and it is possible I have cocked up the presentation, although I think it is right as written).

 

Drat, you got me. The imprecision of human language strikes again! :rolleyes:

 

Since exactly one (not "at least one") of the children is a girl, the other child must be a boy, and so the probability is of course zero.

 

 

That is an interesting point, however I can't immediately agree with it.

I don't have time right now but I'll write up the proof for you later. We had a long discussion about this with the guy who was lecturing us on probability at uni. :)

My games | Public Service Announcement: TDM is not set in the Thief universe. The city in which it takes place is not the City from Thief. The player character is not called Garrett. Any person who contradicts these facts will be subjected to disapproving stares.
Link to comment
Share on other sites

The probability that somebody is the father of two girls (or two boys) is 1/4. This is analogous to the probability of rolling two sixes in a row. This would be my tip without googling the problem ;).

 

Yeah, kind of. You have to consider the P(two girls | at least one girl) (where P(X|Y) means "the probability of X given Y").

 

It would be something different to ask, what the probability would be for a father of one girl to get another (yet unborn) girl. This would be 1/2, as the birth events are independent, as Crispy already stated.

 

Indeed. It is extremely counterintuitive, because one instinctively thinks of the event "giving birth to a girl" by itself rather than considering the way the sample was selected, which makes a difference.

Link to comment
Share on other sites

Since exactly one (not "at least one") of the children is a girl, the other child must be a boy, and so the probability is of course zero.

 

My mistake. I should have said "at least one of which is a girl".

 

I don't have time right now but I'll write up the proof for you later. We had a long discussion about this with the guy who was lecturing us on probability at uni. :)

 

I look forward to it.

Link to comment
Share on other sites

My mistake. I should have said "at least one of which is a girl".

Ah. In that case,

I think the answer must be 1/3, but I'm too tired to be sure that I'm thinking straight. :)

 

 

Edit: greebo beat me to that one!

My games | Public Service Announcement: TDM is not set in the Thief universe. The city in which it takes place is not the City from Thief. The player character is not called Garrett. Any person who contradicts these facts will be subjected to disapproving stares.
Link to comment
Share on other sites

The "switch doors or keep the same" one is sometimes very tricky to figure out, but one example I heard of helped to make the correct answer much more clear:

 

Bob asks you to pick a card, any card, from a deck of 52, but don't look at it. He says if you end up having drawn the Ace of Spades he'll award you $100. So you pick one and place it face down in front of you. At this moment your chances of having picked the winning card is 1 in 52. You know that the chances of the right card still being in his hand are 51 in 52. Obviously it's 51 times more likely that the Ace of Spades is still in his hand than that it's the one you picked.

 

Now Bob lays out all the other 51 cards on the table, and then he turns over 50 of them to show you that those 50 are NOT the Ace of Spades. Then he gives you the option to either stay with the one card you originally chose, or switch to the other card that he never turned over. If you think they both have an equal chance of being the Ace of Spades then you're not a very nerdy nerd!

shadowdark50.gif keep50.gif
Link to comment
Share on other sites

Spoiler: It depends. This problem is not well defined, since we don't know how the host makes his choice in the event that your initial guess is correct ...

You can assume that he picks randomly among the doors he knows do not contain the prize.

 

Yeah, the thing that made it clear to me was thinking about the same problem but with 100 doors, and the host eliminates 98 doors after you choose, and you have the option to switch to the other remaining door you didn't initially choose.

 

Kramers-Kronig? I think I got in touch with those relations in my quantum mechanics exercises, but I never got to use them again, so I forgot the whole thing. Not that I'm terribly sorry about that...

Yeah, before a few days ago I only knew that Kramers-Kronig relations were used practically to relate the real part of the dielectric constant to the imaginary part (or refractive index to absorption). Apparently though, Kramers-Kronig relations are more general things in mathematical physics. If you have a function that is analytic in the upper-half of the complex plane, and goes to zero as |z| -> infinity, you can relate the imaginary part of the function to the real part of the function, and vice-versa using a Hilbert transform.

 

The general Hilbert transform goes from -infinity to + infinity, but in the case of the dielectric constant, you can write it as a response to some impulse, require it to be causal, and show that Epsilon(-frequency) = Epsilon*(+frequency). You can apply that to get rid of the non-physical negative frequencies and just integrate from 0 to + infinity.

 

You still have a principal value integral of something with a singularity though, something which computers do not handle well. That's where the fun comes in. :) Grad school is so bizzare... one day you're deep in mathematical physics, the next day you're filing down some post that doesn't quite fit and trying to smash it into the post holder. The next day you spend calling a bunch of bureaucrats to try to get your goddamn tuition refund because your fellowship screwed up the timing of paying your tuition.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recent Status Updates

    • Petike the Taffer  »  DeTeEff

      I've updated the articles for your FMs and your author category at the wiki. Your newer nickname (DeTeEff) now comes first, and the one in parentheses is your older nickname (Fieldmedic). Just to avoid confusing people who played your FMs years ago and remember your older nickname. I've added a wiki article for your latest FM, Who Watches the Watcher?, as part of my current updating efforts. Unless I overlooked something, you have five different FMs so far.
      · 0 replies
    • Petike the Taffer

      I've finally managed to log in to The Dark Mod Wiki. I'm back in the saddle and before the holidays start in full, I'll be adding a few new FM articles and doing other updates. Written in Stone is already done.
      · 4 replies
    • nbohr1more

      TDM 15th Anniversary Contest is now active! Please declare your participation: https://forums.thedarkmod.com/index.php?/topic/22413-the-dark-mod-15th-anniversary-contest-entry-thread/
       
      · 0 replies
    • JackFarmer

      @TheUnbeholden
      You cannot receive PMs. Could you please be so kind and check your mailbox if it is full (or maybe you switched off the function)?
      · 1 reply
    • OrbWeaver

      I like the new frob highlight but it would nice if it was less "flickery" while moving over objects (especially barred metal doors).
      · 4 replies
×
×
  • Create New...