A die is tossed $n$ times. Find the covariance of the number of one's and the sum of all results.
I started by defining a random variable $X_i$ as $ i=1,\ldots,n$, $X_i=1$ if at the $i$'th toss turned to be $1$ and $X_i=0$ otherwise.
By that I would be able to represent $X$: the number of 1's as $X=\sum_{i=1}^nX_i$ and calculate the expectancy for $X$.
I had trouble deciding which random variable should I define for $Y$: the sum of results.
I could really use any kind of direction, thanks in advance!