document.write( "Question 1162600: A Box contains 6 white and 2 black balls. Draw two balls without replacement. If X represents number of white balls and Y represents number of black balls drawn. What is the covariance of X and Y? \n" ); document.write( "
Algebra.Com's Answer #854399 by CPhill(2264)\"\" \"About 
You can put this solution on YOUR website!
To find the covariance of $X$ (the number of white balls) and $Y$ (the number of black balls), we first need to understand the relationship between these two variables and their joint distribution.\r
\n" ); document.write( "\n" ); document.write( "### 1. Identify the relationship between $X$ and $Y$
\n" ); document.write( "Since we are drawing a total of $2$ balls and every ball is either white or black, the sum of white balls and black balls must equal the total number of balls drawn:
\n" ); document.write( "$$X + Y = 2$$
\n" ); document.write( "This can be rewritten as:
\n" ); document.write( "$$Y = 2 - X$$\r
\n" ); document.write( "\n" ); document.write( "A key property of covariance is that $Cov(X, a + bX) = b \cdot Var(X)$. In our case, $a = 2$ and $b = -1$. Therefore:
\n" ); document.write( "$$Cov(X, Y) = Cov(X, 2 - X) = -Var(X)$$\r
\n" ); document.write( "\n" ); document.write( "### 2. Find the Probability Distribution of $X$
\n" ); document.write( "$X$ follows a **hypergeometric distribution** because we are drawing without replacement from a finite population.
\n" ); document.write( "* Total balls ($N$) = $8$ (6 white + 2 black)
\n" ); document.write( "* White balls in box ($K$) = $6$
\n" ); document.write( "* Number of balls drawn ($n$) = $2$\r
\n" ); document.write( "\n" ); document.write( "The possible values for $X$ are $0, 1, 2$. We calculate the probabilities using the formula $P(X=k) = \frac{\binom{K}{k}\binom{N-K}{n-k}}{\binom{N}{n}}$:\r
\n" ); document.write( "\n" ); document.write( "* **$P(X=2)$** (Both white): $\frac{\binom{6}{2}\binom{2}{0}}{\binom{8}{2}} = \frac{15 \times 1}{28} = \frac{15}{28}$
\n" ); document.write( "* **$P(X=1)$** (One white, one black): $\frac{\binom{6}{1}\binom{2}{1}}{\binom{8}{2}} = \frac{6 \times 2}{28} = \frac{12}{28}$
\n" ); document.write( "* **$P(X=0)$** (Both black): $\frac{\binom{6}{0}\binom{2}{2}}{\binom{8}{2}} = \frac{1 \times 1}{28} = \frac{1}{28}$\r
\n" ); document.write( "\n" ); document.write( "### 3. Calculate Expectations $E[X]$, $E[Y]$, and $E[XY]$
\n" ); document.write( "**Expected value of $X$ ($E[X]$):**
\n" ); document.write( "$$E[X] = \sum x \cdot P(X=x) = 2\left(\frac{15}{28}\right) + 1\left(\frac{12}{28}\right) + 0\left(\frac{1}{28}\right) = \frac{30 + 12}{28} = \frac{42}{28} = 1.5$$\r
\n" ); document.write( "\n" ); document.write( "**Expected value of $Y$ ($E[Y]$):**
\n" ); document.write( "Since $Y = 2 - X$, then $E[Y] = 2 - E[X] = 2 - 1.5 = 0.5$.\r
\n" ); document.write( "\n" ); document.write( "**Expected value of the product ($E[XY]$):**
\n" ); document.write( "We only have a non-zero product when $X=1$ and $Y=1$:
\n" ); document.write( "$$E[XY] = (1 \times 1) \cdot P(X=1, Y=1) = 1 \cdot \left(\frac{12}{28}\right) = \frac{12}{28} \approx 0.4286$$\r
\n" ); document.write( "\n" ); document.write( "### 4. Calculate the Covariance
\n" ); document.write( "Using the covariance formula $Cov(X, Y) = E[XY] - E[X]E[Y]$:
\n" ); document.write( "$$Cov(X, Y) = \frac{12}{28} - (1.5 \times 0.5)$$
\n" ); document.write( "$$Cov(X, Y) = \frac{12}{28} - 0.75$$
\n" ); document.write( "$$Cov(X, Y) = \frac{12}{28} - \frac{3}{4} = \frac{12}{28} - \frac{21}{28}$$
\n" ); document.write( "$$Cov(X, Y) = -\frac{9}{28}$$\r
\n" ); document.write( "\n" ); document.write( "**Final Answer:**
\n" ); document.write( "The covariance of $X$ and $Y$ is **$-\frac{9}{28}$** (or approximately **$-0.3214$**). \r
\n" ); document.write( "\n" ); document.write( "*(Note: The negative result makes sense because $X$ and $Y$ are perfectly negatively correlated; as the number of white balls increases, the number of black balls must decrease.)*
\n" ); document.write( "
\n" );