title: Weighted correlation
body: <p>I have two arrays of floats, and want to calculate the weighted correlation, meaning that I want some of my data to have lower weight than others.</p>
  
  <pre><code>      X          Y        w
     2.02382   6.00298   0.43873
     3.94601   6.41983   0.36818
     3.76877   4.55656   0.49836
     3.68307   6.46925   0.95965
     3.09073   4.57723   0.88889
     2.56690   2.70020   0.72812
     3.35469   6.76874   0.26863
     3.88722   5.23205   0.77492
     3.29389   3.50355   0.79567
     3.80725   3.18414   0.82439
  </code></pre>
  
  <p>So, I want correlation between X, and Y regarding the weights w.
  My problem is mainly a theory problem, but at the end I want to implement it in C.</p>