Weighted Mean Before or After Linear Fitting?

18 Views Asked by At

When given multiple sets (corresponding to multiple trials in an experiment) of coordinates with their associated ordinate uncertainties, with the goal of linearly fitting the data being to find the slope, is it better to take the weighted means of the y-values before linearly fitting these mean values to the x-values, or to first take a linear fit for each trial and to take the weighted mean of the slopes?