Celeb Glow
updates | April 10, 2026

Expectation E(XY) of two dependent variables

$\begingroup$

If X and Y are 2 dependent variables, how does their combined expectation look? For example, if flipping a fair coin n times, with X representing the number of heads and Y representing the number of tails. How would I calculate E[XY], and what's the intuition behind it?

$\endgroup$ 1

1 Answer

$\begingroup$

In your example of coin tosses, you actually have $Y=n-X$. So $E[XY]=E[X(n-X)]= nE[X] - E\left[X^2\right]$.

Since $X\sim \mathrm{Binomial}(n,p)$, where $p$ is the probability of heads on a single coin toss, you can calculate this by using the formula for $E[X]$ and $E\left[X^2\right]$ when $X$ has such distribution. (You can find the formula for $E\left[X^2\right]$ at Calculating the Second Moment of a Binomial Random Variable.)

$\endgroup$ 6

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy