Okay. So to recap some mathematical equations,

how to come up with a formula that

describes this line in the first place.

So we have a line describing

the relationship between height and weight here.

In general terms, a line in

two dimensions is going to be given by the formula,

y equals mx plus b where y is your y-axis here or weight,

x is your x-axis or height.

M then is going to be what's called a slope

or gradient term which

measures how much does

the y value change as the x value changes,

and b is what's called an intercept.

Essentially that measures what is the value of

y going to be when x is equal to zero?

In other words, where does

the line intercepts the y-axis?

Okay. So that's a line in general terms.

In a specific case, we would be saying that weight,

the y-axis, is equal to m times height plus b.

So m measures how much

weight changes for each unit change of height,

and b, the intercept,

essentially measures what would

the weight be if the height is zero.

Of course that's impossible,

but still the model

assumes we can extrapolate

these values right down to zero right up to infinity.

Okay. So that's just line in two dimensions.

Of course, we can do this more generally

for as many dimensions as we'd like.

But we have a model of height, weight,

and age and our observations are actually triples of

these three different values and we have now

a 3D scatter plot hardest to draw.

Well, we can still imagine fitting a line that

describes the relationship between

these points in three dimensions.

Okay. So here we would say the weight is equal to

m1 times height plus m2 times age plus b,

which will have a single intercept but we now have

two slope or gradient parameters

saying how does weight change as a function of

height and how does it change as a function of age?

Well, again in more general terms and you can

do this to any number of dimensions,

we would say that y is equal to

m1 times x1 plus m2 times x2

plus m3 times x3 and so on and so forth plus b.