# Expectation/Mean of two variables

Hi! I got a bit lost.
How do we calculate the E(XY)? Obviously it is not the sum of expectations, than what?
The braces are also inconsistent here (they were square before), does it mean something I missed?
Thank you for helping me detangle it!

Hello @Elena_Mordmillovich,

For E(XY), you take each data pointâ€™s X and multiply to its Y, and you do the same for all of the data points. So if you have N data points, you get N multiplication results, and then you add all those results up, and then divide the sum by N.

Sometimes we use \mathbb{E}[X], but sometimes people use \mathbb{E}(X), and sometimes people even use \mathbb{E}X, but they mean the same thing.

Cheers,
Raymond

Thank you, Raymond!
It means, in this case all numbers (those expectations on the slide) are just given to us for the sake of illustration of the covariance. We couldnâ€™t calculate them, right? For that we would need all the points and their count, which we didâ€™t have. Thatâ€™s what made me stumble. I thought I missing some extra hint or connection.

Hello @Elena_Mordmillovich,

Itâ€™s right that we cannot calculate E(XY) just from the numbers on that slide. And yes, to calculate it, we need to know the corodinates of all the data points.

Cheers,
Raymond

1 Like