Question
Every fruit basket leaving a packing line contains exactly 20 pieces of fruit. The number of apples \(A\) varies from basket to basket; every other piece is a pear, so \(P=20-A\) for every basket. Across baskets, the variance of the apple count is known to be 9 fruit².
Without assuming any particular distribution of the apple counts, find \(\operatorname{Cov}(A,P)\) and \(\operatorname{Var}(A-P)\). Are apples and pears independent in this setup? Explain using the fixed basket size rather than inventing a separate random model for pears.
Get hint
Hint 1
The pear count is not a new independent random draw. Express it entirely in terms of the apple count.
Check your answer
Solution
Because the basket total is fixed, \(P=20-A\) holds on every outcome. A constant has zero covariance with any random variable, so
\(\operatorname{Cov}(A,P)=\operatorname{Cov}(A,20-A)=-\operatorname{Var}(A)=\boxed{-9\text{ fruit}^2}\).
The count difference is \(A-P=A-(20-A)=2A-20\). Hence
\(\operatorname{Var}(A-P)=\operatorname{Var}(2A-20)=4\operatorname{Var}(A)=\boxed{36\text{ fruit}^2}\).
As a check using the general difference formula, \(\operatorname{Var}(P)=\operatorname{Var}(A)=9\), so \(\operatorname{Var}(A-P)=9+9-2(-9)=36\). Since \(\operatorname{Var}(A)>0\), \(\operatorname{Corr}(A,P)=-9/(3\cdot3)=-1\). The two counts cannot be independent: knowing the apple count determines the pear count exactly. Treating them as independent would incorrectly produce variance \(18\) for the difference.
Assumptions
Each basket has exactly 20 items, all apples or pears, and \(A\) has variance 9.
There is no additional randomness in the basket total or the pear count once \(A\) is known.
Final Answer
\(\operatorname{Cov}(A,P)=-9\) fruit², \(\operatorname{Var}(A-P)=36\) fruit². They are not independent; their correlation is −1.