# Covariance question.

Hi,

## Homework Statement

A fair die is rolled n times. X denotes the number of times '1' is obtained. Y denotes the number of times '6' is obtained.
I am first asked to state how X and Y are distributed (marginally) and to find their variance.

## The Attempt at a Solution

Aren't X and Y distributed Binomially, with p = 1/6 and n? I.e. isn't the Variance of each then equal to:
np(1-p) = 5n/36?
Moreover, how may I determine their marginal distribution?
I am not sure and would appreciate any feedback. Thanks!

mfb
Mentor
Aren't X and Y distributed Binomially, with p = 1/6 and n? I.e. isn't the Variance of each then equal to:
np(1-p) = 5n/36?
Right
Moreover, how may I determine their marginal distribution?
Do you know what the marginal distribution is? If yes, where do you get a problem?

I know what a marginal distribution is but I am still not sure how to approach this.
Here is an attempt. Could it be:
(n over x)(n-x over y)/(n over (x+y))?

Ray Vickson
Homework Helper
Dearly Missed
Hi,

## Homework Statement

A fair die is rolled n times. X denotes the number of times '1' is obtained. Y denotes the number of times '6' is obtained.
I am first asked to state how X and Y are distributed (marginally) and to find their variance.

## The Attempt at a Solution

Aren't X and Y distributed Binomially, with p = 1/6 and n? I.e. isn't the Variance of each then equal to:
np(1-p) = 5n/36?
Moreover, how may I determine their marginal distribution?
I am not sure and would appreciate any feedback. Thanks!

You have already told us what are their marginal distributions! Do you mean that you are asked to find their joint distribution?

Last edited:
No, the question is phrased thus:
A) How are X and Y distributed (marginally)? What are their variances?
B) Suppose X_i = 1 if the i-th roll is '1' and 0 otherwise. Y_i = 1 if the j_th roll is '1' and 0 otherwise. Why is Cov(X_i,Y_j)=0 for i different than j? What is Cov(X_i,Y_j)=0 for i=j?
C) What are Cov(X,Y) and RHO_XY?

A) Is the marginal distribution of X and Y then Binom(n,1/6) and Var=5/36?
B) Cov(X_i,Y_i)=E(X_iY_j) - E(X_i)E(Y_i). If i is different than j then E(X_i)E(Y_i)=E(X_i)E(Y_j) as these are two independent events and Cov(X_i,Y_j) would be zero. Is that really why? As i=j, E(X_iY_i)=0 and Cov(X_i,Y_j) = -(n^2)/36. Is that correct?
C) Cov(X,Y) should therefore be -(n^3)/36. Correct?
Isn't then RHO_XY = Cov(X,Y)/SQRT(Var(X)Var(Y))=-(n^2)/5?

Ray Vickson
Homework Helper
Dearly Missed
No, the question is phrased thus:
A) How are X and Y distributed (marginally)? What are their variances?
B) Suppose X_i = 1 if the i-th roll is '1' and 0 otherwise. Y_i = 1 if the j_th roll is '1' and 0 otherwise. Why is Cov(X_i,Y_j)=0 for i different than j? What is Cov(X_i,Y_j)=0 for i=j?
C) What are Cov(X,Y) and RHO_XY?

A) Is the marginal distribution of X and Y then Binom(n,1/6) and Var=5/36?
B) Cov(X_i,Y_i)=E(X_iY_j) - E(X_i)E(Y_i). If i is different than j then E(X_i)E(Y_i)=E(X_i)E(Y_j) as these are two independent events and Cov(X_i,Y_j) would be zero. Is that really why? As i=j, E(X_iY_i)=0 and Cov(X_i,Y_j) = -(n^2)/36. Is that correct?
C) Cov(X,Y) should therefore be -(n^3)/36. Correct?
Isn't then RHO_XY = Cov(X,Y)/SQRT(Var(X)Var(Y))=-(n^2)/5?

There is something wrong with the problem setup: first you refer to X and Y as counting 1s and 6s, but later you refer to X_i and Y_j as both referring to 1s. Are you sure you do not mean that X_i = 1 if toss i is '1' and Y_i = 1 if toss i is '6'? At some point you WILL need both types of indicators because you need to count both 1s and 6s.

X_i is 1 if we get '1' on the ith roll and it is 0 othetwise.
X_j (or Y_j) is 1 if we obtain a '6' on the jth roll and it is 0 otherwise.
I apologise for any previous typos. I am sending this via my mobile.
Is it more comprehensible now?

More importantly, is it clear enough for you to be able to comment on my attempt?

Ray Vickson
Homework Helper
Dearly Missed
More importantly, is it clear enough for you to be able to comment on my attempt?

No: your definition of Y_j is still problematic, especially since you have already defined X_i in a certain way. Look over what you wrote, and think about whether it makes sense.

Xi=1 if we get '1' on the ith roll and Xi=0 otherwise.
Yj=1 if we obtain a '6' on the jth roll and Yj=0 otherwise.
This is the formulation in my textbook. Is it still sloppy? As in that case I truly would have no idea how to render this clearer for you, Ray.

Ray Vickson
Homework Helper
Dearly Missed
Xi=1 if we get '1' on the ith roll and Xi=0 otherwise.
Yj=1 if we obtain a '6' on the jth roll and Yj=0 otherwise.
This is the formulation in my textbook. Is it still sloppy? As in that case I truly would have no idea how to render this clearer for you, Ray.

No, NOW it is not sloppy, but this is not what you wrote before!

So, you need to be able to compute ##E(X_i Y_j )## for both cases ##i = j## and ##i \neq j##.

What is ##E(X_i Y_i)## (the i = j case)?

How would you compute ##E(X_i Y_j)## for ##i \neq j?## Hint: what event must occur in order to have ##X_i Y_j > 0##?

For i=j, E(XiYj) = 0. For i different than j, is E(XiYj)=(n over 2)*(1/6)^2*(5/6)^(n-2)?

Ray Vickson
Homework Helper
Dearly Missed
For i=j, E(XiYj) = 0. For i different than j, is E(XiYj)=(n over 2)*(1/6)^2*(5/6)^(n-2)?

You tell me. How did you get that? Show your work in detail.

Well, if i=j there could only be one possible outcome, either '1' or '6'. Therefore, the probability of both of these happening at once has to be NULL. As these are indicators that is also E(XiYj).
When i≠j, wouldn't E(XiYj) be equal the probability of obtaining '1' on the i-th roll and '6' on the j-th? And isn't that nC2 * (1/6)2(5/6)n-1?

Ray Vickson
Homework Helper
Dearly Missed
Well, if i=j there could only be one possible outcome, either '1' or '6'. Therefore, the probability of both of these happening at once has to be NULL. As these are indicators that is also E(XiYj).
When i≠j, wouldn't E(XiYj) be equal the probability of obtaining '1' on the i-th roll and '6' on the j-th? And isn't that nC2 * (1/6)2(5/6)n-1?

Why should the probability of obtaining '1' on the second toss and '6' on the fifth toss depend on whether we make 100, 200 or 300 tosses? (That is what your answer indicates.)

So is it simply 1/36?

Ray Vickson
Homework Helper
Dearly Missed
So is it simply 1/36?

You tell me.

Hmm, I guess I was mistaken as these are not entirely two independent events. If I get x '1's, that means that I could at most get n-x '6's.
But if that is the case, why couldn't I use the Binomial formula above?

I infer from your silence that either you are busy, or I am way off, or both ;-).

Ray Vickson
Homework Helper
Dearly Missed
I infer from your silence that either you are busy, or I am way off, or both ;-).

It is summer, and the weather is lovely outside. I want to walk my dog and sit outside at the coffee shop. I do not always care to give advice FREE OF CHARGE, especially when it seems that no matter how much advice I give it is never enough!

I will say things one last time: assuming the successive tosses of the die are independent, the different X_i (i=1,...,n) are mutually independent, as are the different Y_i. Furthermore, for i≠j the random variables X_i and Y_j are independent; however, X_i and Y_i are dependent (because if one of them = 1 the other = 0; however, both could = 0, of course.) Take it from there.

I didn't mean to be critical of your replies in any way. Please take no offense. If my pace of grasping your explanations does not agree with the measures of patience you possess and/or wish to offer, that is perfectly fine. I had no intention to cause you so much hassle. Please note, however, that this is partly what forums are for - discussing things FREE OF CHARGE. Exchanging ideas and notions and receiving feedback, FREE OF CHARGE. No one is forcing you to write back, Ray, if it is too much of a nuisance to you (in my case, i.e.).
Now, regarding my problem, if for i different than j, Xi and Yj are two independent events, then I do not know why the expectation would not be E[XiYj] = 1/36, therefore E[XY] = (1/36)*(n/2) = n/72.