How should I go about doing this correlation problem?

I have an idea of how to do this but I'm not sure if this is the right direction.

A stick of length $1$ is broken into $2$ pieces at a random point. Find the correlation coefficient and the covarience of the pieces.

I let $X$ be the length of the first piece and $Y$ be the length of the second piece, and I have come to conclusion that $P(X=x)=1-y$ and $P(Y=y)=1-x$ but for some reason it doesn't seem right to me. I know I need to find $E(XY)$, $E(X)$, and $E(Y)$ for the covarience but I'm just feeling skeptical about $P(X=x)=1-y$ and $P(Y=y)=1-x$. Did I do this right?

-

We assume that the breakpoint is uniformly distributed on the interval $[0,1]$. I interpret the meaning of the question as follows. Let $X$ be the length of the left piece, and $Y$ the length of the right piece. We want to find the covariance of $X$ and $Y$, and the correlation coefficient of $X$ and $Y$. You undoubtedly know the relevant formulas.

For the covariance of $X$ and $Y$, we will use the simplified formula $$\text{Cov}(X,Y)=E(XY)-E(X)E(Y).$$ The easiest items here are $E(X)$ and $E(Y)$. By symmetry, each is $\dfrac{1}{2}$.

For $E(XY)$, use the fact that $Y=1-X$. So $E(XY)=E(X(1-X))$. This is $E(X-X^2)$. By the linearity of expectation, this is $E(X)-E(X^2)$.

We need $E(X^2)$. This is $\int_0^1 (x^2)(1) \,dx$. I expect you can handle the rest of the calculations.

-
ah yes thats where I went wrong. I was leaving out the expected values $=\frac12$. Not sure how I missed that. Thanks! –  TheHopefulActuary Nov 30 '12 at 3:26

Ask youself: Is the length of the broken piece a continuous or discrete random variable? Also, write one random variable in terms of the other to simplify things.

EDIT: Intuitively you should see that $$\rho(X,1-X) = -1$$ for any r.v. $X$. Which also follows directly from the result: $$\mathrm{Cov}(a+bX,Y) = b\,\mathrm{Cov}(X,Y)$$This hopefully makes sense because correlation measures the "normalized" interaction between two random variables. As $X$ changes by a certain amount, $Y$ changes by the same amount but in the opposite direction (e.g. length of $X$ increases by a quarter of an inch, $Y$ contracts by a quarter of an inch, etc.)

-