0
$\begingroup$

I have 120 samples (Y-values) at the same point, for 45 points (X-values) = 120x45 samples. Will the regression line be the same if it is computed with the mean of every 120 samples as if I would do it for all 120?

I am asking since MATLABs Curve Fit Tool Box do not accept multiple Y-values for the same X-values.

$\endgroup$
  • 1
    $\begingroup$ Coefficients should be the same, but variances will differ (this assumes that all y values are means based on the exact same number of observations. If $n_i$ differs you would have to use a weighted regression). $\endgroup$ – kjetil b halvorsen Jul 31 '17 at 15:41
  • $\begingroup$ Okay, the variance is important to know. Do you have any suggestion how to solve my problem with multiple y-values for same x-values? $\endgroup$ – tompak Jul 31 '17 at 16:01
  • 1
    $\begingroup$ Just repeat the values! instead of having 120 y's for each x, replicate to have 120 x's with the same value. We could make some theoretical formulas, but it isn't worth the effort. Just replicate. $\endgroup$ – kjetil b halvorsen Jul 31 '17 at 16:04
0
$\begingroup$

When we plot the regression line, it only includes the mean value of all the Y-values or we can say the expected value of Y. So you need to take the mean of 120 Y-values corresponding each X-value and then you should plot the regression line. Plotting a line for each of the 120 Y-values corresponding each X-value won't give a regression line.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.