Drexel dragonThe Math ForumDonate to the Math Forum

Ask Dr. Math - Questions and Answers from our Archives
Associated Topics || Dr. Math Home || Search Dr. Math

What If You Paint the Balls?

Date: 03/25/2002 at 05:31:17
From: John Midgley
Subject: Probability - what if you *paint* the balls?


You have 800 blue balls in a bag. You take out 35 of them, paint them 
red, and replace them. Do this 23 times and you *might* paint all of 
them - what are the odds [1]? As the number of repetitions increases, 
how can you model the improving odds of painting all the balls?

Alternatively, is there an *intelligent* question I should be asking 
about this scenario?

I'm stuck because:
a) I should have been paying attention when they tried to teach me;
b) The damned things change colour.

Incidentally, if Dr Math had been around before those 240 months 
elapsed, I *might* have passed 'A' level maths (I'm in England).
[1] About the same probability as in the sentence above.

John Midgley

Date: 03/25/2002 at 08:31:50
From: Doctor Anthony
Subject: Re: Probability - what if you *paint* the balls?

We can use a difference equation to represent what is happening.  
Every painting operation covers 35/800 of the total.

Let u(n) be the number that are red after n painting turns.

    800-u(n) will be the number that are still blue.

Then  u(n+1) = u(n) + (35/800)[800-u(n)]

      u(n+1) = u(n)[1 - 35/800] + 35

      u(n+1) = (153/160).u(n) + 35

      u(n+1) - (153/160).u(n) = 35

So we must solve the difference equation to find u(n) in terms of n.

Let u(n) = v(n) + w(n) where v(n) is the complementary function and 
w(n) the particular solution.

The complementary function is   x - 153/160 = 0 giving

      x = 153/160 so C.F. is    v(n) = A.(153/160)^n

For the particular solution we assume

     w(n) = a.n + b  and substituting into the difference equation

   a.(n+1) + b - (153/160)[a.n + b] = 35

   n(a - 153/160) + a + b - (153/160).b = 35 

   n(a - 153/160) + a + (7/160)b = 35

This is an identity, and so terms in n and the constant can be equated 
on both sides of the identity.

 Coefficient of n = 0 so   a = 153/160

 and equating the constant term on both sides gives

       153/160 + (7/160)b = 35

                 (7/160)b = 5447/160

                        b = 5447/7  

adding v(n) and w(n) we get

    u(n) = A.(153/160)^n + (153/160)n + 5447/7

and u(1) = 35 so

      35 = (A+1).(153/160) + 5447/7

  (153/160)(A+1) = -5202/7

             A+1 = -5440/7

               A = -5447/7

    u(n) = (5447/7)[1 - (153/160)^n] + (153/160)n

and if n = 23 this gives

    u(n) = 500.0418 + 21.99375

         =  522.035

So after 23 paintings there will be 522 of the 800 balls painted red.

- Doctor Anthony, The Math Forum
Associated Topics:
College Probability
High School Probability

Search the Dr. Math Library:

Find items containing (put spaces between keywords):
Click only once for faster results:

[ Choose "whole words" when searching for a word like age.]

all keywords, in any order at least one, that exact phrase
parts of words whole words

Submit your own question to Dr. Math

[Privacy Policy] [Terms of Use]

Math Forum Home || Math Library || Quick Reference || Math Forum Search

Ask Dr. MathTM
© 1994- The Math Forum at NCTM. All rights reserved.