SOLUTION: 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

Algebra.Com
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)
[Hint: For i∈{1,…,3n}, define I_i as the indicator that child i has a colour match in chair and hat.]

Answer by CPhill(1959)   (Show Source): You can put this solution on YOUR website!
## Analyzing the Problem and Defining Indicator Variables
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.
To simplify the analysis, we can define indicator variables:
* **I_i:** This equals 1 if the ith child is seated in a chair of the same color as their hat, and 0 otherwise.
So, X_n = I_1 + I_2 + ... + I_3n.
## (a) Largest Possible Value and Probability
The largest possible value of X_n is **n**. This occurs when all children are seated in chairs of their respective colors.
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.
The total number of ways to seat all 3n children is (3n)!.
Therefore, the probability of X_n = n is:
P(X_n = n) = (n!)^3 / (3n)!
## (b) Expected Value of X_n
We can use the linearity of expectation to find E(X_n):
E(X_n) = E(I_1 + I_2 + ... + I_3n)
= E(I_1) + E(I_2) + ... + E(I_3n)
For any i, P(I_i = 1) = 1/3 (since there's a 1/3 chance of a color match).
Therefore, E(I_i) = 1/3.
So, E(X_n) = 3n * (1/3) = n.
## (c) Variance of X_n
To find the variance, we'll use the formula Var(X) = E(X^2) - (E(X))^2.
First, let's find E(X^2):
E(X^2) = E[(I_1 + I_2 + ... + I_3n)^2]
= E[ΣI_i^2 + 2ΣΣI_iIj] (where i ≠ j)
Now, E(I_i^2) = E(I_i) = 1/3.
For E(I_iIj), we consider two cases:
1. **i and j are of the same color:**
* 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)).
2. **i and j are of different colors:**
* This is similar to the previous case, but with slightly different counting. The probability here is also n(n-1)/(3n(3n-1)).
Thus, E(I_iIj) = n(n-1)/(3n(3n-1)) for all i ≠ j.
Putting it all together:
E(X^2) = 3n * (1/3) + 3n(3n-1) * n(n-1)/(3n(3n-1))
= n + n(n-1) = n^2
Now, Var(X_n) = E(X^2) - (E(X))^2 = n^2 - n^2 = (2n^2)/(3n-1).

RELATED QUESTIONS

there are 20 people in a room. 8 of them are wearing socks and 13 of them are wearing... (answered by stanbon)
Hats in a Bag Zack, Susie and Peter are standing in a line. All are facing in the same... (answered by math_tutor2020,ikleyn)
A hat contains 40 marbles. Of them, 18 are red and 22 are green. If one marble is... (answered by Boreal)
the number of men and women wearing hats at a recent baseball game is recorded. The... (answered by solver91311)
There are 24 students in a class. Each student is wearing either a hat or gym shoes or... (answered by Edwin McCravy)
at the beginning of the baseball game there were 22 more fans wearing the blue hat then... (answered by Boreal)
In a class room, 1/6 of students are wearing blue shirts and 2/3 ate wearing white... (answered by josgarithmetic,ikleyn,MathTherapy)
Alan, Ben and Cal are seated as shown with their eyes closed. A B C ....Cal is sitting (answered by Theo)
A hat contains 34 marbles. Of them, 28 are red and 6 are green. If one marble is randomly (answered by ikleyn)