Jump to content

Recommended Posts

Posted

There are 100 cows in a barn.

Each of the cows is either brown or blue, and each is equally likely one or the other.

 

A statistician visiting the farm knows only the above.

The cows are let out of the barn one by one, and after 10 are let out, all of which are brown, the statistician asks "Are you sure each of the cows are equally likely to be blue?"

 

A farmhand replies that the cows are kept sorted, and that all of the brown ones will be let out first.

 

What is the expected ratio of brown cows to total cows?

Posted

 

 

And suppose we like stats but not cows? ;)

 

Just kidding, I think these probability questions are fun. Seems to me that this answer would be the expected number of brown cows, conditional on the fact that there are at least 10 brown cows.

 

sum{i from 10 to 100} i * P(i | i > 10)

= something I don't really care to calculate at the moment

 

 

 

Posted

Okay maybe something easier to calculate(??? I haven't tried :P)...

 

 

Alternate question: Suppose the statistician watches 50 brown cows leave the barn. What is the chance that the next cow out will be BLUE?

Posted

Okay maybe something easier to calculate(??? I haven't tried :P)...

 

 

Alternate question: Suppose the statistician watches 50 brown cows leave the barn. What is the chance that the next cow out will be BLUE?

 

 

 

 

So, we are looking for the conditional probability that there are exactly 50 brown cows, given that there are at least 50 brown cows.

This would be:

P[exactly 50 brown cows] / P[at least 50 brown cows]

 

P[exactly 50 brown cows] = (100 C 50) / 2100

= 0.0795892374

 

P[at least 50 brown cows] = P[exactly 50 brown cows] + P[more than 50 brown cows]

 

Use this trick:

1 = P[exactly 50 brown cows] + P[more than 50 brown cows] + P[less than 50 brown cows]

1 = P[exactly 50 brown cows] + 2 * P[more than 50 brown cows]

1 = 0.0795892374 + 2 * P[more than 50 brown cows]

P[more than 50 brown cows] = 0.460205381

P[at least 50 brown cows] = 0.539794619

 

So the final answer is:

P[exactly 50 brown cows] / P[at least 50 brown cows]

= 0.0795892374 / 0.539794619

= 0.147443555

 

Fingers crossed that I didn't make any silly mistakes with the algebra here.

 

 

 

  • 3 months later...
Posted (edited)

Yes Willa, I believe that answer is correct.

 

 

Back to the original problem, I think it's time I try to provide an answer.

 

When I made this puzzle I didn't realize the numbers were so ugly, they seemed small!

 

The answer below is provided by Wolfram Alpha. When I first tried to solve it, I couldn't do sums of combinations because of a bug in Wolfram Alpha, but I submitted a report and they fixed it, so this puzzle might be the reason you can do sums of combinations in Wolfram Alpha! I figure it deserves to be answered.

 

I answered this the way that I would if I had to work it out on paper, trying to minimize the number of calculations (the way I assume the average statistician would solve it in their head). This probably isn't the simplest solution. Also I might have made a mistake in the reasoning or the maths...

 

 

There are 2^100 total possible ordered ways of having 100 cows each with one of 2 colors.

There is 100 C 100 = 1 ordering with all blue cows, which is impossible,

and 100 C 99 = 100 orderings with 99 blue cows, which are also impossible.

So are 100 C 98, ... 100 C 91.

All other ordered cases are possible and equally likely.

 

For every case where there is N brown cows, there is another equally likely case with N blue cows,

so the average of most of the cases is 50 brown cows,

except for the cases where there are more than 90 brown cows (which have no equally likely case with blue cows).

All of the 100 C 91 cases with 91 brown cows have 41 brown cows more than the average case,

all 100 C 92 cases have 42 more, etc.

 

The solution for Wolfram Alpha to work out is:

 

[math]t = 2^{100} - \sum_{j=91}^{100}{100\choose{j}}[/math]

 

[math]b = 50t + \sum_{j=91}^{100}{{100\choose{j}}(j-50)}[/math]

 

[math]a = b / t[/math]

 

where t is the total number of possible ordered arrangements of cow colors

b is the total number of brown cows in all of the possible arrangements

a is the average number of brown cows.

 

 

 

The answer comes out to:

 

[math]\frac{3169126500570573502805338649060}{63382530011411469969555225699}[/math]

 

 

Approximately:

50.000000000000000068277131937315496230427598992696118...

brown cows per hundred cows expected.

 

 

 

 

EDIT: I did in fact make a mathematical error in the first attempt...

Edited by md65536

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.