1. ALG
    Joined
    16 Dec '07
    Moves
    6190
    21 Jul '11 23:48
    Originally posted by Palynka
    You guess the number that pops out because there is an implicit assumption about a uniform distribution for n.
    Hmm, what if the estimated upper bound were 50, what would you guess then?
  2. Standard memberPalynka
    Upward Spiral
    Halfway
    Joined
    02 Aug '04
    Moves
    8702
    22 Jul '11 00:271 edit
    Originally posted by Thomaster
    Hmm, what if the estimated upper bound were 50, what would you guess then?
    The same, 12 (or 11). As long as it's bounded, the uniform probability is well defined.
  3. Joined
    29 Dec '08
    Moves
    6788
    22 Jul '11 05:39
    Originally posted by Anthem
    Palynka,
    Yes, I'm assuming uniform distribution.

    JS357,
    As to your first point, you are right, it wasn't a trick, just imprecision.
    For the second, yes, I meant "can be" as in the maximum capacity of the container.
    Let's then treat it as asking for the original number present, which I'd bet is the number on the ball that showed up, in this case, 12. I think there is no other guess that has a greater predictable chance of being right. It's like you know there are 11 other balls with lower numbers, and that's all you know. I look forward to being wrong. 🙂

    So on the second casino question, basically in the first casino the player knows n isn't infinite, and in the second the player can estimate the maximum n but not the actual number put into the container -- other than to estimate it as less than or equal to the max. I see no reason to change my guess.

    One could run a simulation on this puzzle rather easily. Randomize n, randomize the first ball number from 0 - n, compare a strategy of guess = n, guess = n+1, etc., see how each guessing strategy does. I think in most of the strategies the player would lose, but the question isn't about that, it's about which guessing strategy would do best.
  4. DonationAnthem
    The Ferocious Camel
    g1
    Joined
    12 Jun '02
    Moves
    13774
    22 Jul '11 16:02
    Answers:

    A1: 12 (or 11 taking into account my imprecision)
    A2: Knowing (or being able to estimate) the upper bound makes no difference.

    However (in reply to you, JS357) the existence of an upper bound does make a difference, even if you have no idea what it is. So in the first casino if you only knew that there were a finite number of balls, but no upper bound, the chance that there were 12 balls would approach 0.
  5. DonationAnthem
    The Ferocious Camel
    g1
    Joined
    12 Jun '02
    Moves
    13774
    22 Jul '11 16:03
    Proof:
    Call the maximum number of balls that can fit in the container m, the number of balls in the container n, and the revealed ball's number r. Using Bayes' Theorem, for each x>=12, and x<=m

    P(n=x|r=12) = P(r=12|n=x)*P(n=x)/P(r=12)

    So, by uniform distribution,

    P(n=x) = 1/m
    and
    p(r=12|n=x) = 1/x

    Thus,

    P(n=x|r=12) = 1/x * 1/m * 1/P(r=12)
    P(r=12) does not depend on x, and so lower x give a higher probability, regardless of the value of m.
  6. DonationAnthem
    The Ferocious Camel
    g1
    Joined
    12 Jun '02
    Moves
    13774
    22 Jul '11 16:22
    Some notes:

    #1 the value of P(r=12) doesn't matter to the solution, but finding it shows us why the existence of an upper bound is necessary to the problem.

    By partitioning the sample space, we get that
    P(r=12) = sum(k=1,m, P(r=12|n=k)*P(n=k) ) (pardon the awkward notation)
    = sum(k=12,m, 1/k )*1/m

    Therefore,
    P(n=x|r=12) = 1/x * 1/sum(k=12,m, 1/k )

    In which the sum diverges as m approaches infinity. So, if n were an unbound arbitrary finite number, P(n=x|r=12) = 0.


    #2 I thought up this problem when I was considering the doomsday argument http://en.wikipedia.org/wiki/Doomsday_argument. Oddly people seem to claim that this argument is Bayesian, but when I tried to fit it into that framework it didn't seem to make any sense (perhaps they're using the term "Bayesian" differently) unless I added in a theoretical upper limit to total births (as in this problem). If anyone knows anything more about this, I'd love to hear your take.
  7. Joined
    29 Dec '08
    Moves
    6788
    22 Jul '11 17:22
    Originally posted by Anthem
    Answers:

    A1: 12 (or 11 taking into account my imprecision)
    A2: Knowing (or being able to estimate) the upper bound makes no difference.

    However (in reply to you, JS357) the existence of an upper bound does make a difference, even if you have no idea what it is. So in the first casino if you only knew that there were a finite number of balls, but no upper bound, the chance that there were 12 balls would approach 0.
    Yes to your comment on knowing there is an upper bound making a difference. I wonder whether, as capacity increases but remains finite, the chance that there are 12 balls, while diminishing, remains greater than the chance that any other specific number you might guess, might be the best guess to make. It seems that there would be no crossover as capacity goes from 12 upward.
  8. Standard memberforkedknight
    Defend the Universe
    127.0.0.1
    Joined
    18 Dec '03
    Moves
    16687
    22 Jul '11 18:00
    If the payout was based on how close you are to the correct answer (as opposed exact), the problem becomes much more interesting to me.

    It is no longer uniform distribution.

    Estimation of an upper bound matters.

    How else would this change things?
  9. Standard memberPalynka
    Upward Spiral
    Halfway
    Joined
    02 Aug '04
    Moves
    8702
    22 Jul '11 18:57
    Originally posted by forkedknight
    If the payout was based on how close you are to the correct answer (as opposed exact), the problem becomes much more interesting to me.

    It is no longer uniform distribution.

    Estimation of an upper bound matters.

    How else would this change things?
    What do you mean by it's no longer uniform? The uniform is only on the prior distribution of n, that doesn't depend on which type of bet one is making... So maybe I'm misreading you?
  10. Standard memberPalynka
    Upward Spiral
    Halfway
    Joined
    02 Aug '04
    Moves
    8702
    22 Jul '11 19:011 edit
    Originally posted by Anthem
    #2 I thought up this problem when I was considering the doomsday argument http://en.wikipedia.org/wiki/Doomsday_argument. Oddly people seem to claim that this argument is Bayesian, but when I tried to fit it into that framework it didn't seem to make any sense (perhaps they're using the term "Bayesian" differently) unless I added in a theoretical upper limit ...[text shortened]... (as in this problem). If anyone knows anything more about this, I'd love to hear your take.
    This is exactly the issue that I was saying with allowing n to be unbounded. I'm very relieved to see I'm not the only one that's picky with this things! 🙂

    The Doomsday argument, I think, can be fitted into a Bayesian framework by using an improper and uninformative prior like the Jeffreys prior.
  11. Standard memberforkedknight
    Defend the Universe
    127.0.0.1
    Joined
    18 Dec '03
    Moves
    16687
    25 Jul '11 14:21
    Originally posted by Palynka
    What do you mean by it's no longer uniform? The uniform is only on the prior distribution of n, that doesn't depend on which type of bet one is making... So maybe I'm misreading you?
    I guess I stated that incorrectly. The distribution of the value of n is still uniform, but the estimated value of a guess of 'k', where k is the number on the observed ball, would no longer be 1/n
  12. DonationAnthem
    The Ferocious Camel
    g1
    Joined
    12 Jun '02
    Moves
    13774
    25 Jul '11 16:35
    forkedknight,

    I think if we based payout on how close you are to the correct answer than the best bet depends on the payout scheme. However, this got me thinking about the expected value of the number of balls in the container.

    So, as I said earlier, P(n=x|r=12) = 1/x * 1/sum(k=12,m,1/k)
    Thus, given some bound m, the expected value is:

    sum(j=12,m, j*P(n=j|r=12) ) = sum(j=12,m, j * 1/j * 1/sum(k=12,m,1/k) )
    = (m - 11)/sum(k=12,m,1/k)

    I don't think that there is any way to get an actual number for the expected value without some sort of prior estimate of the size of the bound.
  13. Standard memberforkedknight
    Defend the Universe
    127.0.0.1
    Joined
    18 Dec '03
    Moves
    16687
    25 Jul '11 18:031 edit
    Originally posted by Anthem
    forkedknight,

    I think if we based payout on how close you are to the correct answer than the best bet depends on the payout scheme. However, this got me thinking about the expected value of the number of balls in the container.

    So, as I said earlier, P(n=x|r=12) = 1/x * 1/sum(k=12,m,1/k)
    Thus, given some bound m, the expected value is:

    sum(j=12,m, j ual number for the expected value without some sort of prior estimate of the size of the bound.
    Isn't that exactly what you hinted at by suggesting the player could see the container holding the balls?

    If you want to make this a practical example (a machine in a casino), then you have lots of assumptions you can make about how the machine might work (size/volume constraints, cost constraints, complexity.

    In this case, you need to think a bit more like an engineer, and a bit less like a mathematician.
  14. DonationAnthem
    The Ferocious Camel
    g1
    Joined
    12 Jun '02
    Moves
    13774
    25 Jul '11 22:30
    Originally posted by forkedknight
    Isn't that exactly what you hinted at by suggesting the player could see the container holding the balls?

    If you want to make this a practical example (a machine in a casino), then you have lots of assumptions you can make about how the machine might work (size/volume constraints, cost constraints, complexity.

    In this case, you need to think a bit more like an engineer, and a bit less like a mathematician.
    In the original problem? No, it doesn't matter whether you know in the original, because you only win the bet if you give the exact number of balls in the container, not the expected value of the balls in the container.

    Perhaps you are getting confused about the term "expected value"? If so, here is an explanation:

    The expected value is not the value that you expect to occur most frequently, but rather the average of the possible outcomes weighted by the frequency with which you expect them to occur. So, if you're flipping coins and you get $1 for heads, and you lose $1 for tails, your expected value for one flip is $0, even though it is impossible for you to actually get $0 for one flip.

    Also: Thinking like an engineer? I'd probably just get bored and go home 😉
Back to Top

Cookies help us deliver our Services. By using our Services or clicking I agree, you agree to our use of cookies. Learn More.I Agree