Math problem : Reloaded! - Printable Version +- The Lurker Lounge Forums (https://www.lurkerlounge.com/forums) +-- Forum: The Lurker Lounge (https://www.lurkerlounge.com/forums/forum-4.html) +--- Forum: The Lounge (https://www.lurkerlounge.com/forums/forum-12.html) +--- Thread: Math problem : Reloaded! (/thread-11183.html) |
Math problem : Reloaded! - rashban - 06-06-2003 I've got this assignment in School and it's supposed to be done by Monday. I am to provide a solution to this math problem. "You have 50 white and 50 black balls. You are to place them all in two jars, with any number of balls of each color in each jar. Then, you are to pick a jar at random, and from that jar, a ball at random. If it's a white ball, you win, and if it's a black ball, you lose. Basically, the balls should be placed in such a way that the probability of picking a white ball is as large as possible. How many white balls and how many black balls should there be in each jar to maximise the chance to win?" Common sense and a bit of thinking leads to this conclusion: If I place only one white and no black balls in one jar, and the rest of the balls (99) in the other jar, I will have roughly 75% chance of winning (1/1 + 49/99)/2. However, how do I prove that this is correct without having to try all combinations? The formula looks something like this: (P is the probability of picking a white ball, W is the number of white balls in jar #1, and B is the number of black balls in jar #1) P = ( W/(W+B) + (50-W)/(50-W+50-B) ) / 2 But I can't seem to simplify it into something that really proves that my (very educated) guess is right. Thanks in advance. [Edit: annoying emoticons] Math problem : Reloaded! - Xaeshan - 06-06-2003 Well, if you've taken any calculus course or know any calculus u could take the first derivitive of that and set it to equal zero. Hehe. Math problem : Reloaded! - [wcip]Angel - 06-06-2003 Who is this "u" person everybody keeps talking about? It seems like many people on the Internet know this person. Math problem : Reloaded! - the Langolier - 06-06-2003 Usually to find the max or min you pick end cases and special cases when you know any case in between is in the middle. A few choices to calculate along with the solution could be: 50 balls in each, one color per jar 50 balls in each, equal number of colors per jar 99 balls in one, white ball in the other 99 balls in one, black ball in the other It is easy to see from this that the answer is what you have already said. You can then pick some arbitray combonation in between these cases, such as 50 balls in each, 75% white in one jar, 25% white in the other jar and you will see the probabilty lies between the min and max you have calculated for the special cases. Math problem : Reloaded! - whyBish - 06-06-2003 let w=white balls in jar1 let b=blanck balls in jar1 0<=b<=50 0<=w<=50 chance of winning: (for b<>0 and w<>50) 2P=chance of white in jar1 + chance of white in jar2 =w/(b+w)+(50-w)/(100-b-w) 2dP/dw=[(b+w)-w]/b^2+[-1(100-b-w)--1(50-w)]/(100-b-w)^2 =1/b+[-100+b+w+50-w]/(100-b-w)^2 =1/b+(b-50)/(100-b-w)^2 2d^2P/dw^2=[-(b-50)(-2(100-b-w))/(100-b-w)^4 =2(b-50)/(100-b-w)^3 so Pww <0 2dP/db=-w/(b+w)^2+(50-w)/(100-b-w)^2 2d^2P/db^2=2w/(b+w)^3-(50-w)(-2(100-b-w))/(100-b-w)^4 =2w/(b+w)^3+2(50-w)/(100-b-w)^3 so Pbb >0 Math problem : Reloaded! - Thecla - 06-06-2003 ..(perhaps not the most elegant) is to maximize over the number of white balls first, and then over the total number of balls in the jar second. So let n=total number of balls in the jar with the smaller (or an equal) number of balls (in your notation n=w+b ) and w=number of white balls in that jar. Then 1 <= n <= 50 (we're assuming each jar has at least one ball in it) and 0 <= w < = n. As you wrote, p = 1/2 ( w/ n + (50-w)/(100-n) ) = 1/2 ( w (100-2n)/n/(100-n) + 50/(100-n) ) Since (100-2n)/n/(100-n) >= 0, this is obviously maximized for fixed n by the largest value of w, which is w=n, and then p = 1/2 (150-2n)/(100-n) = 1 - 25/(100-n) And this is obviously maximized by the smallest value of n, which is n=1, with p = 74/99 [edit: a mathematical symbol turned into an emoticon :) ) Math problem : Reloaded! - Drasca - 06-06-2003 So long as you don't have to turn it in for serious credit in Math class... I have one solution: Cheat. Since you're the one pouring b/w balls in jars, what does it matter? You were the one who placed them in the first place, so you've already tainted the "pure" aspect of random. For the purposes of my short discussion though, I assume Random is purely random, not pseudo--like how humans can toss heads 100 times in a row with practice. Thinking on a broader level, there's no difference between randomly picking between 2 containers (jars) holding the same overall content and randomly picking from 1,100 containers holding the same overall content. We tend to think too narrowly... limiting our own options too much by the most natural "common sense" methods we're most comfortable in. Change your perspective: What's the difference between randomly picking between 100 balls or randomly picking between 2 then randomly picking 50 of those two. In Mathematical proof-like equations terms: Given: Chance Random 100, and Chance of Random 2 (jars) * Random of 50 Since Random * Random = Random, --like true infinity * infinity = infinity or true zero * zero = zero. There's no difference, no "maximizing" at all and if you think you can you're just blinding yourself with smoke and mirrors-- or just near-sightedness. Borrow my pair of glasses, see from my perspective and there's no difference. *Yawn. If anyone would care to prove me wrong successfully, I'd like to see it. Until then, there is no spoon here. Math problem : Reloaded! - ithil - 06-06-2003 Drasca,_ Wrote:You were the one who placed them in the first place, so you've already tainted the "pure" aspect of random.That is precisely the point. You introduce order into the system with the initial placement of balls, and you can exploit this and weight the odds in your favor, as has already been shown. The rest of your post is bunk. Math problem : Reloaded! - Occhidiangela - 06-06-2003 To weight the odds, to exploit the odds. Once blind folded, we are back to the pure odds of the dice roll. Easier cheating is them to feel the weight of the two jars, the one with 99 and the one with 1, and draw from the jar with 1. That is the same sort of structuring that people go through when setting up working processes, to weight the odds in favor of success. Math problem : Reloaded! - --Pete - 06-06-2003 Hi, Did you actually try that before suggesting it. Hint: the problem is discrete and bounded, the expression is continuous and unbounded. "A little knowledge is a dangerous thing". --Pete Math problem : Reloaded! - --Pete - 06-06-2003 Hi, Wish I'd worked it out before looking at you answer. Thank you, I learned something from that. I'd thought of trying Lagrange multipliers for the side conditions, but your way is much simpler. No real incentive to work it now :) --Pete Math problem : Reloaded! - --Pete - 06-06-2003 Hi, If anyone would care to prove me wrong successfully, I'd like to see it. Until you actually say something that makes sense, there's not much of a way to prove you right or wrong. Nonsense is just nonsense, it has no meaning so it has no truth value. --Pete Math problem : Reloaded! - CowInvader - 06-07-2003 Heh, lagrange multipliers... ick. Math problem : Reloaded! - Drasca - 06-07-2003 Thanks for the explanation of the purpose of the problem. To set order into chaos so "it isn't so random." I just didn't see how any one could pick "at random" when it simply isn't. Oh well. Would anyone care to play craps? Math problem : Reloaded! - DralaFi - 06-11-2003 The answer is simple, well atleast to me it seems so. Since you have two jars. You pick one at random and you pick a ball at random (blindfolded?). Therefore, 25 white balls and 25 black ones in each jar. If you pick either jar, you will have equal chance of picking a white ball as a black ball. Thus you have a 50% chance of winning all the time. If you chance the distribution around then the chance's of winning increase, for a certain jar but decrease for the other. Thus the best way is to keep it even. Math problem : Reloaded! - --Pete - 06-11-2003 Hi, Since the solution that rashban gave is correct and it gives a 1/2 * 1 + 1/2 * 49/100 = 149/200 ~ 75% chance of getting a white ball, then clearly your solution which only gives a 50% chance is not as good. The problem here isn't coming up with the ideal solution -- that's pretty obvious to anyone that knows how to do probability calculations. The problem is *proving* that the solution is optimal. --Pete Math problem : Reloaded! - gekko - 06-11-2003 If you put one white ball alone in one jar, and all the other balls in the other jar, you have just under a 75% chance of winning, as the author of the thread already stated. In that case, you would have a 100% chance if you picked the jar with only one ball, and a 49/99 chance if you choose the other. Since you have an equal chance to pick either one, your odds would be (100% + 49/99%)/2, which is as I said just under 75%. As I mentioned, this was in the original post. No one says you have to have the right answer to post, but make sure you read through everything a little closer next time, perhaps :P. gekko Math problem : Reloaded! - --Pete - 06-11-2003 Hi, 49/99 Right. Not 49/100 as I said. Didn't account for the white ball in the other jar :( --Pete |