How to adjust this table ? Aug 30, 2016

$y = - \frac{9}{10} x + 193$

Explanation: Suppose that the $x$-axis represents age in years and the $y$-axis represents the pulse rate in beats/minute. From the table, we can see that when $x$ increases by a constant amount ($10$), $y$ decreases by a constant amount ($9$). This is a linear relationship between $x$ and $y$.

As we are given a set of data points, we only need the slope $m$ of the equation to represent it in point-slope form :

$y - {y}_{1} = m \left(x - {x}_{1}\right)$

where $\left({x}_{1} , {y}_{1}\right)$ is a point on the graph.

The slope of a linear equation is given by $m = \text{change in y"/"change in x}$. Given two points on the graph $\left({x}_{1} , {y}_{1}\right) , \left({x}_{2} , {y}_{2}\right)$, this translates to $m = \frac{{y}_{2} - {y}_{1}}{{x}_{2} - {x}_{1}}$.

Taking the first two points on the table, we get:

$m = \frac{166 - 175}{30 - 20} = - \frac{9}{10}$

Thus, together with the point $\left(20 , 175\right)$, we get our equation in point slope form:

$y - 175 = - \frac{9}{10} \left(x - 20\right)$

We can also solve for $y$ to put it in slope-intercept form :

$y = - \frac{9}{10} x + 193$

Aug 30, 2016

$y = - 0.9 x + 193$

Explanation:

Given a list of values $\left\{{x}_{k} , {y}_{k}\right\} , k = 1 , 2 , \cdots , n$

a line can be adjusted such that the accumulated deviation error is minimum.

Let the line be given by

$y = a x + b$

then the error at point ${x}_{k}$ is ${e}_{k} = {y}_{k} - \left(a {x}_{k} + b\right)$

The accumulated quadratic error will be given by

$E \left(a , b\right) = {\sum}_{k = 1}^{n} {e}_{k}^{2} = {\sum}_{k = 1}^{n} {\left({y}_{k} - \left(a {x}_{k} + b\right)\right)}^{2}$

$E \left(a , b\right)$ have a minimum for ${a}_{0} , {b}_{0}$ such that

$\frac{\partial E}{\partial a} \left({a}_{0} , {b}_{0}\right) = 0 \to {b}_{0} \sum {x}_{k} + {a}_{0} \sum {x}_{k}^{2} = \sum {x}_{k} {y}_{k}$
$\frac{\partial E}{\partial b} \left({a}_{0} , {b}_{0}\right) = 0 \to n {b}_{0} + {a}_{0} \sum {x}_{k} = \sum {y}_{k}$

solving for ${a}_{0} , {b}_{0}$

${a}_{0} = \frac{\left(\sum {x}_{k}\right) \left(\sum {y}_{k}\right) - n \sum {x}_{k} {y}_{k}}{{\left(\sum {x}_{k}\right)}^{2} - n \sum {x}_{k}^{2}}$
b_0 = ((sum x_k)(sum x_ky_k)-(sum x_k^2)(sum y_k))/((sum x_k)^2-nsum x_k^2

appliying it to the table

$\left\{\left\{20 , 175\right\} , \left\{30 , 166\right\} , \left\{40 , 157\right\} , \left\{50 , 148\right\} , \left\{60 , 139\right\} , \left\{70 , 130\right\}\right\}$

we obtain:

${a}_{0} = - 0.9 , {b}_{0} = 193$

so the adjusting line is

$y = - 0.9 x + 193$