Suppose we have 10 lines in an x-y plane. The lines are somewhat clustered together, and going more or less in the same direction.

The data I have for these lines is their line equation:

$$y = a + bx$$

I'm wondering how one can come up with an "average line" for the set.

Does it make sense to take the average of all the $a$ values (the y-intercept) and take the average of all the $b$ values (the slope) and use those two together to arrive at an average line equation?

Thoughts and comments appreciated.

  • 2
    $\begingroup$ I'd say that completely depends on what you need the average line for (that is, what you want the average line to tell you), and/or where the original lines come from (indeed, this may decide whether the concept of an average line is actually meaningful in your context). $\endgroup$
    – celtschk
    Apr 22, 2014 at 9:06

1 Answer 1


Say you have lines $y_k(x) = a_k + b_kx$, $1 \leq k \leq n$. If your definition of the average line $y(x)$ is that $$ y(x) = \textrm{Avg } y_k(x) \quad \text{for all $x$,} $$ then indeed setting $$ y(x) = a + bx \quad \text{ where } a = \textrm{Avg } a_k, b = \textrm{Avg } b_k $$ will do the trick, because $\textrm{Avg }$ is linear, and therefore $$ \textrm{Avg } y_k(x) = \textrm{Avg } \left(a_k + b_kx\right) = \textrm{Avg } a_k + \textrm{Avg } b_kx = \underbrace{\textrm{Avg } a_k}_{=a} + x\,\underbrace{\textrm{Avg } b_k}_{=b} = y(x)\text{.} $$


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .