# How should 50 red and 50 blue marbles be distributed between two jars so as to maximize the chance o

Graduates on the 'i fucking love science group' are again debating this. Please show all your working:

You have 50 red marbles, 50 blue marbles and 2 jars.

Your friend will be randomly grabbing one marble from one of the jars. You must place all 100 marbles in the two jars however you'd like (you must use all 100 marbles and both jars). How would you maximize the chance that your friend will draw a red marble?

1. Your friend will choose a jar uniformly at random, then choose a marble from that jar uniformly at random.

We want the average of the percentages of red marbles in both jars to be maximized.  If one jar contains more red than blue marbles, then the other jar contains more blue than red marbles.  Call these jars the "red jar" and the "blue jar," respectively [1].  Among all arrangements, the greatest possible probability that you draw a red marble from the red jar is 100%, realized in cases when there are no blue marbles in the red jar.  Among all arrangements, the greatest possible probability that you draw a red marble from the blue jar is 49/99, realized in the case when there are 49 red and 50 blue marbles in that jar.

Since the arrangement with one red marble in one jar and all the others in the other jar maximizes BOTH of the probabilities we're trying to maximize, it's optimal. [2]

2. Your friend will examine the two jars, select a jar, and then take a marble uniformly at random from that jar, hoping to get a blue marble.(注意理解这种情况：你希望朋友取得红球的概率最大，然而朋友却希望取得蓝球，两个人的目标并不相同，真是坑朋友啊！！！)

In this case, if one jar has more red marbles than blue marbles, then the other has more blue marbles than red marbles, so you want to put equal numbers of red and blue marbles in each jar.

3. Your friend will examine the two jars, select a jar, and then take a marble at random from that jar, hoping to get a red marble.

This is the easiest case: just arrange it so that one of the jars doesn't have any blue marbles in it.

[1] If you want to be completely formal, let's say that if both jars have the same number of red and blue marbles then we assign the labels "red jar" and "blue jar" arbitrarily.

[2] This is of course the same as Anonymous' answer, which was posted while I was typing this up. Michael Hochster's answer and Breno Sakaguti's answer come to the same conclusion, but I like this version of the argument better. Of course, I only appreciate it because I understand their brute-force and more generalizable solutions to the problem; for someone who didn't, this might not be the best place to start.  In general in such a problem you won't be able to maximize both probabilities simultaneously, so you'd have to do something more like the other solutions.

• 本文已收录于以下专栏：

## OCP-1Z0-053-200题-50题-628

QUESTION 50 The database is running in the ARCHIVELOG mode. It has three redo log groups with one me...
• rlhua
• 2014年02月12日 08:53
• 3843

## hdu1027 求第k个全排列

Problem Description Now our hero finds the door to the BEelzebub feng5166. He opens the door and ...
• update7
• 2017年03月18日 13:06
• 1264

## Javascript的正则表达式

JavaScript的正则表达式其实是一个RegExp对象创建语法直接量语法/pattern/attributes创建 RegExp 对象的语法：new RegExp(pattern, attribu...
• u014410695
• 2016年02月24日 09:56
• 314

## position & transform: translate(-50%, -50%) 实现块元素百分比下居中

position & transform: translate(-50%, -50%) 实现块元素百分比下居中
• Dong_PT
• 2016年04月18日 23:53
• 7895

## SQL2025N: An I/O error "-50" occurred on media "TSM".

https://www-304.ibm.com/support/docview.wss?uid=swg21208412 http://www-01.ibm.com/support/docview.w...
• laven54
• 2014年07月17日 14:41
• 1398

## ocp-324

QUESTION NO: 324 Which of the following describes how a distributed resumable transaction behaves?A...
• xuejiayue1105
• 2015年10月12日 11:20
• 1136

## Spark 2.0 On Yarn

/** * Getting the initial target number of executors depends on whether dynamic allocation is ...
• houzhizhen
• 2016年11月08日 10:31
• 400

## Jars and marbles 问题

You have 10 jars, each filled with many marbles. Each marble weighs exactly 1.0 grams. One of the ja...
• hellobinfeng
• 2014年02月14日 06:10
• 2232

• NtosKiking
• 2016年03月23日 10:14
• 5886

## translate(-50%,-50%)实现居中

• lamanchas
• 2017年11月03日 20:28
• 123

举报原因： 您举报文章：How should 50 red and 50 blue marbles be distributed between two jars so as to maximize the chance o 色情 政治 抄袭 广告 招聘 骂人 其他 (最多只允许输入30个字)