Algebra.Com's Answer #786673 by ikleyn(52858)  You can put this solution on YOUR website! . \n" );
document.write( "In my closet, I have only hats that are green and hats that are blue. If I were to randomly choose two hats from the closet, it is equally probable \n" );
document.write( "that they would be the same colour as it is that they would be different colours. \n" );
document.write( "A friend asks me “What is the probability that if you were to randomly choose two hats from your closet that both hats would be green?” \n" );
document.write( "My response is, “It is equal to the probability that if I instead randomly choose one hat from the closet, \n" );
document.write( "that hat will be blue.” How many blue hats do I have? (Assume the number of hats of each colour is greater than zero)\r \n" );
document.write( " \n" );
document.write( " \n" );
document.write( "\n" );
document.write( "\r\n" );
document.write( "Let G be the number of green hats and B be the number of blue hat.\r\n" );
document.write( "\r\n" );
document.write( "\r\n" );
document.write( "The probability that two randomly chosen hats are both green is P(GG) = .\r\n" );
document.write( "\r\n" );
document.write( "The probability that two randomly chosen hats are both blue is P(BB) = .\r\n" );
document.write( "\r\n" );
document.write( "\r\n" );
document.write( "The probability that two randomly chosen hats are the same color is \r\n" );
document.write( "\r\n" );
document.write( " P(GG) + P(BB) = + .\r\n" );
document.write( "\r\n" );
document.write( "\r\n" );
document.write( "\r\n" );
document.write( "The probability that two randomly chosen hats are of different color is \r\n" );
document.write( "\r\n" );
document.write( " P(GB) + P(BG) = + = .\r\n" );
document.write( "\r\n" );
document.write( "\r\n" );
document.write( "So, your first equation, from the condition, is\r\n" );
document.write( "\r\n" );
document.write( " P(GG) + P(BB) = P(GB) + P(BG), or + = .\r\n" );
document.write( "\r\n" );
document.write( "\r\n" );
document.write( "Canceling common denominators, you get this equation in equivalent form\r\n" );
document.write( "\r\n" );
document.write( " G*(G-1) + B*(B-1) = 2GB. (1)\r\n" );
document.write( "\r\n" );
document.write( "\r\n" );
document.write( "We completed with the first part of the condition, and now start working with the second part.\r\n" );
document.write( "\r\n" );
document.write( "\r\n" );
document.write( "From the second part, you have this equation\r\n" );
document.write( "\r\n" );
document.write( " P(GG) = P(B), or = .\r\n" );
document.write( "\r\n" );
document.write( "\r\n" );
document.write( "After canceling common factors in the denominators, it takes the form\r\n" );
document.write( "\r\n" );
document.write( " = B, or, equivalently, \r\n" );
document.write( "\r\n" );
document.write( " G*(G-1) = B*(G + B - 1) (2)\r\n" );
document.write( "\r\n" );
document.write( "\r\n" );
document.write( "So, now our task is to solve the system of equations (1) and (2).\r\n" );
document.write( "\r\n" );
document.write( "For it, replace G*(G-1) in the left side of (1) by B*(G+B-1), based on (2). You will get then\r\n" );
document.write( "\r\n" );
document.write( " B*(G + B - 1) + B*(B-1) = 2GB.\r\n" );
document.write( "\r\n" );
document.write( "\r\n" );
document.write( "Cancel B in both side\r\n" );
document.write( "\r\n" );
document.write( " G + B - 1 + B - 1 = 2G, or\r\n" );
document.write( "\r\n" );
document.write( " 2B - 2 = G. (3)\r\n" );
document.write( "\r\n" );
document.write( "\r\n" );
document.write( "Based on (3), replace G in (2) by 2B-2. You will get\r\n" );
document.write( "\r\n" );
document.write( " (2B-2)*(2B - 2 -1) = B*((2B-2) + B -1).\r\n" );
document.write( "\r\n" );
document.write( "\r\n" );
document.write( "Simplify it step by step\r\n" );
document.write( "\r\n" );
document.write( " (2B-2)*(2B-3) = B*(3B-3)\r\n" );
document.write( "\r\n" );
document.write( " 4B^2 - 4B - 6B + 6 = 3B^2 - 3B\r\n" );
document.write( "\r\n" );
document.write( " B^2 - 7B + 6 = 0\r\n" );
document.write( "\r\n" );
document.write( " (B-6)*(B+1) = 0\r\n" );
document.write( "\r\n" );
document.write( "\r\n" );
document.write( "Only positive root B = 6 makes sense.\r\n" );
document.write( "\r\n" );
document.write( "\r\n" );
document.write( "ANSWER. 6 blue hats and 2B-2 = 2*6-2 = 10 green hats. \r\n" );
document.write( " \r \n" );
document.write( "\n" );
document.write( "Solved.\r \n" );
document.write( " \n" );
document.write( " \n" );
document.write( "\n" );
document.write( " \n" );
document.write( " |