Averages in involving multiple discrete variables

Let's go back to the coin game above where $1 if it lands heads and you have to pay $1 if it lands tails. You throw the coin twice. The first thing to consider is a probability distribution involving two variables. We'll choose the first variable $x$ to be the amount won (or lost) in the first flip. The second variable $T$ is the total amount won for both flips. We want to know for example, the probability that you make $1 on the first flip but make $ 0 overall. Generalizing, we want to know $P(x,T)$, the probability of making $x$ $'s on the first flip and $T$ $'s overall.

Let's determine $P(x,T)$. There are 3 possible values of $T$ -2, 0, and 2. There are two possible values of $x$, 1 and -1. There are four possible outcomes for these two flips. So what's $P(-1,-2)$? Well there's only one way of getting that, you have to get tails on both flips. So $P(-1,-2)= 1/4$. Similarly $P(1,2) = 1/4$. How about $P(-1,2)$? Well you can't lose on the first flip and make money on both flips, so $P(-1,2) = 0$. Similarly $P(1,-2) = 0$. How about $P(-1,0)$? There's only one way of getting that, you've got to make $1 on the second flip, so $P(-1,0) = 1/4$. Similarly $P(1,0) = 1/4$. So we've determined the values of this two dimensional probability distribution.

\begin{displaymath}
\begin{tabular}{\vert l\vert ccc\vert}
\multicolumn{4}{c}{P(...
...0&2\\ \hline
-1&1/4&1/4&0\\
1&0&1/4&1/4\\ \hline
\end{tabular}\end{displaymath} (1.25)

Now let's ask for the average value of various quantities. First, what's the average value of $x$? You already should know the answer, but how do you calculate it from here?

\begin{displaymath}
\langle x \rangle = \sum_x \sum_T x P(x,T)
\end{displaymath} (1.26)

Here we're summing over all possible values of $x$ and $T$. To do this sum, we can do the sum over $T$ first.
\begin{displaymath}
\langle x \rangle = \sum_x x \sum_T P(x,T)
\end{displaymath} (1.27)

From the table above, when you do that sum you add up all the entries in each row. Both of these are $1/2$. So
\begin{displaymath}
\langle x \rangle = \sum_x x {1\over 2}= (-1 + 1){1\over 2}= 0
\end{displaymath} (1.28)

as it should be.

Now let's do a more tricky one. What's $\langle xT \rangle$?

\begin{displaymath}
\langle xT \rangle = \sum_x \sum_T xT P(x,T)
\end{displaymath} (1.29)

We'll do this term by term
\begin{displaymath}
\begin{tabular}{\vert l\vert ccc\vert}
\multicolumn{4}{c}{x ...
...1)(2) 0\\
1&(1)(-2)0&(1)(0)/4&(1)(2)1/4\\ \hline
\end{tabular}\end{displaymath} (1.30)

You see the only nonzero entries are on the upper left hand and lower right hand corners. So adding up all these terms, you get
\begin{displaymath}
\langle xT \rangle = 1.
\end{displaymath} (1.31)

Josh Deutsch 2009-03-05