How to calculate straight line into graph having variety of different results

77 Views Asked by At

How to calculate straight line into graph having variety of different results. What I mean for example let say we have this kind of results (measuring persons weight (w) and height (h)):

w1 = 100 and h1 = 180,
w2 = 100 and h2 = 200,
w3 = 70 and h3 = 170,
w4 = 65 and h4 = 180.

So here we would get plot graph. And having these results, how to calculate straight line that would best match all these results? Do I need to get an average of these results and then use formula y = mx + b or what?