I want to fit a TGraph object and I want to use an inverse variance weighting. How can I give a certain weight to an individual point in a TGraph object and what input do I need to give to the Fit() expression?
I am not sure if this solves the problem. Essentially, I have data points with large errors and I would like these points to carry less weight compared to points with smaller errors. I don’t quite see how this is done in fitLinear.C! I was hoping to find more like a function that works like:
graph->SetPointWeight(I, weight[i]);
where weight[I] could be defined as
double weight[i] = 1.0/ pow(err_y[i],2);
where of course err_y corresponds to the errors of the datapoint i.