This wiki page Simple linear regression has formulas to calculate α and β. Could anyone tell me how to derive the formulas in weighted case?
Think of ordinary least squares (OLS) as a “black box” to minimize
for a data table whose ith row is the tuple (1,xi,yi).
When there are weights, necessarily positive, we can write them as w2i. By definition, weighted least squares minimizes
But that’s exactly what the OLS black box is minimizing when given the data table consisting of the “weighted” tuples (wi,wixi,wiyi). So, applying the OLS formulas to these weighted tuples gives the formulas you seek.