document.write( "Question 1021467: A bag contains 100 pieces of candy. More than 50 are cherry, the rest are grape. 2 pieces are picked simultaneously. The probability of drawing two pieces of the same flavor is the same as the probability of drawing 2 pieces of different flavors. How many cherry flavored pieces are there? \n" ); document.write( "
Algebra.Com's Answer #637228 by Fombitz(32388)\"\" \"About 
You can put this solution on YOUR website!
Let's say there are \"X\" cherry candies.
\n" ); document.write( "Then there are \"100-X\" grape candies.
\n" ); document.write( "The probability of choosing CC or GG is,
\n" ); document.write( "\"P=P%28CC%29%2BP%28GG%29\"
\n" ); document.write( "\"P=%28%28X%29%2F100%29%28%28X-1%29%2F99%29%2B%28%28100-X%29%2F100%29%28%2899-X%29%2F99%29%29\"
\n" ); document.write( "\"P=%28X%28X-1%29%2B%28100-X%29%2899-X%29%29%2F9900\"\r
\n" ); document.write( "\n" ); document.write( "The probability of choosing CG or GC is,
\n" ); document.write( "\"P=P%28CG%29%2BP%28GC%29\"
\n" ); document.write( "\"P=%28X%2F100%29%28%28100-X%29%2F99%29%2B%28100-X%29%2F100%29%28X%2F99%29\"
\n" ); document.write( "\"P=%282X%28100-X%29%29%2F9900\"
\n" ); document.write( "So then make them equal to each other,
\n" ); document.write( "\"X%28X-1%29%2B%28100-X%29%2899-X%29=2X%28100-X%29\"
\n" ); document.write( "\"X%5E2-X%2B9900-199X%2BX%5E2=200X-2X%5E2\"
\n" ); document.write( "\"4X%5E2-400X%2B9900=0\"
\n" ); document.write( "\"X%5E2-100X%2B2475=0\"
\n" ); document.write( "\"%28X-55%29%28X-45%29=0\"
\n" ); document.write( "Two solutions but the question stipulated \"X%3E50\"
\n" ); document.write( "So then,
\n" ); document.write( "\"X=55\" <--- Cherry
\n" ); document.write( "\"100-X=45\" <--- Grape
\n" ); document.write( "
\n" ); document.write( "
\n" );