0:00

I'm going to finish off this module now that we have been exposed to

Â different sorts of models, the uses of models, the modeling process.

Â We have been exposed to the terminology of models.

Â And now I want to take a little bit time to talk about this key

Â mathematical functions that you really do need to be familiar with,

Â if you're going to be successful at making quantitative models.

Â So, it's not as if you have to have a PhD in mathematics at this point

Â to be a useful modeller.

Â I would never claim that, but you do have to have some facility

Â with what I would think of as the building blocks of quantitative models.

Â So here are the four functions that I think you have to be comfortable with,

Â and I'll explain, as I go through each of the four functions,

Â what is so important about each one?

Â And I'm going to try and characterize them in a way that lends itself

Â to thinking about quantitative models.

Â So here are the four functions.

Â We're going to talk about linear functions.

Â Those are straight lines.

Â We're going to talk about the power functions things like quadratics, cubics.

Â We'll talk about the exponential function and we'll talk about the log function

Â which is formerly the inverse of the exponential function.

Â So let's have a look at these functions in turn now.

Â 2:07

So here's the equation for the straight line now.

Â We're writing it as y = mx + b, x would be the input to the model and

Â y would be the output, and the two coefficients or parameters,

Â are b, so it's at the intercept, an m, the slope.

Â Now, here's the essential characteristic of a straight line.

Â It is that the slope is constant.

Â Wherever you look on the graph, for any value of

Â x the slope of the graph of that value is always the same.

Â It's always m.

Â So as x changes by one unit y goes up by m units regardless of the value of x.

Â Now, you have to ask yourself, when you're modeling, whether or

Â not that assumption makes sense.

Â Linear functions are the simplest functions that are out there.

Â So they're often chosen for models.

Â It doesn't necessarily mean that they're going to be right.

Â And so to use a linear function is to think carefully about whether or

Â not this constant slope implication of a line is reasonable in practice.

Â 3:23

So let's take of an example here and we'll consider whether or

Â not a linear function will be reasonable.

Â Let's consider your salary as the y variable

Â over time as you progress to your career.

Â So x will be time or how long you'll be working for and y is your salary.

Â Do you think a linear assumption there is going to be reasonable.

Â And what would it imply?

Â So a straight line implies that the slope is constant that mean's for

Â every one unit change in x the change in y is always the same.

Â So in the context of the example.

Â You progressing through your career and your salary increasing.

Â If we used a straight line to model that, x is year, y is salary.

Â It would be implying that your salary or

Â pay rise was the same every year all the way through your career.

Â And you'd have to ask yourself well does that seem to be a realistic model for

Â what is going on?

Â I actually don't think it would be a realistic model because I think at

Â the beginning of your career salaries tend to go up faster and

Â then much much later on in your career things then turn level off.

Â And so that would be a sort of relationship that wouldn't necessarily

Â lend itself to a linear function.

Â So I don't want to beat up on the linear functions.

Â I don't want to say they're not going to be useful matter of fact incredibly useful

Â but you shouldn't be using one without asking yourself the critical question is

Â it reasonable to expect this business process to exhibit linearity.

Â And you say you think of the word reasonable by the implication

Â does it appear that constant slope is viable in this situation?

Â So that's the linear function.

Â The next function we're going to talk about is the power function, and

Â I'm showing you here a graph that displays various power functions.

Â Now we write the power function as y=x to the power m.

Â And x to the power m essentially means is we modify x by itself m times.

Â 7:28

Language that we use for the power function we will often term x the base and

Â m the exponent.

Â Now here comes the essential characteristic of the power function.

Â Just as the essential characteristic of the straight line was that its

Â slope was constant, there's something constant in a power function but

Â it's not the slope anymore, here's what it is.

Â If x changes by 1%,

Â not one unit anymore, but 1%,

Â then y is going to change by approximately m%.

Â So, the m in the exponent of the power function is

Â relating percent change in x to percent change in y.

Â And it's important that the word here is, I do have approximate in here,

Â it is approximate.

Â But it's a good approximation for small percent changes.

Â And so the key characteristic of a power function is that

Â it relates percent change in x to percent change in y,

Â with the statement that percent change is constant.

Â So if I have x equal to 100 and I go up by 1%,

Â then y is going to change by exactly the same percentage as if I had x equal

Â to 200, and then took x up by 1% from 200.

Â So it's a idea of this percent change, this proportionality being constant.

Â Percent change in x to percent change in y is constant.

Â 9:53

with various versions of the exponential function on here.

Â They're all exponential functions but they differ in their rate of growth, and

Â some of them are growing, and some of them are decreasing.

Â So we often talk about exponential growth, for an increasing process, and

Â exponential decay, for a decreasing process.

Â The exponential function can capture both of these.

Â The way it does it, formulaically, is we'll think of y = e to the power mx.

Â Now, in this equation e is standing for a very, very special number,

Â that number is a mathematical constant that is approximately 2.71828.

Â And so rather than writing this number that technically has an infinite number of

Â decimals associated with it, we just call it e.

Â And so that's the base here and we're raising that number to the power mx.

Â And why this is different from the power function,

Â we think of it as different is where the x is.

Â Here it's in the exponent not the base.

Â For the power function x was sitting in the base,

Â now it's up there in the exponent.

Â So, we're letting the exponent vary this time around.

Â And what's going to happen is that as you have different values for m,

Â so you're going to get different relationships.

Â And on this slide of the exponential function, I put in some different values

Â for m, the pink curve is m = -1, that's an exponential decay.

Â If we take m to -3, then we decay more rapidly,

Â you see the green curve is beneath the pink one.

Â If we have m = 0.5, we've got an increasing exponential here,

Â and if we have m = 1, because 1 is bigger than 0.5,

Â where that's the purple graph we're increasing faster.

Â So those are exponential functions and

Â that was what I had been using to model the epidemic if you remember.

Â 11:52

Now some facts about or the essential characteristic about the exponential

Â function is that the rate of change of y is proportional to y itself.

Â And what that tells you is that there's an interpretation in the background here

Â of m for small values, again these are approximations for these interpretations.

Â So let's say m is a small number, for example, between -0.2 and 0.2.

Â Then what's going to come out of the exponential function is the idea that for

Â every one-unit change in x,

Â there's going to be an approximate 100m% proportionate change in y.

Â So what you're seeing in the exponential function, and

Â it's differing from the power function,

Â is now we're talking about absolute change in x being associated with percent, or

Â proportionate change in y, and we're claiming that that is a constant.

Â You go back to the power function, we were looking at percent change in x,

Â relating to percent change in y through the constant m.

Â And if we go back to the linear function, we were seeing absolute change

Â in x being related to absolute change in y through the constant m.

Â So.these different functions that we're looking at are capturing how

Â we're thinking about x and y changing.

Â Are we thinking about them changing in an absolute sense, or

Â are we thinking about them changing in a relative sense.

Â So just going back to this interpretation here of the constant m in

Â the exponential function, we can say for example if m = to 0.05, then

Â a one-unit increase in x is associated with an approximate 5% increase in y.

Â And that 5% is constant, is doesn't matter or the value of x.

Â So every time x goes up by one unit, y increases approximately

Â by another 5%, a relative or proportionate change.

Â So once again the exponential function lets us understand

Â how absolute changes in x are related to relative changes in y.

Â One more to go and that's the log function.

Â This is the log transformation.

Â It's probably the most commonly used transformation in quantitative modeling.

Â We're not looking at the raw data then often times we're looking at

Â the log transform of the data and this is what a log curve looks like.

Â It's an increasing function but

Â the feature is that it's increasing at a decreasing rate.

Â So the log function is extremely useful

Â when it comes to modeling processes that exhibit diminishing returns to scale.

Â So diminishing returns to scale, says we're putting more into the process.

Â But each time we put an extra thing into the process, yeah,

Â we get more out but not as much as we used to.

Â And so you might think of diminishing returns to scale as you've

Â cooked a big meal at Thanksgiving and it needs to be cleaned up.

Â Now if you're doing the clean up by yourself, that takes quite a while.

Â If you have one person help you, it's probably going to be a bit faster,

Â and maybe you had two people help you, it's going to be even faster.

Â But if you go up to ten people in the kitchen all trying to help you clear up

Â that meal, at some point people start getting in the way of one another.

Â And the benefits of those incremental people coming in to help you clear up,

Â really fall away quite quickly.

Â And so that's an idea of diminishing returns to scale.

Â From a mathematical process point of view,

Â we think about the log function as increasing but at a decreasing rate.

Â Now, as I said, all of these functions that I'm introducing have essential

Â characteristics.

Â And the essential characteristic of the log function is that a constant

Â proportionate change in x is associated with the same absolute change in y.

Â So notice how that's the flip side of the exponential function?

Â The exponential function had absolute changes in x being

Â related to relative changes in y.

Â The log function is doing it the other way around.

Â We're talking about Proportionate changes in x being associated with the same

Â absolutely changing y.

Â Again, when you get to the stage of doing modeling and

Â you're thinking about the business process, you need to be thinking about

Â these ideas as you choose your model functional representation of the process.

Â How do you think things are changing?

Â Do you think it's absolute change in x being related to absolute change in y

Â as a constant?

Â Or do you think it's relative change in x to relative change in y.

Â You think it's relative change in x to absolute change in y or

Â absolute change in x to relative change in y?

Â And here in the log function, again the essential characteristic that constant

Â proportionate changes in x are associated with the same absolute change in y.

Â If you think your business process looks like that then the log function

Â is a good candidate for a model.

Â 17:19

all have exactly the same height but the length of the step is different.

Â So we start off on the bottom left hand side of this plot

Â by going from one-eighth to a quarter.

Â That's a doubling.

Â And when we do that, we take a step up.

Â Then we double again, we go from a quarter to a half.

Â When we do that, the function steps up, but

Â it steps up by exactly the same amount.

Â Then we double again.

Â We go from point five to one, the log function increases but by exactly the same

Â amount as when we went from a quarter to a half and an eighth to a quarter.

Â And finally, the last step on these stairs here, is another doubling from one to two,

Â and you can see that the height of the step is exactly the same again.

Â So the height of the step is constant.

Â It's the length of the step that is varying and the way,

Â the one that I've chosen here is a doubling from each period to the next.

Â So If you think that relative changes in

Â x are being associated with absolute changes in y,

Â the same constant absolute change in y, then you're really saying,

Â I think that there's some kind of log relationship in the background here.

Â So that's log function, and here are some facts about the log function.

Â 18:40

The way that we write it is log, L O G, but there is a subscript B which

Â is called the base of the logarithm, there are lots of bases out there.

Â The only base that I'm going to be using in this course

Â is the very special base, where we actually have the base as the number e.

Â And that's called the natural log.

Â And I choose to use that one because the interpretations

Â of models with natural logs tend to be a little easier,

Â these percent changes that I was talking about before.

Â Now, it is the case that the log is

Â formally known as the inverse it undoes the exponential function.

Â And so the log of e to the x = x itself.

Â And e to the power log of x = x too.

Â So you can see that log and the undoing and

Â the exponential function are undoing one another.

Â