Answer the question
In order to leave comments, you need to log in
Why is sum(sum(xy)/sum(x))/n approximately equal to sum(sum(xy))/sum(sum(x))?
Why is sum(sum(xy)/sum(x))/n approximately equal to sum(sum(xy))/sum(sum(x))? X and Y are two-dimensional matrices of size [nxm]
Answer the question
In order to leave comments, you need to log in
There must be some specific properties of the matrix given. Otherwise, it is nifiga approximately equal. For example,
X= {{1, 5}, { 1, 5}}, Y={{5, 1/5}, {5, 1/5}}
on the left it will give: 1/2 (10/2 + 2/10) = 1/2 (5 + 0.2) = 2.7
and on the right: (5+5+1+1)/(1+5+1+5) = 1
In general, it is not even close. By changing the 5 in the matrix above to an arbitrarily large number, you get an arbitrarily large difference.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question