Register to reply

Magic beans problem

by scalpmaster
Tags: beans, magic
Share this thread:
Stephen Tashi
#19
Sep26-11, 11:46 AM
Sci Advisor
P: 3,256
Quote Quote by D H View Post
As I take it, the only allowed scheme is to pick some number n between 0 and 10 inclusive, then randomly draw n beans from bag A, 10-n beans from bag B all without looking.
D H,

I have a more liberal interpretation. My interpretation would allow "crazy" strategies like "Pick 3 beans from bag A and 4 beans from bag B and put them in a third bag C. Draw your ten beans by picking 4 beans from bag A, 4 beans from bag B and 2 beans from bag C." Intuitively, no amount of remixing of the beans will improve the expected value, but I am very curious how one would rigorously prove that.

scalpmaster,

To maximize the variance of the two-bag strategy described above, use the formula for V and pick the value of n that makes V largest. I leave the arithmetic to you
D H
#20
Sep26-11, 12:27 PM
Mentor
P: 15,067
Quote Quote by Stephen Tashi View Post
Following the formula given in the wikipedia article: http://en.wikipedia.org/wiki/Hyperge...c_distribution

Let

[itex] N [/itex] = total number of beans in the bag
[itex] n [/itex] = number drawn, [itex] 0 < n \leq N [/itex]
[itex] k [/itex] = number of magic beans in the bag, [itex] 0 \leq k \leq N [/itex]
[itex] V = [/itex] variance of the number of magic beans drawn

Then
[itex] V = n \frac{k}{N} \frac{N-k}{n} \frac{N - n}{N -1} [/itex]
That second fraction on the right should be [itex]\frac{N-k}{N}[/itex] rather than [itex]\frac{N-k}{n}[/itex], resulting in

[tex]V = n \frac k N \frac {N-k} N \frac {N-n} {N-1} [/tex]

If you draw nothing (n=0), the odds of winning are 0, with zero variance ("if you don't play you can't win"). The corrected formula yields a variance of zero for n=0 and for n=N.

Suppose we make n draws from bag A and 10-n draws from bag B.
Then the total variance is [itex] V = n \frac{3}{10} \frac{7}{n} \frac{10-n}{9} + (10-n)\frac{3}{10}\frac{7}{10-n}\frac{10-(10-n)}{9} [/itex]
Corrected: [itex]
V = n \frac 3{10} \frac 7{10} \frac{10-n} 9 +
(10-n) \frac 3{10} \frac 7{10} \frac {10-(10-n)} 9[/itex]


The variance from drawing 10 beans from a bag of 20 that contains 6 magic beans is
[itex] V = 10 \frac{6}{20}\frac{14}{10}\frac{10}{19} [/itex]
Corrected: [itex]V = 10\frac{6}{20}\frac{14}{20}\frac{10}{19}[/itex]
D H
#21
Sep26-11, 12:35 PM
Mentor
P: 15,067
Quote Quote by Stephen Tashi View Post
D H,

I have a more liberal interpretation. My interpretation would allow "crazy" strategies like "Pick 3 beans from bag A and 4 beans from bag B and put them in a third bag C. Draw your ten beans by picking 4 beans from bag A, 4 beans from bag B and 2 beans from bag C." Intuitively, no amount of remixing of the beans will improve the expected value, but I am very curious how one would rigorously prove that.
Point taken. I too cannot see how this will change the expected value given that bags A and B have identical contents, but I too cannot see how to prove this rigorously.

I can see that these crazy strategies will change the variance compared to a simpler approach (e.g., choose n from bag A, 10-n from bag B).
AlephZero
#22
Sep26-11, 12:52 PM
Engineering
Sci Advisor
HW Helper
Thanks
P: 6,959
Quote Quote by D H View Post
Point taken. I too cannot see how this will change the expected value given that bags A and B have identical contents, but I too cannot see how to prove this rigorously.
The probablity that each bean is magic remains constant at 0.3, independent of anything that you do with that particular bean.

So if you select 10 different beans, the expected number of magic beans is 3, whatever crazy strategy you use to select them.
scalpmaster
#23
Sep26-11, 01:04 PM
P: 35
Quote Quote by AlephZero View Post
So if you select 10 different beans, the expected number of magic beans is 3, whatever crazy strategy you use to select them.
Expected no. remains 3 but if max variance can occasionally increase the no. of magic bean selected to be 5 or 6, thats good enough.

Consider the case of a 44no.s (6+1balls) lottery. If we split it into 2 sets of 22no.s, covering all no.s, and employ 4of4, 5of5 or 5of6 wheeling systems and create variance large enough to occasionally trap 5+1 no.s or more in either side of the sets, we stand a chance to win top 3 prizes.

All the possible outcome scenerios of 2 fully hedged wheels covering all no.s.

(3,4) , (4,3) , (5,2) , (2,5) , (6,1) , (1,6) , (7,1) , (1,7)

If variance swings are large enough, there is no escape, we will win top prizes. So the key question is how to create large swings to either side?

.i.e. In stock portfolio management, we want low variance, the beta, for any given expected no.,the alpha. However, for lottery fully hedged system, we want Maximum variance.
D H
#24
Sep26-11, 01:26 PM
Mentor
P: 15,067
Quote Quote by AlephZero View Post
The probablity that each bean is magic remains constant at 0.3, independent of anything that you do with that particular bean.
You can look at a particular bean and alter your selection based on that, and that certainly can change the expected outcome (but that is cheating).

Changing the selection strategy most certainly does change the variance. So naively, why not the expected value?

I do agree with yours and Stephen Tashi's non-rigorous (i.e., intuitive) reasoning that the expected value has to be three for any valid selection strategy. However, trusting one's intuition when it comes to probability is oftentimes a losing proposition. In any case, my take on what Stephen Tashi meant by "rigorously" is to prove that every valid selection strategy will result in a probability distribution that has an expected value of three.
AlephZero
#25
Sep26-11, 05:17 PM
Engineering
Sci Advisor
HW Helper
Thanks
P: 6,959
Quote Quote by D H View Post
You can look at a particular bean and alter your selection based on that, and that certainly can change the expected outcome (but that is cheating).
That's the key point of my reasoning. Possibly you could make the assertion appear more rigorous by wrapping it in the language of Bayesian probability theory. The "rules" exclude doing anything that changes the a-posteriori probability of a bean being magic.

Changing the selection strategy most certainly does change the variance. So naively, why not the expected value?
Hmm.. I'm not sure if I'm too naive, or not naive enough, to feel there "ought" to be a connection between the expected value and the variance. But I don't.
scalpmaster
#26
Sep28-11, 05:16 PM
P: 35
Quote Quote by bpet View Post
Aside: is Prob(6 found) maximized by taking 5 from each bag?
Does n=5 maximizes probability(6 found)? Not sure, but someone else responded this way:

Consider one bag:

Pick 10: 3 magic beans
Pick 9: 2 or 3 beans
Pick 8: 1, 2 or 3 beans
Pick 7: 0,1,2, or 3 beans
Pick 6: 0,1,2, or 3 beans
Pick 5: 0,1,2, or 3 beans
Pick 4: 0,1,2 or 3 beans
Pick 3:0,1,2, or 3 beans
Pick 2: 0,1,2 beans
Pick 1:0,1 beans
Pick 0: 0 beans

The expectation is maximum for the following combinations (of 2bags) :

7 and 3
6 and 4
5 and 5

in this case the expectation is:

0,1,2,3,4,5,6

These are the combinations that can offer you the maximum 6 magic beans at the risk of getting 0 beans.

If you want to play safe, you pick 10 from one bag but you have only 3 beans.
If risk aversion is not to have less than 2 magic beans then you have the following combinations:

10,0
9,1

If 1 is minimum then:

10,0
9,1
8,2

So the answer should depend on the constraint of minimum number of magic beans.
This is a boundary value constraint problem. Otherwise, it is incomplete.


Register to reply

Related Discussions
Baked beans General Discussion 14
Magic Squares/Magic Constant Calculus & Beyond Homework 1
Red beans and rice in New Orleans General Discussion 7
Bean weight brain teaser Fun, Photos & Games 6
A horror of birds and beans General Discussion 0