Hi，

Please tell me the detailed steps for the eighth question of Week 2 - Summative Quiz, my calculations are very different

Thanks

Hi，

Please tell me the detailed steps for the eighth question of Week 2 - Summative Quiz, my calculations are very different

Thanks

cov(x,y) = expval(x*y)-expval(x)*expval(y)

You’re given the probabilities for each combination of x and y.

For expval(x), calculate the sum of each probability multiplied by the appropriate x value

For expval(y), calculate the sum of each probability multiplied by the appropriate y value

For expval(x*y), calculate the sum of each probability multiplied by x*y for the appropriate x and y values

For example, the probability of x=1,y=0 is 0.1, so this term in you sum will be:

0.1 * 1 = 0.1 for expval(x)

0.1 * 0 = 0 for expval(y)

0.1 * 1 * 0 = 0 for expval(x*y)

Thanks for replying and I have corret the answer.