Deceptively Simple Problems

You are on a game show in which the host shows you some number of cases, each containing a gold bar or iron bar. The host shows you what is in all of the cases except the last one. If you guess what is in the last one correctly, you get to keep all the gold bars from the cases. If you guess incorrectly you get to keep all the iron bars. What is your guessing strategy?

Other urls found in this thread:

youtube.com/watch?v=rMz7JBRbmNo
twitter.com/NSFWRedditVideo

If all the bars are the same size, just compare the weight of a case containing the gold bar to the one of which the content you don't know, if its equal, its gold, if its lighter, its iron

You are not allowed to touch the cases.

So it's just a 50/50. What a great game.

Wrong.

Let's just say for the sake of argument that it is "50/50" (it isn't). Does this mean your guess doesn't matter?

Guess gold unless the amount of iron you know about out-values the gold you know about?

No, but you're on the right track.

Toss a coin to decide, to avoid being tricked by some human psychology tomfoolery

Wrong.

If it is 50/50 its really not hard, but what if he shows you only 2 gold bar and 7 iron bars, anyone would guess gogld at this point according to the outavluing theory, but perphaps there are only 2 gold bars total. Going by probability is not a smart idea, since the content of the case depends on the person who put the bars in there, so unless the bars are spawned randomly and have a 50% chance of being gold, probability aint helping you. You could through a series of experiments find the common characteristics of the cases with the iron bars and of those with the gold bars, if the last one mathces the characteristics of the iron ones say iron otherwise say gold.

The person who put the bars in and the characteristics of the cases are irrelevant. What you wanna do is maximize the value of the metal you win, whether you win the iron or the gold. I'm just not awake enough to figure out how.

No it's not 50/50. I'll help you out a bit:

The chance that you are shown x gold bars given there are x gold bars in the n cases is 1-x/n. The chance you are shown x gold bars given there are x+1 gold bars in the n cases is (x+1)/n

iron value * quantity + 1/2(iron value) vs gold value * quantity + 1/2 (gold value)

Probability and value maximization are irrelevant unless the bars are randomly spawned in the cases.

Is there a 50/50 chance each case contains an iron/gold bar? If yes, you should have mentioned it.

each case is an independent event though

Wroooong. Read

I didn't say anything contrary to that.

if cases are independent events, then the last case must be 50/50.

Why wouldn't you just set it up as a binomial pdf, and find the mle given the data?

Or, equivalently and more simply, Pr(gold) = number of gold cases shown divided by total number of cases shown.

So independent events only have 50% probabilities? You should try to actually learn probability theory.

> All Bernoulli trials have a p = 0.5

Frequentist approximation gets you close but still wrong answer.

you're right if you account for all of the cases together. you're only guessing for ONE case in this game.

itt: brainlet op tries to be smart

So if I tell you that I have an unfair die, and I tell you the results of a bunch of tosses, those don't help you predict the next toss even though they are independent events? Again, try learning probability theory.

brianlet

OK here's the answer:

Guess gold when p(x+1 gold bars | x shown) (x+1) > p(x gold bars | x shown) (x)

p(x+1) (x+1)/n (x+1) > p(x) (n-x)/n (x)

Yadda yards, turns out if p(x+1) / p(x) = 1
Then you should guess gold if x =< (n-2)/2

What prior information is available that would make a Bayesian approximation any better?

I guess, I'm assuming host is choosing cases to open at random. If we instead assume he's opening the cases deliberately, and knows what's in the last case, that might make a useful prior. We could assume that the host wants us to lose, and therefore weight the probability that the last case contains iron by some amount.

See

Pr(x+1|N) is always going to be greater the Pr(x|N), and always guessing gold no matter what seems like a generally bad strategy.

>Pr(x+1|N) is always going to be greater the Pr(x|N)
Which events are you referring to?

>always guessing gold no matter what seems like a generally bad strategy.
You should only guess gold no matter what if there are 5 or fewer cases. Otherwise, guess gold only when you are shown n/2-1 gold bars or more.

>Get coin
>I weighted this coin such that it always lands on heads
>Let me show you
>Flip coin 100 times: 100 heads
>I'll bet a million dollars that the next time the I flip the coin it ends up heads

You'd take that bet right? 50-50 chance it lands on tails, right?

If the underlying probability that the case contains gold is not 50%, then you don't have a 50-50 chance that the case contains gold, regardless of the fact that the cases represent independent Bernoulli trials.

Oh and of course there is a split branch case which says that if you are shown no gold bars you should always guess gold. Which makes sense, since you don't want a bunch of iron bars.

>Guess gold when p(x+1 gold bars | x shown) (x+1) > p(x gold bars | x shown) (x)

This statement is always going to be true.
Pr(x+1|N) = (x+1)/N
Pr(x|N) = x/N

(x+1)/N > x/N

Again, which events are "x+1" and "N" referring to?

Guess gold. Correct. Win gold.
Gueds gold. Wrong. Win iron.
Guess iron. Correct. Win gold.
Gueds iron. Wrong. Win iron.

How is this not 50/50?

No, it's not always going to be true.

p(x+1) (x+1)/n (x+1) > p(x) (n-x)/n (x)

p(x+1) / p(x) = R

(R+1)x^2+(2R-n)x+R > 0

when R < n^2/(4n+4) this is true when x > (n-2R+sqrt(n^2-4Rn-4R))/(2R+2) or x < (n-2R-sqrt(n^2-4Rn-4R))/(2R+2)

(since x is a non-negative integer the latter is equivalent to x = 0)

when R > n^2/(4n+4) this is true.

But x > (n-2R+sqrt(n^2-4Rn-4R))/(2R+2) is not always true. For example, if R = 1 then this is false when x < n/2-1

Read the thread.

x + 1 = number of gold bars shown plus one
N = number of bars shown

Unless by "x shown" you meant number of gold bars shown rather than the total number of gold and iron bars shown, I'd have to reconsider then.

If there are more iron bars in the cases he shows me I'll guess iron, else I'll guess gold.

I did.
I still don't see how a random(!!!) sequence can give you any information about the probability if the n+1 case.

OK, then I don't see how Pr(x+1|N) = (x+1)/N

The sequence doesn't tell you anything, it's the number of cases with gold bars that tells you something.

Ok, in that case

Pr(x gold bars | x gold bars shown) = Pr(X = x)/Pr(X=x \cup X = x + 1)

And

Pr(x + 1 gold bars | x gold bars shown) = Pr(X =x + 1)/Pr(X=x \cup X = x + 1)

The denominator cancel out.

Pr(X = x) > Pr(X=x+1)
Because the p that makes the the observed data most likely is x/N, where N is the total number of cases.

>Pr(x gold bars | x gold bars shown) = Pr(X = x)/Pr(X=x \cup X = x + 1)
What? That's not Bayes' theorem.

See and

>it's the number of cases with gold bars that tells you something.

A. Say 10 open cases with 3 gold bars showing
B. Say 10 open cases with 7 gold bars showing

How does the probability for n=11 differ in these two scenarios?

Wrong. You're assuming the host is opening the cases at random.

No, it's basic probability.

The events are independent, so the probability equals success conditions over total conditions.

Success in Pr(x gold bars| at least x gold bars) equals the probability you get exactly x gold bars divided by the probability you get x or x+1 gold bars.

You'd get the same thing using Bayes theorem, though.

Pr(x gold bars| at least x gold bars) = (Pr(at least x gold bars | x gold bars) ×Pr(x gold bars))/Pr(at least x gold bars)

Pr(at least x gold bars | x gold bars) = 1
Pr(x gold bars) = Pr(X = x)
Pr(at least x gold bars) = Pr(X = x \cup x + 1)

The chance of A occurring when there are 3 gold bars is 8/11. When there are 4 gold bars, 4/11.

The chance of B occurring when there are 7 gold bars is 4/11. When there are 8 gold bars, 8/11.

Damn I can't believe Veeky Forums got baited this hard oh wait yes I can.

No, I'm not.

each box has a gold bar with probability p and an iron bar with probability 1-p. The sequence allowe you to estimate p.

>Pr(at least x gold bars | x gold bars) = 1

Wrong, you could be shown x-1 gold bars.

This is an extra assumption you're making that's not included in the original question.

The probabilities for each box could be completely different from each other.

The first box opened might have had a 50% chance of being gold, the second box might have had a 25% chance, the third box might have had a 90% chance, etc.

This is different from a biased die or coin, where you know the biased probability remains constant.

What has been in the cases in a previous iteration of the game show?

>Host always leaves iron bar out unless it's all gold
>See 8 gold bars, 2 iron
>Proba the hidden bar is gold : 0. Proba it is iron : 1.

Like for the monty hall problem, you have to be careful when phrasing the problem. A random host doesn't give the same results as an arbitrary one

Thanks. Starting to sink in.

there's no guarantee that all cases are i.i.d. variables, so there's no information to be gained from the last one based on the previous ones. stop being annoying with "muh probability theory" when you clearly don't understand the conditions necessary

guess gold. value if gold is higher than value if not gold.
>b..but if there's a lot of iron chances are next is iron!
read previous paragraph, brainlet

>each box has a gold bar with probability p and an iron bar with probability 1-p.
no, it doesn't. the problem says nothing of the kind. stop misleading people.

>>Host always leaves iron bar out unless it's all gold
>See 8 gold bars, 2 iron
>Proba the hidden bar is gold : 0. Proba it is iron : 1.
See THIS is an assumption.

Literally how?
At the end of the game the total number of gold bars can either equal the number show, or the number shown plus one not shown. How would a gold bar disappear such that at the end of the game you end up with x - 1 gold bars?

he's showing you an arbitrary strategy does not work like you want it to, brainlet

But that's wrong retard. Again, you are essentially arguing that nothing can be learned about a loaded die from past tosses. This is just false. You clearly don't understand what independent means.0

Yes, and assuming this does not happen is an assumption as well.

>ALL EVENTS ARE IDENTICAL TO MY LOADED DIE :(
idiot. read the post again. you are assuming iid

Why are you assuming the probability that a case contains iron or gold is the same for each case? Nowhere did it state that the cases are identical.

You're arguing that you can make predictions for a loaded die that changes its loading every time you roll it.

The fact that information is missing has nothing to do with the strategy being incorrect. You don't understand how probability works.

There is no strategy.

Are the tosses of a loaded die not iid?

You are embarrassing yourself.

what are you even trying to say? you have NO guarantee that the host picks cases at random, which is what you're using. are you claiming you aren't using it? then write it down and prove us wrong.

maybe you're not assuming that and you're assuming instead they are all i.i.d. like this faggot ?

in any case, you're assuming information and are a huge brainlet.

>Why are you assuming the probability that a case contains iron or gold is the same for each case?
Where did I assume that? You have no idea what you're talking about.

>EVERYTHING IS MY LOADED DIE
obviously tosses of a loaded die are iid, you fucking imbecile. that's exactly why your analogy doesn't work

We don't care about the variables being iid

>Pick some arbitrary cases, say 90 of them are gold and 10 are iron
>Host hides one of them at random
>Proba that the hidden one is gold is higher than it being iron.

You either see 89 or 90 golden bars so you're not completely sure about the exact initial situation, but you know that either case gold is more probable.

>you have NO guarantee that the host picks cases at random
Where did I assume this? Point it out for me.

>then write it down and prove us wrong.
I did already. See and

>at random
this is another way to assume something wrong. you are assuming the host chose the cases to open at random. this assumption gives you the same answer as assuming iid

>I did already. "Guess gold only when the last box has gold"
I don't know what to say other than well meme'd

>"Guess gold only when the last box has gold"
So you can't read basic probability calculations.

Okay if you think your strategy works, let's play.
Here are some boxes:
[Gold] [Gold] [Iron] [Gold] [???] [Gold] [Gold] [Iron] [Gold]

Is the hidden box gold or iron ?
Hint: I didn't choose it at random, since you claim it's not a necessary condition to make your strategy work.

fine, it doesn't say "when it has gold", it says "when it probably has gold". either way it's not a solution, you're not really saying anything if you don't give a way to calculate that probability (there isn't one)

how did you choose which boxes to open then? if I don't know which strategy you used I don't know what the probability is. was it "open every one but the 5th"? was it "open all golds first" / "open all irons first"? unless you believe the space of all strategies is somehow a probability space you can make calculations in, the question has no answer.

nvm. I'm saying something you agree with. it's that's making the wrong claim

You are really stupid. Read what you just replied to again. The fact that you can create of a scenario in which the strategy doesn't get you gold doesn't mean the strategy is not the correct one when presented with a *general scenario* in which the information you have created is missing.

what the fuck is a "general scenario" you fucking brainlet? "general" in probability means an even with probability 1, are you saying the space of strategies is a probability space and almost all of them are like the random one? what the fuck are you even saying?

youtube.com/watch?v=rMz7JBRbmNo

>fine, it doesn't say "when it has gold", it says "when it probably has gold".
Even that's wrong. There are situations where it is less likely the case has gold but you should still guess it. Why can't you just read it instead of making shit up? Just admit you don't understand it and I will explain it to you.

indulge me (aka answer my fucking question already), what do you think you're saying?

The mle for Pr(gold) is 6/8.
That may not be the right answer, but it's the most likely answer given the available information.

>what the fuck is a "general scenario" you fucking brainlet?
The scenario detailed above. Adding more information to the scenario proves nothing about the strategy for the scenario as it is written. Probability is about how much information you have, you ignorant fuck.

>it's the most likely answer
what does this mean? can you even formalize this?

>It doesn't work? Well... it's a "general case"! What does that mean? Well, like in probability, it's a general case haha. What do you mean this isn't a probability space? You ignorant fuck!

ok then

You lose, it was iron.

>but it's the most likely answer given the available information.

Let's try again then, you should have a >1/2 winning rate on a repeated experiment if your strategy is a good one, right ?
[Iron] [Iron] [???] [Iron] [Gold] [Iron] [Iron]

since your 50/50 strategy did not work, by bayes theorem that means you strategy is now more likely to be false :^)

I am saying that you maximize the expected value of your choice by guessing gold if p(x+1) / p(x) > n^2/(4n+4), else if x >= (n-2R+sqrt(n^2-4Rn-4R))/(2R+2) or x = 0

If we take the flat prior p(x+1) = p(x) then you maximize EV by choosing gold if n =< 5 else if x >= n/2-1 or x = 0

This is not trivial at all.

Where are you getting these fantasies? I said general case as in the scenario as detailed in the OP with no extra information. What is so hard about this?

>This is not trivial at all.
says who? you're saying if it's likely to be gold, pick it, and then for an example give the easy case of variables being the same

either way, why the fuck are you telling this to me? I disagree mainly with , see the continuing replies for example the correct . are you replying to the wrong person?

have we taken the value of the case into account?

there is no answer for the case in the OP. there is no "general strategy" and no way to assume that it gives the same results as a random strategy.

see, you're saying the same as
>1,2,3,4,5,x,7
>what's x? it's 6 with no extra information
it's wrong.

just bribe the guy and let him tell you which

>you're saying if it's likely to be gold, pick it,
No, I'm not, faggot. Stop repeating the same debunked shit.

>and then for an example give the easy case of variables being the same
Flat prior, ever heard of it?

>either way, why the fuck are you telling this to me? I disagree mainly with
That is me, moron. And the calculation in that post is integral to the calculation for the optimal strategy. Proving once again, that you don't understand what's being discussed. Now fuck off.

Yes. Pr(p | y_i) = \prod_{i = 1}^n p^y_i (1-p)^{1 - y_i}
y_i = 1 if gold 0 otherwise.
Solve for p.

Also known as maximum likelihood estimation.

Now I can update my mle using Bayes theorem, and my new probability is 6/9. Less probable than before, but still gold more likely gold than not.

Keep doing it, and eventually my estimate will approach the true probability.