# Thread: what is the appropriate approach this time!?

1. ## what is the appropriate approach this time!?

hi all and especially mr_fantastic! remember the post "what is the...". that one was the case of Bayesian theorem. now what about this one?

Consider two players A and B who are accompanying in a sequence of independent games. Probability of A win is p^2, probability of B win is q^2, and probability of equality (neither A nor B wins) is 2pq (p+q=1 and 0<p<1). At each run, the winner gets 2 points and in the situation of equality each player gets 1 point. Suppose X and Y are the total points of relatively A and B after the end of n runs of game. What is COV(X, Y)?
ps. power is denoted by ^.
{hence my absolute unfamiliarity with posting rules!!}

2. Originally Posted by alv
hi all and especially mr_fantastic! remember the post "what is the...". that one was the case of Bayesian theorem. now what about this one?

Consider two players A and B who are accompanying in a sequence of independent games. Probability of A win is p^2, probability of B win is q^2, and probability of equality (neither A nor B wins) is 2pq (p+q=1 and 0<p<1). At each run, the winner gets 2 points and in the situation of equality each player gets 1 point. Suppose X and Y are the total points of relatively A and B after the end of n runs of game. What is COV(X, Y)?

ps. power is denoted by ^.
{hence my absolute unfamiliarity with posting rules!!}
Cov(X, Y) = E(XY) - E(X) E(Y).

Define the following random variables:

$W_A$ is the number of games won by player A. Then $W_A$ ~ Binomial (n, $p^2$).

$W_B$ is the number of games won by player B. Then $W_B$ ~ Binomial (n, $q^2$).

$D_A = D_B$ is the number of games drawn by both players.

Note that:

1. $W_A + W_B + D_A = n$.

2. The joint distribution of $W_A$, $W_B$ and $D_A$ is multinomial.

From 1:

$X = 2W_A + D_A = W_A - W_B + n$.

$Y = 2W_B + D_B = W_B - W_A + n$.

Note that:

3. $X + Y = 2n \Rightarrow (X + Y)^2 = 4n^2 \Rightarrow X^2 + 2XY + Y^2 = 4n^2$.

$E(X) = E(W_A - W_B + n) = E(W_A) - E(W_B) + n = np^2 - nq^2 + n = 2np$.

$E(Y) = E(W_B - W_A + n) = E(W_B) - E(W_A) + n = 2nq$.

From 3: $E(XY) = 2n^2 - \frac{1}{2} E(X^2) - \frac{1}{2} E(Y^2)$.

But $E(X^2) = Var(X) + [E(X)]^2$ and:

* $Var(X) = Var(W_A - W_B + n) = Var(W_A) + Var(W_B) + 2 Cov(W_A, W_B)$.

* $Cov(W_A, W_B) = -np^2 q^2$ (this is a standard result following from 2).

etc. (the details are left left for you).

3. ## thanks but a general question?

by the way where can i find help on how to use math tags like what you guys do? it's really hard to explain the problems in plain text...those math tags are necessary. i have no information on how to use those tags...where can i look?

4. Hello
Originally Posted by alv
by the way where can i find help on how to use math tags like what you guys do? it's really hard to explain the problems in plain text...those math tags are necessary. i have no information on how to use those tags...where can i look?
Take a look at this thread in the Latex Help forum.

5. Originally Posted by mr fantastic
Cov(X, Y) = E(XY) - E(X) E(Y).

Define the following random variables:

$W_A$ is the number of games won by player A. Then $W_A$ ~ Binomial (n, $p^2$).

$W_B$ is the number of games won by player B. Then $W_B$ ~ Binomial (n, $q^2$).

$D_A = D_B$ is the number of games drawn by both players.

Note that:

1. $W_A + W_B + D_A = n$.

2. The joint distribution of $W_A$, $W_B$ and $D_A$ is multinomial.

From 1:

$X = 2W_A + D_A = W_A - W_B + n$.

$Y = 2W_B + D_B = W_B - W_A + n$.

Note that:

3. $X + Y = 2n$

[snip]
A shorter approach might now be to note that $X + Y = 2n \Rightarrow Var(X + Y) = Var(2n) = 0$.

But $Var(X + Y) = Var(X) + Var(Y) + 2 Cov(X, Y)$.

Therefore:

$Var(X) + Var(Y) + 2 Cov(X, Y) = 0$

$\Rightarrow Cov(X, Y) = -\frac{1}{2} (Var(X) + Var(Y))$.

Now note that:

(a) $Var(X) = Var(W_A - W_B + n) = Var(W_A) + Var(W_B) + 2 Cov(W_A, W_B)$

$= n p^2 (1 - p^2) + n q^2 (1 - q^2) + 2 Cov(W_A, W_B)$

$= {\color{red}2npq(1-pq)} + 2 Cov(W_A, W_B)$.

(You might want to check the simplification in red).

(b) $Var(Y) = Var(W_B - W_A + n) = Var(W_A) + Var(W_B) + 2 Cov(W_A, W_B) = Var(X)$.

(c) $Cov(W_A, W_B) = -np^2 q^2$ (this is a standard result following from the fact that the joint distribution of $W_A$, $W_B$ and $D_A$ is multinomial).

Therefore Cov(X, Y) = .........

6. Originally Posted by mr fantastic
Cov(X, Y) = E(XY) - E(X) E(Y).

Define the following random variables:

$W_A$ is the number of games won by player A. Then $W_A$ ~ Binomial (n, $p^2$).

$W_B$ is the number of games won by player B. Then $W_B$ ~ Binomial (n, $q^2$).

$D_A = D_B$ is the number of games drawn by both players.

Note that:

1. $W_A + W_B + D_A = n$.

2. The joint distribution of $W_A$, $W_B$ and $D_A$ is multinomial.

From 1:

$X = 2W_A + D_A = W_A - W_B + n$.

$Y = 2W_B + D_B = W_B - W_A + n$.

Note that:

3. $X + Y = 2n$
[snip]
One more thought:

Therefore Cov(X, Y) = Cov(X, 2n - X) = .......