<disclaimer> IMNAM (I Am Not A Mathematician), but this is my understanding the problem (OT, by the way:). Maybe some maths guru will come along and prove me wrong.</disclaimer>

You draw your first two balls. These are either (a) different or (b) identical.

(a) If they are different (say 23 and 59), your odds of drawing one of these numbers of of the third bag are 2/100, or 1/50, or 0.02. Say you draw the 23. You must then draw the 59 from the fourth bag, for which your odds are obviously 1/100, or 0.01. So if (a) is true, your total odds are 0.01 * 0.02 = 0.0002 (or 1/5000).

(b) However, there is a possibility (1/100, or 0.01) that your first two balls will be identical. In that case, you have only a 1/100 chance of drawing a third identical ball, and if you should succeed there, you would again have a 1/100 chance of drawing a fourth identical ball. So if (b) is true, your total odds are 0.01 * 0.01 = 0.0001 (or 1/10000).

Now, the chances of (b) being true are 0.01 (1/100), while the chances of (a) being true are 0.99 (99/100). So your total odds are:

0.01 * 0.0001 + 0.99 * 0.0002 = 0.00000001 + 0.000198 = 0.00019801

Update: Changed order of (a) and (b) in second paragraph to match the rest of the text.


In reply to Re: Math help by Not_a_Number
in thread Math help by Anonymous Monk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.