1

I am writing a program that is supposed to do the linear regression of the union of two data sets, s1 and s2. I thought that if I could compute the variance and covariance of (s1 U s2) I would have the linear regression. I only have the running data for the s1 and s2. What I mean is that for each set I only have:

size , meanx , meany , variancex , covariancexy

Mean of (s1 U s2) is easy. I found a formula for calculating the variance of (s1 U s2)using the variances of the sebsets. But I can't find anything for covariance of (s1 U s2) using the covariances of s1 and s2. Is there a way to do that?

Thanks in advance.

Soroor

  • The recommended solution in wikipedia is assuming that I have all of my data points. But I don't save the data points. I just keep the size, running mean, etc. as per my original post. Thanks so much for your help. – Soroor Ebnesajjad Jan 24 '18 at 04:23

0 Answers0