All about flooble | fun stuff | Get a free chatterbox | Free JavaScript | Avatars    
perplexus dot info

Home > Probability
Red and Yellow (Posted on 2024-04-16) Difficulty: 3 of 5
A bag contains an unknown number of red balls and yellow balls. When N balls are drawn at random (without replacement) the probability that they are all yellow is 1/2. The number of balls in the bag is the minimum for this to happen.

If the first N balls were all yellow, what is the probability that the next ball drawn is red?

Express the probability as a function of N.

See The Solution Submitted by K Sengupta    
Rating: 4.5000 (2 votes)

Comments: ( Back to comment list | You must be logged in to post comments.)
Solution some exceptions | Comment 2 of 7 |
clc
for red=sym(1):600
  for yellow=sym(1):60
    tot=red+yellow;
    for n=1:10
      p=prod([yellow:-1:yellow-n+1]./[tot:-1:tot-n+1]);
      if p==.5
        p2=(yellow-n)/(tot-n);
        fprintf('%4d %4d %4d %4d   %4d %4d %12.10f\n',[n,red,yellow,tot,yellow-n,tot-n,p2])
        break
      elseif p<.5 || isnan(p)
        break
      end
    end
  end
end

In most instances, for n>1, the probability that the next draw is yellow is (n-1)/n, making that of red be 1/n. These are the cases where the 1/2 probability is a result of the number of yellow balls being 2*n-1 and there is only one red ball.

When n is 1, there are varying probabilities for the next draw, as shown in the taable below.

There are also some sporadic cases: for example if there are 2 red and 19 yellow balls, the probability that the first 6 are all yellow is

19*18*17*16*15*14/(21*20*19*18*17*16) = 15*14/(21*20) = 1/2

so in that case of n = 6, the probability that the next selection is red will be 2/15, rather than 1/6.

The table also shows the case where there were 6 red balls with 15 yellow balls. The probability that the first two are both yellow is also 1/2 and the probability the next ball is red is 6/19, not 1/2.

   n   red yellow tot  yellow-n tot-n  prob next is yellow
   1    1    1      2      0      1    0.0000000000
   2    1    3      4      1      2    0.5000000000
   3    1    5      6      2      3    0.6666666667
   4    1    7      8      3      4    0.7500000000
   5    1    9     10      4      5    0.8000000000
   6    1   11     12      5      6    0.8333333333
   7    1   13     14      6      7    0.8571428571
   8    1   15     16      7      8    0.8750000000
   9    1   17     18      8      9    0.8888888889
  10    1   19     20      9     10    0.9000000000
   1    2    2      4      1      3    0.3333333333
   6    2   19     21     13     15    0.8666666667
   1    3    3      6      2      5    0.4000000000
   1    4    4      8      3      7    0.4285714286
   1    5    5     10      4      9    0.4444444444
   1    6    6     12      5     11    0.4545454545
   2    6   15     21     13     19    0.6842105263
   1    7    7     14      6     13    0.4615384615
   1    8    8     16      7     15    0.4666666667
   1    9    9     18      8     17    0.4705882353
   1   10   10     20      9     19    0.4736842105
   1   11   11     22     10     21    0.4761904762
   1   12   12     24     11     23    0.4782608696
   1   13   13     26     12     25    0.4800000000
   1   14   14     28     13     27    0.4814814815
   1   15   15     30     14     29    0.4827586207
   1   16   16     32     15     31    0.4838709677
   1   17   17     34     16     33    0.4848484848
   1   18   18     36     17     35    0.4857142857
   1   19   19     38     18     37    0.4864864865
   1   20   20     40     19     39    0.4871794872
   1   21   21     42     20     41    0.4878048780
   1   22   22     44     21     43    0.4883720930
   1   23   23     46     22     45    0.4888888889
   1   24   24     48     23     47    0.4893617021
   1   25   25     50     24     49    0.4897959184
Operation terminated by user during sym/normalizesym

  Posted by Charlie on 2024-04-16 15:24:43
Please log in:
Login:
Password:
Remember me:
Sign up! | Forgot password


Search:
Search body:
Forums (0)
Newest Problems
Random Problem
FAQ | About This Site
Site Statistics
New Comments (8)
Unsolved Problems
Top Rated Problems
This month's top
Most Commented On

Chatterbox:
Copyright © 2002 - 2024 by Animus Pactum Consulting. All rights reserved. Privacy Information