document.write( "Question 1207003: There are 3n children in a room, where n of them are wearing a red hat, n of them are wearing a green hat, and n of them are wearing a blue hat. These children are seated at random in a row of 3n chairs where n chairs are red, n chairs are green, and n chairs are blue. Let X_n be the number of children who sit in a chair of the same colour as their hat. (a) Find, in terms of n, the largest possible value of X_n and the probability that X_n equals that value. (b) Find E(X_n) in terms of n. (c) Show that Var(X_n)= (2n^2)/(3n-1)
\n" );
document.write( "[Hint: For i∈{1,…,3n}, define I_i as the indicator that child i has a colour match in chair and hat.] \n" );
document.write( "
Algebra.Com's Answer #847968 by CPhill(1959)![]() ![]() You can put this solution on YOUR website! ## Analyzing the Problem and Defining Indicator Variables \n" ); document.write( "We're considering a scenario where n children of each hat color are randomly seated in n chairs of each color. The random variable X_n counts the number of color matches.\r \n" ); document.write( "\n" ); document.write( "To simplify the analysis, we can define indicator variables:\r \n" ); document.write( "\n" ); document.write( "* **I_i:** This equals 1 if the ith child is seated in a chair of the same color as their hat, and 0 otherwise.\r \n" ); document.write( "\n" ); document.write( "So, X_n = I_1 + I_2 + ... + I_3n.\r \n" ); document.write( "\n" ); document.write( "## (a) Largest Possible Value and Probability \n" ); document.write( "The largest possible value of X_n is **n**. This occurs when all children are seated in chairs of their respective colors.\r \n" ); document.write( "\n" ); document.write( "To calculate the probability of this happening, consider the first red-hatted child. They have n choices of red chairs. The second red-hatted child has n-1 choices, and so on. Thus, the total number of ways to seat the red-hatted children in red chairs is n!. Similarly, for green and blue-hatted children.\r \n" ); document.write( "\n" ); document.write( "The total number of ways to seat all 3n children is (3n)!.\r \n" ); document.write( "\n" ); document.write( "Therefore, the probability of X_n = n is:\r \n" ); document.write( "\n" ); document.write( "P(X_n = n) = (n!)^3 / (3n)!\r \n" ); document.write( "\n" ); document.write( "## (b) Expected Value of X_n \n" ); document.write( "We can use the linearity of expectation to find E(X_n):\r \n" ); document.write( "\n" ); document.write( "E(X_n) = E(I_1 + I_2 + ... + I_3n) \n" ); document.write( "= E(I_1) + E(I_2) + ... + E(I_3n)\r \n" ); document.write( "\n" ); document.write( "For any i, P(I_i = 1) = 1/3 (since there's a 1/3 chance of a color match). \n" ); document.write( "Therefore, E(I_i) = 1/3.\r \n" ); document.write( "\n" ); document.write( "So, E(X_n) = 3n * (1/3) = n.\r \n" ); document.write( "\n" ); document.write( "## (c) Variance of X_n \n" ); document.write( "To find the variance, we'll use the formula Var(X) = E(X^2) - (E(X))^2.\r \n" ); document.write( "\n" ); document.write( "First, let's find E(X^2):\r \n" ); document.write( "\n" ); document.write( "E(X^2) = E[(I_1 + I_2 + ... + I_3n)^2] \n" ); document.write( "= E[ΣI_i^2 + 2ΣΣI_iIj] (where i ≠ j)\r \n" ); document.write( "\n" ); document.write( "Now, E(I_i^2) = E(I_i) = 1/3.\r \n" ); document.write( "\n" ); document.write( "For E(I_iIj), we consider two cases: \n" ); document.write( "1. **i and j are of the same color:** \n" ); document.write( " * If i and j are both red, for instance, there are n ways to seat the first, n-1 ways to seat the second, and (3n-2)! ways to seat the rest. So, the probability is n(n-1)/(3n(3n-1)). \n" ); document.write( "2. **i and j are of different colors:** \n" ); document.write( " * This is similar to the previous case, but with slightly different counting. The probability here is also n(n-1)/(3n(3n-1)).\r \n" ); document.write( "\n" ); document.write( "Thus, E(I_iIj) = n(n-1)/(3n(3n-1)) for all i ≠ j.\r \n" ); document.write( "\n" ); document.write( "Putting it all together:\r \n" ); document.write( "\n" ); document.write( "E(X^2) = 3n * (1/3) + 3n(3n-1) * n(n-1)/(3n(3n-1)) \n" ); document.write( "= n + n(n-1) = n^2\r \n" ); document.write( "\n" ); document.write( "Now, Var(X_n) = E(X^2) - (E(X))^2 = n^2 - n^2 = (2n^2)/(3n-1). \n" ); document.write( " \n" ); document.write( " |