+ Reply to Thread
Results 1 to 12 of 12

Thread: Brain Teaser

  1. #1
    Points: 1,470, Level: 21
    Level completed: 70%, Points required for next Level: 30

    Posts
    50
    Thanks
    0
    Thanked 5 Times in 4 Posts

    Brain Teaser




    It's here:http://www.braingle.com/palm/teaser.php?id=29228&comm=1

    I thought that surely the answer must be 0.5 until I considered writing a
    test program. Then just rephrasing the teaser made it clear to me that
    the answer is 1/3. The program divides a large number of random bits
    into separate pairs. It only considers pairs having at least one "head".
    of these pairs, what proportion are both heads? Bingo!

    I wrote the program anyway and it finds proportions very nearly 1/3.

    The moral of the story to me is, "be careful!" Thus stuff can get tricky

    ArtK

  2. #2
    TS Contributor
    Points: 12,227, Level: 72
    Level completed: 45%, Points required for next Level: 223
    rogojel's Avatar
    Location
    I work in Europe, live in Hungary
    Posts
    1,470
    Thanks
    160
    Thanked 332 Times in 312 Posts

    Re: Brain Teaser

    Now you're ready for the Monty Hall problem

  3. #3
    Points: 1,470, Level: 21
    Level completed: 70%, Points required for next Level: 30

    Posts
    50
    Thanks
    0
    Thanked 5 Times in 4 Posts

    Re: Brain Teaser

    Wow, rogojel. That one is really counter-intuitive. I'm a bit regretful that I didn't spend time tangling
    with it. Instead, I read how many others managed to think through the problem in their own ways.
    The opposition from the academic community to those who stated the correct answer was astounding.
    It may have been a real pleasure to think it through, assuming that I'd eventually arrive at clarity.

    Thanks for pointing it out to me!

    ArtK

  4. #4
    Super Moderator
    Points: 13,151, Level: 74
    Level completed: 76%, Points required for next Level: 99
    Dragan's Avatar
    Location
    Illinois, US
    Posts
    2,014
    Thanks
    0
    Thanked 223 Times in 192 Posts

    Re: Brain Teaser

    Mathematically, you can think of this problem as follows:

    Let Z=min[X,Y], where X and Y are iid and uniform on the interval [0,1].

    What is the expected value of Z?

    The answer is: E[Z]=1/3.

  5. #5
    Devorador de queso
    Points: 95,866, Level: 100
    Level completed: 0%, Points required for next Level: 0
    Awards:
    Posting AwardCommunity AwardDiscussion EnderFrequent Poster
    Dason's Avatar
    Location
    Tampa, FL
    Posts
    12,936
    Thanks
    307
    Thanked 2,630 Times in 2,246 Posts

    Re: Brain Teaser

    Quote Originally Posted by Dragan View Post
    Mathematically, you can think of this problem as follows:

    Let Z=min[X,Y], where X and Y are uniformly distributed on the interval [0,1].

    What is the expected value of Z?

    The answer is: E[Z]=1/3.
    Would you mind explaining the connection here.
    I don't have emotions and sometimes that makes me very sad.

  6. #6
    Super Moderator
    Points: 13,151, Level: 74
    Level completed: 76%, Points required for next Level: 99
    Dragan's Avatar
    Location
    Illinois, US
    Posts
    2,014
    Thanks
    0
    Thanked 223 Times in 192 Posts

    Re: Brain Teaser

    Quote Originally Posted by Dason View Post
    Would you mind explaining the connection here.
    Well, if we were to go in the other direction (the second one is a tail instead of a head), then the expected value of Z would be E[Z]=2/3. So the distribution could be thought of as Z=max(X,Y) in this case.

    Remember, we know that it is given that at least one flip of the coin results in a head.

    Edit: I just created a Min/Max way to create a single variable to solve this expectation problem....I'm sure there are other ways to do this.
    Last edited by Dragan; 09-06-2014 at 08:18 PM.

  7. #7
    Devorador de queso
    Points: 95,866, Level: 100
    Level completed: 0%, Points required for next Level: 0
    Awards:
    Posting AwardCommunity AwardDiscussion EnderFrequent Poster
    Dason's Avatar
    Location
    Tampa, FL
    Posts
    12,936
    Thanks
    307
    Thanked 2,630 Times in 2,246 Posts

    Re: Brain Teaser

    I just don't really see the connection with the uniform distribution directly. Just because you get the same answer doesn't mean the connection is apparent.
    I don't have emotions and sometimes that makes me very sad.

  8. #8
    Super Moderator
    Points: 13,151, Level: 74
    Level completed: 76%, Points required for next Level: 99
    Dragan's Avatar
    Location
    Illinois, US
    Posts
    2,014
    Thanks
    0
    Thanked 223 Times in 192 Posts

    Re: Brain Teaser

    Quote Originally Posted by Dason View Post
    I just don't really see the connection with the uniform distribution directly. Just because you get the same answer doesn't mean the connection is apparent.
    Well, that's not my problem. You should be able to understand this by now, Dason. Think about it some more....because I don't have anymore of my time to waste on this, mkay.

  9. #9
    TS Contributor
    Points: 12,227, Level: 72
    Level completed: 45%, Points required for next Level: 223
    rogojel's Avatar
    Location
    I work in Europe, live in Hungary
    Posts
    1,470
    Thanks
    160
    Thanked 332 Times in 312 Posts

    Re: Brain Teaser

    hi Dragan,
    how is the uniform distribution turning up here? The problem seems discrete to me.

    regards
    rogojel

  10. #10
    Super Moderator
    Points: 13,151, Level: 74
    Level completed: 76%, Points required for next Level: 99
    Dragan's Avatar
    Location
    Illinois, US
    Posts
    2,014
    Thanks
    0
    Thanked 223 Times in 192 Posts

    Re: Brain Teaser

    Quote Originally Posted by rogojel View Post
    hi Dragan,
    how is the uniform distribution turning up here? The problem seems discrete to me.

    regards
    rogojel
    Well, yes, it is discrete. I'm just creating a scenario by artificially using the continuous zero-one Uniform distribution to make it work out.

    So, for example, if we draw a random number from the zero-one uniform distribution e.g., .70, then that becomes the range for "heads" otherwise it's a tail (discrete as you say). Remember, were are given the fact that at least one of two flips of the coin is indeed a head.

    Now, draw another random number and if it's in the range between 0 and 0.7 (say 0.4) it's a head otherwise it's a tail. Write that number down (0.4). Repeat the (random) experiment "infinitely" many times and compute the average (expectation) on the values of the second draws and it will be 1/3, which is correct.

    I hope this helps.

  11. The Following User Says Thank You to Dragan For This Useful Post:

    rogojel (09-08-2014)

  12. #11
    Points: 1,470, Level: 21
    Level completed: 70%, Points required for next Level: 30

    Posts
    50
    Thanks
    0
    Thanked 5 Times in 4 Posts

    Re: Brain Teaser

    Rogojel, I did take the time to study the Monty Hall problem, and it turned out to be remarkably simple. The
    key is to notice that only when you initially pick the door that hides the car does switching fail. Initially
    picking either of the other doors and then switching wins the car in both cases. So switching leads to
    success twice as many times as not switching, which leads to the 1/3 (stay) and 2/3 (switch) probabilities\
    of success.

    Again, careful consideration of the possibilities solves the brain teaser.

    ArtK

  13. #12
    Super Moderator
    Points: 13,151, Level: 74
    Level completed: 76%, Points required for next Level: 99
    Dragan's Avatar
    Location
    Illinois, US
    Posts
    2,014
    Thanks
    0
    Thanked 223 Times in 192 Posts

    Re: Brain Teaser


    Quote Originally Posted by Dason View Post
    Would you mind explaining the connection here.
    Here's another way to look at this - more direct.

    A pair of coins are flipped which result in either a Head (H) or a Tail (T).

    Let A be the event that the result that both flips of the coin result in two Heads (H, H). There are four such cases: (H, H), (H,T), ), (T, H), (T,T).

    Let B be the event of non-occurrence, which there are three such cases of the four cases where (H,H) does not occur.

    Now, given the circumstances that at least one of the flips of the coin must result with at least one Head (H), then we are asked what is the probability of the result (H,H) occurring?

    As such, this is tantamount to answering the question of what is the conditional probability that the (H, H) scenario occurs.

    Thus, we have:

    Pr{A]B} = Pr(A intersects B)/ Pr{B} = Pr{A}/Pr{B} = (1/4)/(3/4) = 1/3.

    This is another way to look at this “brain teaser.”

    Does this help?

  14. The Following User Says Thank You to Dragan For This Useful Post:

    derooie2 (09-20-2014)

+ Reply to Thread

           




Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts






Advertise on Talk Stats