Finding covariance of people ordering various items

34 Views Asked by At

At a restaurant, people order a sandwich with probability $p_s$ or a hamburger with probability $p_h$, and they can buy french fries with probability $p_f = 1 - p_s - p_h$. Suppose that N customers eat at the restaurant, each making an independent decision given the above probabilities.

What is the covariance of the number of people ordering a sandwich and the number of people ordering french fries?

I am not sure how to solve this. I believe I should represent these random variables as the sums of "indicators", but I'm not sure how to do this explicitly.

1

There are 1 best solutions below

0
On BEST ANSWER

Let $S_k$ be the indicator variable for person $k$ ordering a sandwich, and $F_k$ the indicator variable for person $k$ ordering french fries.

Then $N_S=\sum_kS_k$ is the number of people who order a sandwich, and $N_F=\sum_kF_k$ is the number of people who order french fries.

Now

\begin{eqnarray*} \operatorname{cov}(N_S,N_F) &=&\left\langle N_SN_F\right\rangle-\left\langle N_S\right\rangle\left\langle N_F\right\rangle\\ &=&\left\langle\sum_jS_j\sum_kF_k\right\rangle-\left\langle\sum_kS_k\right\rangle\left\langle\sum_kF_k\right\rangle\\ &=&\sum_k\left\langle S_kF_k\right\rangle+\sum_{j\ne k}\left\langle S_jF_k\right\rangle-\sum_k\left\langle S_k\right\rangle\sum_k\left\langle F_k\right\rangle\\ &=&N(N-1)p_sp_f-N^2p_sp_f\\ &=&-Np_sp_f\;. \end{eqnarray*}

The first sum is zero since no customer orders both a sandwich and french fries. Each term in the second sum is $p_sp_f$ since the orders for $j\ne k$ are independent.