# Weighted average, then adding an intercept term

I am working with a problem where we are calculating the weighted average of DNA modifications. Modified sites are placed into four different groups and the average weight is calculated from there. However, I am then supposed to add an intercept term. I am confused by "intercept term". How would I go about adding an intercept term in this case?

The step is written below: "Next one forms a weighted average of the levels using the reported coefficient values and adds an intercept term."

If understand this correctly, you have 4 groups, which can be viewed as categorical variables. You can select one group and denote it as the 'refence'. A reasonable choice would be the group with the most observations. The estimated average for this group, $$b_0$$, would be your intercept. For the others group estimate their respective averages and the difference between these averages and the intercept. Finally you'll have a model of the form: $$Y = b_0 + b_1D_1X_1 + b_2D_2X_2 + b_3D_3X_3$$, where $$D_1, D_2, D_3$$ are indicator variables equal to $$1$$ if $$X$$ belongs to the respective group (otherwise $$0$$)
• The mean value conditionally that $X$ belongs in the given group. – Akylas Stratigakos Sep 21 '20 at 19:20