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