Covariance |
Solution:
1. Request n
2. Determine Covariance
2.1 sumX
2.2 sumY
2.3 count = 1
2.4 covariance = 0
2.5 sumProduct = 0
2.6 count = count + 1
2.7 Request Pair X, Y
2.8 sumProduct = sumProduct + (X * Y)
2.9 sumX = sumX + X
2.10 sumY = sumY + Y
2.11 Repeat 2.6 - 2.10 until count <= n
2.12 covariance = sumProduct - ((sumX + sumY) / (n)) / (n - 1)
3. Display covariance
2. Determine Covariance
2.1 sumX
2.2 sumY
2.3 count = 1
2.4 covariance = 0
2.5 sumProduct = 0
2.6 count = count + 1
2.7 Request Pair X, Y
2.8 sumProduct = sumProduct + (X * Y)
2.9 sumX = sumX + X
2.10 sumY = sumY + Y
2.11 Repeat 2.6 - 2.10 until count <= n
2.12 covariance = sumProduct - ((sumX + sumY) / (n)) / (n - 1)
3. Display covariance
And that is it.
SHARE THIS POST WITH YOUR FRIENDS...::
Tweet
0 comments:
Leave a Reply