You can compute the slope of linear regression (without weights) by:

cor(x, y) * sd(y) / sd(x)

If we have add weights (w) in here as well - how do you compute the slope then?

  • 1
    $\begingroup$ Basically, you in general form you can use ordinary least squares, and with weights, you can use the weighted form, is this what you ask, or is it if you can use correlations and variances for this? $\endgroup$ – Tim Jul 26 '19 at 17:01
  • $\begingroup$ The duplicate threads were discovered by inspecting the highest-voted relevant hits in the search stats.stackexchange.com/…. Other hits may be of interest, too. $\endgroup$ – whuber Jul 26 '19 at 17:09