Hey guys!

There is a formula in my university paper for the covariance which i can find nowhere else and leads me to the wrong result and wrong correlation.

With the other formula i get an acceptable result and a correlation between -1 and 1.

Where is the problem? What am i doing wrong?

Thank you very much!!