Effective problem solving and decision making
Influencing People
Understanding research methods
Get Organized: How to be a Together Teacher
Managing Your Money: MBA Insights for Undergraduates: learning on 17/12/2016
Đây là một khoá học thú vị, không quá khó về quản lý tài chính cá nhân. Ta cần kiếm tiền từ nhiều nguồn: kiếm từ lương, gửi tiết kiệm, đầu tư vào một lĩnh vực kinh doanh. Ta không nên tiêu xài số tiền hiện có một cách lãng phí vì ta cần có một số tiền cho những trường hợp bất trắc, hay khi ta cần đầu từ vào một dự án lớn (có thể kiếm được nhiều tiền). Ta phải có kế hoach tài chính khôn ngoan để luôn có được một cuộc sống thoải mái cho hiện tại và tương lai.
Khoá học này nói rõ hơn về thẻ ATM (debit card) và thẻ tín dụng (credit card). Thẻ ATM dùng để chi tiêu các khoản tiền nhỏ, cho cuộc sống hàng ngày. Ta không thể tiêu tiền nhiều hơn số hiện có trong tài khoản nên ta sẽ không bao giờ phải nợ. Ta có thể dễ dàng theo dõi lịch sử giao dịch của thẻ để có thể điều chỉnh chi tiêu khi cần thiết.
Thẻ tín dụng có thể xem là thẻ nợ, cho phép người dùng tiêu tiền của ngân hàng, và trả lãi và gốc trong một thời hạn nào đó. Thẻ tín dụng có thể giúp người dùng chi tiêu những khoản tiền lớn, cấp bách. Người dùng có thể trả nợ sau. Người có lịch sử trả nợ tốt (đúng hạn) thì có chỉ số tín nợ cao, sẽ được vay với lãi suất thấp hơn.
Fundamentals of Quantitative Modeling: mô hình toán học
Course introduction
One of things that you're going to get out of the course is exposure to the language of modeling. There are terms that people who fit models tend to throw around a lot and you want to understand those terms, you want to have seen those terms used. By doing that, you're going to just be much more comfortable as a participant in a group of people who are going through a quantitative modelling activity. I'm going to show you a variety of models that I used in the business setting and how those models are applied in practice. So you're going to get exposure to the sorts of models that people use. Of course, as modeling is a huge, huge topic. There are so many models out there, I can't show you everything, but I'll show you some of the important ones.
We're going to discuss the process of modeling. Modeling tends not to be a linear process in the sense that you start, getting something in the middle and then you end. Modeling tends to be a much more iterative process. As you build a model, you look at it's performance, you're perhaps not happy with the performance, so you need to go back and revisit some of the assumptions of the model, the formulation, et cetera. And so we're going to go through the modeling process, as well.
As you move on to create your own models, there's a big question that immediately occurs is which model should I use? And to help us think through that question, I'm going to talk about some of the characteristics of the models and you need to think about the characteristics of the process you're trying to model and map the characteristic of the business into the characteristics of the model. So at the end of this module, we're going to talk about some characteristics of some key mathematical functions that are used in modeling. Unless we talk about those key characteristics, one needs to think about how they map back to the characteristics of the business process that you're interested in. We're going to talk about the value and the limitations of quantitative models, as well. So, what sorts of questions are they really good at answering? And what sorts of things would give you cause for concern in terms of a applying the model itself? So it's very important to understand the limitations of models and one of the common misconceptions, I believe is that many people think models can do more than they can actually do. They seem to think that they're a panacea, that they can answer all questions. And so understanding their limitations is very, very important. And ultimately, this course is going to provide a set of foundational material for the other courses in the specialization.
In terms of resources that are used in the specialization and this course. There is software and in particular, Excel is used, Microsoft Excel for implementing some of the models, along with its analog at Google sheets. So those are implementation environments. In terms of the graphics that are present in the slides that I'm showing you Is language called R, which is an open sourced statistical modeling platform and simulation platform that is very, very helpful. And finally, if you're a little rusty in your math or you just want to revisit some of the mathematical ideas as you go along through the course, then there's an e-book that you might find useful that really distills a set of mathematical ideas down to the essentials. That one needs to do quantitative business modeling. And so the idea their is that the language of quantitative modeling is mathematics and statistic. And if you're not a 100% comfortable with those topics, If you're a little bit rusty, then he has a resource that can help you get up to speed very quickly on those mathematical ideas.
Definition and Uses of Models, Common Functions
Here's the content for the very first module. And we'll start off by looking at some examples, and I discuss the uses of these models.
I'm going to go through the key steps in the modeling process itself. I will start introducing the vocabulary for modeling, and we are going to have a look at the fundamental mathematical functions that you need to be comfortable with if you're going to be successful in implementing these quantitative models. And the four functions that will be appearing through the other modules in this course, the linear or straight line function, the power function with things like quadratics, the exponential function, and the logarithm. So we're going to do a review of those as well.
Now in the business context, the models that we talk about are not physical models, so an architect might well create an architectural model of a building that they plan on creating, it's not that sort of model that we're talking about. What we're talking about, is a formal description of a business process, and so that's what we think of as a model. Now, that description is invariably going to involve a set of mathematical equations and incorporate what we term random variables. We'll discuss this in more detail later on in a later module, exactly what random variables are. But these are the elements typically, of a quantitative model. Now it's important to realize that it's almost always a simplification
of the more complex business process, and so it's an art, as well as a science to achieve a suitable level of simplification. We don't want to over simplify, but on the other hands, if our models are overly complex, they will not be so useful. And, so, one needs to realize that they're not even striving, typically, to be an exact representation of what's going on.
There's always a set of assumptions that underly the model, and it's important to be able to articulate those assumptions, and test the legitimacy of those assumptions. And in terms of implementation, within a business setting you'll find that most of the quantitative models are implemented using a spreadsheet tool like Excel, or Sheets, or potentially a custom computer program that is designed to specifically implement an individual model. So that's what we think about when we talk about a quantitative model in a business setting.
Now, to provide some more concrete examples, I'm going to show you some models and illustrate the sorts questions that they're able to answer.
So one of the things we might be interested in thinking about is, if we were into the jewelery business is how the price of a diamond varies as a function of its weight. We typically have a sense that
heavier diamonds cost more money, but what exactly does that relationship look like? We could use a quantitative model to help us understand the form of that relationship.
Now, if you're into public policy, and you're dealing perhaps with some outbreak of a disease, an epidemic, it's fundamental to be able to forecast, or anticipate the spread of that epidemic over time. Most importantly, you probably want to do some resource planning in the face of that epidemic. How many clinics do we need, how many physicians need to be available within the next six months, etc? And so that sort of question, understanding the spread of an epidemic over time, that's a place a quantitative model can be very useful.
Going to the discipline of economics, one of the most fundamental ideas there, is to look at the association between the price of a product and the demand for that product. As I increase the price of my product, what happens to its demand? And ultimately, what's the best price to charge for my product if I want to maximize my profit? That's a question that we're going to come back too. So there's a relationship we would be interested in modeling. The relationship between price and demand.
If I'm more in the marketing realm, I might be thinking about what's likely to happen in a market as I introduce a new product. What's the uptake of that product likely to be? Can I forecast the total number of units sold? And so understanding how a new product diffuses through a market is an idea that lends itself to quantitative modeling. So, those are some examples in desperate areas, but all can be addressed through the use of a quantitative model.
I'm now going to go through each of the prior examples and illustrate how we might think about doing the modeling itself.
And I've actually chosen these examples, so many of the functions that we're going to see are going to be a pre-cursor to the mathematical functions that we'll talk about later on in this module.
And so, let's go back to thinking about the weight of a diamond, and the price that it's going to go for. And so, often times we think of representing, the model that we have through some graphical approach. And so, in this course I'm going to be using a lot of graphics because they are perhaps the most elegant way to produce, and represent, and share your models with other people. And so what you're looking at here is a graph where on the horizontal axis, we often call that the x-axis, you have the weight of the diamond that is measured in carats, and on the vertical axis you have the expected price of the diamond. And what I'm looking at here is a potential model. It's a very straightforward model, it's what we term a linear model because it's a straight line, and I have the equation associated with the model at the bottom of the slide here. And what I'll do later on is, discuss in much more detail such a linear equation, but right now I just want to show you that given such a model, you would be able to use it to help forecast the expected price of a diamond. And so if, for example, I'm looking at a diamond ring that weighs 0.3 of a carat, all that I need to do is go into this graph, identify the 0.3 on the horizontal axis, go up to the graph itself, the line, read off the value on the vertical axis that we often call the y-axis, and there I have an expected price for a diamond. And so in this particular case, we've got a linear model. It's not clear that that's going to work for all diamonds, but if you have a look at the range of the x-axis here, it's somewhat limited. These are diamonds between 0.15 and 0.35 of a carat, it's the realm that I'm going to apply this model. I'm not saying that it necessarily applies to the diamond that weighs one carat or two carats way outside the range, but it might be reasonable that within this limited range one would see a linear relationship. So that's an example of what we call a linear model.
one of the basic models, at least to get started with, to think about a spread of an epidemic, is what we term an exponential model. And here I have a graph of a exponential function. On the bottom axis we have Week. And on the vertical axis we have the number of cases that have been reported. And notice now that this graph, it's no longer linear, it's what we would determine a nonlinear relationship. It is growing very quickly. We've termed this exponential growth, and it might be more appropriate for the spread of an epidemic in its early phases. Now we would really hope that that exponential graph does not continue on for long, because the thing about these exponential graphs, they're sometimes called hockey sticks, one that refers to them within, in the business context is that they shoot up very, very quickly. And I would not sit here and claim that this would be a reasonable model over a long period of time. But in the initial phases of an epidemic, it might well serve as a reasonable approximation. And again, with such a structure, by which I mean the graph itself, you can, let's say we're sitting at week 30, and we want to make a comment about what we think is going to happen at week 35. We can use the graph. We can use the equation to help us predict how many cases they're going to be. So that's an example of a non-linear relationship, and in particular it's called an exponential function, and I have presented the function at the bottom of the slide. We'll talk about it in more detail later on.
we are looking at what is often termed a negative association. The previous two examples, the graph, one was a straight line, the other one was an exponential function, were both going from bottom left to top right. We termed that positive association. This time around, we're looking at something that has negative association, because typically for most goods, as the price increases, then sold, the quantity sold, is actually going to decrease. And so that's why we've got a graph that goes from top left to bottom right.
Now, I'm using a different sort of mathematical function to capture this association. And the type of function that you're looking at here is called power function. In terms of the model that we're using, we have the quantity demanded is equal to some multiplicative constant, that's the 60,000 times the price to the power -2.5. And for the particular data that sat behind this example, this was a reasonable model to use. This is different from the exponential function, the power function that we're looking at here. And it has some very special features, this power function again to be describe, but it's an example of another place where these quantitative models can be very, very, useful and in particular one of the uses that one would be able to find for this model is to think about what an optimal price should be. Clearly if you'd increase the price, one unit of this product is going to bring a more money but you're going to be selling less units if you increase the price. So there's a trade off going on there. And the question is, how do we optimize that trade off? How do we find the best price? And so economics is a discipline that is full of quantitative models, and this is a basic quantitative model for demand. So, my final example here is a model for the uptake of a new product, and it's different from the previous examples that we've seen because this graph has a feature. The feature is that it's increasing, but then it starts to
tail off, but the reason for that is because the variable, the outcome that I'm looking at is the proportion of a market that has been exposed to the product, that has bought the product, and a proportion can never be greater than one, so therefore the graph cannot keep going up and up. This particular function that we're looking at here is termed a logistic function, and it has the potential to map a process where, at the initial stages there's a slow start, that would be the early adopters picking up the product, then there's a rapid take up of the product, as more and more people get to know about it, and then, at some point, you can't have a proportion greater than one. So, the proportion of the market that has actually purchased the product, has to start to tail off, cannot go above one. And so this is a special sort of curve that is able to capture these intrinsic features of the outcome variable that I'm interested in here, the proportion. Proportions go between zero and one so I need a model that can reflect that. This logistic function has the ability to do that, and I've just presented at the bottom of the slide here what that logistic model looks like mathematically. So those are four examples of models, and you can see that from a qualitative perspective they're able to pick up different features in an underlying process. A linear model, an exponential model, we saw the power function, and here we have finished off by having a look at a logistics model. So these would all be quantitative models that would certainly have a role in a business setting.
How Models Are Used in Practice
So now that we've had a look and we understand what a quantitative model is about let me tell you some of the specific activities where these models are used. So one thing that we can do once we've got a quantitative model is prediction. And prediction is basically taking the model, putting in an input, and calculating the output. And so going back to the diamonds ring example, what I mean by prediction. What's the expected price of a diamond ring that weighs 0.2 of a carats? If I got a model, I can create that prediction. And certainly one of the most often used places for these quantitative models is what we call predictive analytics. And so if you want to do predictive analytics, you need some underlying model for the process, typically.
Another place that we use these models is in forecasting. And when I'm talking about forecasting I'm really thinking about a time series. And I'm thinking about trying to make a comment about what's happening in the future. And so forecasting is an activity that most businesses and entities go through at some stage, often to do with resource planning. And going back to the example of the epidemic if one was involved in a public health situation, a key question that you would be asking, for example, would be how many people are expected to be infected in six weeks time. Because that, the answer to that sort of question is going to help me in terms of resource planning. Here's another forecasting type problem where quantitative models can be very, very useful. So imagine that you're running a hospital. And you are trying to schedule patients for appointments. One of the truths of the matter here is that not everybody shows up for their appointment. And that leads to inefficiencies in the system. The system could be improved if we had a sense of who was likely to not show up. And perhaps we could tweak the schedule as a result of that. And so that would be another example where we would like to do some forecasting, forecasting whether or not someone's likely to show up for an appointment.
Another activity that we use these quantitative models for is optimization. And so optimization takes up a lot of business thinking. And the example that I've got here is the demand and price. And so It's a very legitimate question to ask. I wonder what price is going to maximize the profit? And the key word there is maximize, that's to optimize an output, the profit. And optimization activities are going to typically require an underlying quantitative model. And so that's one of the places where quantitative models go to work as inputs for optimization, trying to make your business as good as it can be, optimizing price, optimizing the supply chain etc. So we use models for optimization.
Another activity that we go through and models help us are ranking and targeting. And so what I mean there is that we're often looking at a list. It might be customers or it might be diamonds, for example. And we'd like to have a look at these diamonds, perhaps, and figure out which ones we'd be interested in purchasing if we're a diamond merchant, for example. And so I can't look at all the diamonds that are out there in the world because I simply don't have the resources. And so that's the idea of given limited resources. It would be really nice if I could identify potential targets of opportunity. And that essentially is a ranking and targeting exercise. And if we have a model we can create a set of predictions. We can sort those predictions and that creates a ranking. And then we can work our way down that list of predictions in order there, that rank list, in order to optimize our own time. And so another example would be that I'm interested in real estate. And I'm considering potential properties to buy. There are millions of properties potentially for sale in the country at any one point in time. I don't have an opportunity to look at all of them. Be nice if I could create a model that would help me identify those properties that seem the, are of the most interest to me. And that's something that a model can help you do. Here are some more things that we can use our quantitative models for. What-if scenarios, scenario planning, we will often like to understand what might happen to the world if certain things change. And so going back to the epidemic we might want to ask ourselves the question well, what if the growth rate changed and increased to 20% per week? Then how may infections are we going to expect in the next ten weeks? So if we have a model, we are able to examine the consequences of the change of some of our assumptions. And that's the idea of scenario planning and what-if analysis. So that's something else that a model can help you do.
Certain models lend themselves to interpretation. And in terms of the price and quantity demanded model, there was a coefficient In the equation, if you look back. And that coefficient was the power, which was -2.5. So it's a number, but sometimes these coefficients have interpretations. And that interpretation can be helpful. And turns out that the interpretation of that -2.5 is what's known as an elasticity. And it tells us that as the price goes up by 1%, we can anticipate the demand to fall by 2.5%. And so that's what I mean by interpreting a coefficient in a model. And that can give us additional insight and help us explain the model to other people. So our models involve mathematical equations. The mathematical equations often have coefficients in them. The coefficients can have real meanings and interpretations.
Another task that models are used for is to conduct a sensitivity analysis. And so I pointed out earlier on that pretty much every model you create is going to rely on some assumptions. And a sensitivity analysis is a process where we look to see how sensitive the outputs of the model are to some of those assumptions. And if we find that the model that's particularly sensitive to an assumption, then that tells us that we need to think a little more carefully about that assumption. Maybe we'll try and confirm that the assumption is realistic or collect more information to try and tie that assumption down more precisely. So there's a sensitivity analysis typically with a model that helps us figure out which of the assumptions are really important and which aren't so important, and therefore how we might want to use our time in confirming that the underlying assumptions are reasonable.
After having gone through this whole modeling business, hopefully there are some benefits. And here I've listed out a set of benefits. They're undoubtedly more than up here on this slide. But these are benefits that I think and have experienced myself, after having gone through this modeling activity. So one of the things that can be the outcome of a model is the identification that there's some gaps in the current understanding. You've tried to lay out your understanding of the business process. And theres just some big gap sitting there in the middle. And that's only become apparent because you've taken the time to lay out your current understanding. So identifying gaps is certainly a benefit.
It's often the case that people are using models without having made underlying assumptions explicit. And so one of the benefits of creating a useful model is that you will have explicated what those assumptions are. So they're on the table, everybody can see what you're assuming as you come up with your recommendations from that model. And sometimes those assumptions have been implicitly foreign. Not everyone is aware of them. And so explicating the assumptions can be very useful.
You will also have at the end of the modeling process a well-defined description of the business process, how the pieces fit together. And that can be of benefit its own right. Fourth one I've got here isn't entirely obvious. But one of the things a model can do is create what I call an institutional memory. So, many businesses will have some smart person who is relied on for doing certain things, certain forecasting activities. What do you think we're going to sell next month? They're someone who's worked for the company 25 years. You go to them, they have a good sense of what's going on. But what happens if that person leaves?
Knowledge goes with them. And so you can think of a model as creating an institutional memory. Because that model is going to be a set of equations, a set of inputs and outputs. And that's going to stick around beyond any individual. And so I think models can be useful from that point of view.
Ultimately, the model is going to be used as a decision support tool. And I've bolded the word support here because it's a little naive to think that the model is going to reveal truth. They're always approximations. And the model is typically going to be used as one of a suite of tools to help support the decision making within a company. And so it's very much not an end in its own right but a support to other activities. My final comment here is that sometimes I think that models are serendipitous insight generators. By going through the modeling process you learn something that you hadn't thought about at all, something very unexpected. And that happens quite often. And so that's another benefit of modeling.
Key Steps in the Modeling Process
I'm now going to talk about some of the key steps in the modeling process. So every model is different, but they do share some common features in the way that the model was created. So I will call that the work flow. So typically we begin the modeling process by identifying and defining some inputs and outputs. What does the model trying to predict, what is the key outcome, and what are the underlying variables that are going to help us predict or understand that outcome. So an identification of the inputs and the outputs of the model, they need to be articulated, ideally defined.
There's also a part where you need to think about the scope of the model and so when I talk about the scope of the model and it's like, what is it being applied to? And so going back to the diamonds example, if you have a look at the size of the diamonds that the model was trying to predict, it was little diamonds, basically between .1 and .3 of a carat. And that's what I mean by the scope. It was a model was being created to work in a particular instance. I wouldn't sit here an claim that same model would be useful for pricing diamonds that weighed one carat or two carats, so you need to think and define what the scope of. Of the model, where is it going to be applied.
So those are the inputs, outputs, and the scope of the model. Then once you've got those basic building blocks defined, you're going to formulate the model and that's very much an art as well as a science. It's going to be a step that involves your understanding of the underlying business process, and it's where all of those mathematical and statistical ideas come in through the model formulation. So we have created a model. Then once you've created the model you shouldn't just go and use it. You need to think about whether or not. That model is performing well, and in particular two of the activities that we typically go through once we have created a model are a sensitivity analysis. So all of the models take inputs, their underlying assumptions. How sensitive are the outputs to those inputs. And identifying where those sensitivity lie.
Helps us understand the value of the model and where, in particular, we might be reticent in using it so there's a sensitivity analysis. There's also what I would term a validation of the model forecast so oftentimes, the models are going to be used in some forecasting or prediction context. And it would be foolish to use a model that was creating forecasts without at some point looking to see whether or not those forecasts were close to the actual values that ultimately were observed. And so, sometimes that's sort of easy to do. We, When there's an election, you can look at a political poll that will try and tell you who's going to win the election. Then the election happens and you actually get a point that you can validate the initial polls against. So oftentimes there is an ultimate realization, so for example maybe we have a model for the price of oil in one year's time. So I'll make my forecast, then what I should do is in one year look to see what the price of oil actually is, and see how close my forecast is to the actual price. Now validation takes many forms. That's sort of what I've discussed was a looking out into the future. Maybe your data doesn't come over time, your model isn't a time series model. Then what one often does is withhold some of the data from the model itself. And we call that a holdout sample. And then what we might do is fit the model, train the model on a subset of the data that we have available and look to see how well it forecasts the holdout sample. So there should typically be some validation process after the model has been created. Then if you're happy with the validation and the sensitivity analysis you ask the big question. And the big question is not is the model right? Because as I've said almost every model you create is going to be a simplification. So it's not going to be perfect. That's an unrealistic assumption. And that's why I've put in here, is the model fit for purpose? And so that is a question. That the person creating the model has to decide. Is it suitable for the purpose that it's being used for. Not, is it right? But, is it helpful? And there's a very famous saying by perfacet code. Box who said all models are wrong but some are useful, and that's the idea that I'm trying to get at when I say is the model fit for purpose rather than is the model right. Now if it's not fit for purpose, if you're not happy with your model. Then you're going to go back and revisit some of the initial steps. Maybe you need some additional inputs. Maybe you've been using your model out of scope. And so you need to redefine your scope. And certainly you might need to reformulate the model. As you realize, as I say, for example, that an important variable had been missed out of the model. And so it is an inherently iterative process, this model building.
In my own experience, I have never managed to write down a model and use it the first time around. There's always this feedback component. And so you shouldn't feel that that is a failure in any sense. It's absolutely to be expected. But at some point hopefully you declare your model fit for purpose and then you go into the ultimate activity, which is to implement it. And that's the part that takes you to the spreadsheet modeling component of the specialization. So those are the key steps in the modeling process.
Now, as I've alluded to, there is an iterative component to this, and so what happens if the model doesn't work? What happens if some of our forecasts are lousy, is that the end of the world. Well, I don't think so. In fact, when the observed outcome from the model differs greatly from the model's predictions, so it was a lousy predicting model, hopefully not everywhere, but maybe one or two points or observations. Then it turns out that that can be very, very informative, because if you can identify the reason why your model has not predicted or performed well, you've probably learned something new that you didn't know before. And that Is one of the great benefits of modeling, the actual ability to learn new things through the process by realizing that your current understanding isn't able to map to reality. And I've got an example in a couple of the modules coming up that will make that point more explicit. And I would certainly come back to it. So the story is not to be totally disappointed if the model isn't always working. There's an opportunity to learn something new there. It's definitely the case that modeling is continuous. It's an evolutionary process. And ultimately, as we identify the weaknesses and limitations and iterate through the modeling process, we hope to be able to overcome some of those limitations. So an initial model not working well is not the end of the world. It's a chance to learn. That's how I think about it.
Vocabulary for Modeling
Now it's time to talk about some of the words that people throw around when they do quantitative modelling and so being exposed to this vocabulary is helpful because it will allow you to describe to other people more accurately what you're doing and also when you hear about someone else's model, you'll have a sense of what's going on. And so, I'm going to describe some of these terms here.
Okay, there's a spectrum out there and most models fit on the spectrum somewhere between empirical and theoretical. So an example of a theoretical model is an option pricing model and what I mean there is that by a theoretical model, is that someone has laid down a set of assumptions, they have written down some relationships and they really ask what are the logical consequences of those assumptions and relationships. So there could be assumption that markets are efficient, and then given that assumption, there are certain logical consequences and those logical consequences could be used for example, to come up with a model for pricing, a stock option and so that's an example of a theoretical model. The other end of the spectrum is a model that is purely based on data and that's when I've got a set of observations and I'm asking myself, how can I approximate the underlying process that generated those observations? And so I start with the data and then I try to back out the model as opposed to the theoretical one where I start with the theory and look at the consequences of that theory. So an example of a data driven model might be a set of customers that I have I have, I figured out the profitability of each of those customers and now I ask myself the question, what are the essential characteristics that separate out the profitable from unprofitable customers? That would be a useful thing to know, but my starting point here is not some grand theory of how the world works, my starting point is a spreadsheet full of data, the data being the profitability of my customers. There's a set of attributes associated with those customers, and I'm trying to figure out which of the attributes are associated with profitable customers, so that would be an example of a totally data driven model. So, that's essentially the spectrum where most modellers fit, somewhere between empirical and theoretical. You'll find that there are often arguments between people because they lie at different points on the spectrum. My own opinion here is that you really want to be able to take a piece from both of these approaches. Additional terms that you will hear thrown around by people who are making models are deterministic and probabilistic. We're going to look at these two types of models in other modules, but just to get started, what do we mean by deterministic? Well, essentially given a fixed set of inputs, the model's always going to give the identical or same output. So here's an example, you've got $1000, that's the input. You're going to invest at a 4% annual compound interest for two years. After two years, given the way the money is growing, that $1000 is always going to turn out to be equal to or will have grown to $1081.60 and it's never going to change, it's totally deterministic. The same input, always gives the same output, but what happens if you took that $1,000 and rather than putting it in to an investment that was growing at 4%, you bought lottery tickets with it? And, I could say well how much is this $1,000 going to have grown to
after two years, for example, after the lottery has happened. Well, the answer now is, it fundamentally depends on whether or not one of those lottery tickets won the lottery or not. If none of the tickets won the lottery, then you're going to get an output of zero, all the money disappeared. If one of the lottery tickets was lucky enough to win the lottery, you're going to get a very, very different output. And so the output of this process or model is probabilistic, it's what we call a random variable. It all depends on whether or not the lottery was won. So that's very different from the deterministic model. And, the term stochastic is often used as really a synonym for a probabilistic model, so you'll see both of those terms used when there's uncertainty. And so those are terms deterministic and probabilistic.
More terms. The next one is discrete versus continuous. Now, the analogy that I'm going to use here is the idea of a watch. Now, there are two different sorts of watches, essentially. Some watches are digital, and others are what we call analog.
And so a digital watch only can show you specific times because it has the given or finite number of numbers appearing on the face and so, there's some inherent resolution beyond which you can't go in telling the time.
On the other hand, if you have an analog watch, that's one where the hands are physical and sweep out the time, then it can pick up any time possible because the hands have to go through every single number. That's the idea of something that's continuous. So just as we have digital and analog, we're going to have in our modelling, the same concept happening. In the modelling world, we would call them discrete or continuous. So discrete processes are characterized by jumps in distinct values just like the digital watch, the numbers jump from one to another whereas continuous processes tend to be much smoother and more formally, you can get an infinite number of values happening in any fixed interval. And so going back to the watch here, you will see every possible time presented on the analog watch between say, 12 o'clock and 1 o'clock, because the hands are going to sweep out every single time within that period. And so, some models will be discrete and others will be continuous and it's one of the choices that the modeller gets to make.
Final terms that we want to talk about are static and dynamic models. So, static models are those that are really trying to capture a single snapshot of a business process and so here's an example of a static model. Given a website's installed software base, what are the chances that it is compromised today? I'm just trying to make a statement about this single period in time.
By contrast, a dynamic model is much more about an evolution of a process and it's the evolution that is of interest that we are trying to understand. And these dynamic models typically capture a business process moving from state to state, and we model the dynamics of those transitions. So here's an example, what I would think of as a dynamic model and this would be a sort of question that someone who was a public policy individual would be interested in, or an economist. So given a person's participation in a job training program, how long is it until he or she finds a job and then once they find one, how long can they keep it? And so I'm thinking here that a person's participation in the labor market goes through a set of states. Sometimes they're unemployed, and sometimes they're employed, and they can go from employed back to unemployed again, potentially. And so we'd be interested in modeling the transition through these states, and that would be the idea of a dynamic as opposed to a static model. So there's a whole set of terminology that I've gone through
that is associated with modelling. That's what I call the lexicon of models and it's not like you can only have one of these things going on in terms of the language, you could clearly have something like a static probabilistic, discrete time model. And we're going to see one of those and it's termed a mark of chain later on. So, there's our lexicon.
Mathematical Functions
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 of time to talk about these 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 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 and cubics. We'll talk about the exponential function.
And we'll talk about the log function, which is formally the inverse of the exponential function. So let's have a look at these functions in turn now.
So the linear function is probably the core building block of all models. And a linear function is simply a straight line. So you're looking now at a picture of a straight line function. It is characterized by two numbers, b and m, which are known as the intersect and the slope. So b is the height of the line above the origin that's at x equal to 0 on the graph. And m, the slope of the line. It tells you, as X moves by one unit, how much y the outcome has gone up by.
So here's the equation for the straight line now. We're writing it as Y equals MX plus B. X would be the input to the model, and Y would be the output, and the two coefficients, or parameters are b, so I said the intercept, and 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, the 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. So let's think of an example here and we'll consider whether or not the linear function would be reasonable. Let's consider your salary as the y variable over time as you progress through your career. So x would be time, how long you've been 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 means, 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, 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 tend to 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 that they're not going to be useful. They're in 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 the 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 equals x to the power m. And what x to the power of m essentially means is we multiple x by itself m times.
Examples that you might be familiar with are if we put in m equal to two we're going to get a quadratic.
In fact, if we put in m equal to 1, any number raised to the power of 1 is itself. So you would get something linear coming out of this.
And you can have fractional powers of m. You can have m equal to 1/2. Which is known as the square root. You can even have negative powers of m. M can equal minus one for example which would give you the graph of one over x, the reciprocal. So we can have various values for M and they will create different version of the power function.
Now I have shown you power functions. Four various values of them, in fact. The ones I've just discussed on this graph and you can see the purple graph is m equal to 2. That's a quadratic. When m equals to 1, you see the blue graph, which is actually a straight line because if I say, any number raised to the power of one is itself. You can see m equal to 1/2 on here. That's the green curve on the picture. And that one is increasing, but it's increasing at a decreasing rate.
And finally on here I've shown you the graph with m equal to minus 1. That's the sort of pinky colored one. And that shows a negative association, so what I'm showing you here on this slide is that in fact the power functions are very, very flexible. They can model all sorts of underlying relationships, increasing and decreasing, increasing at an increasing rate. That's the quadratic. Increasing at a decreasing rate. That's the square root function. So, a flexible family of functions.
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 1 unit anymore, but 1%. Then, y is going to change by approximately n%. So the n 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 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 an idea of this percent change, this proportionality, being constant percent change and x percent change and y, it's constant.
Now, there are a couple of facts I just put in the math facts down at the bottom there, actually more, math facts than this, but these are really important ones about the power function. The x to the power m times x to the power n is, x to the m plus n, so the product here corresponds to the addition of the exponents. And x to the minus m is the same as 1 over x to the power m, and that's why we're able to use these negative powers to capture decreasing relationships. So there's the power function.
Third up is the exponential function. Once again, I've drawn a graph with various exponential 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 a decimal is 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's different, it's where the x is. Here, it's in the exponent and not the base. 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 we're going to get different relationships and on the slide of the exponential function I've 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.
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 positive 0.2. Then, what's going to come out of the exponential function is the idea that for every 1 unit change in x, there's going to be an approximate 100 times m% 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 = 0.05, then a one-unit increase in x is associated with an approximate 5% increase in y and that 5% is cosmic, it doesn't matter. Or the value of x. So every time x goes up by 1 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, you 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 cleanup by yourself, it takes quite a while. If you have some, one person help you, it's probably going to be a bit faster. Maybe if 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 dimensions returns from 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 an 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 absolute change in 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, a 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? Do 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 proportion that changes in x are associated with the same absolute changes in y. If you think your business process looks like that, then the log function is a good candidate for a model.
So, picking up the idea of the proportionate change in x being associated with the same constant change in y, you can see how that's working with the log function. And in this particular example, if we work our way up the steps that I've shown you here, the steps
all have exactly the same height but the length in 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 0.5 to 1. 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 1 to 2, 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 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 already saying, I think that there's some kind of log relationship in the background here. So, that's our log function. And here are some facts about the log function.
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 ones, 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 formerly known as the inverse, it undoes the exponential function. And so the log of e to the x equals x itself, and e to the power log of x is x, too. So you can see that log and e are undoing, and the exponential function are undoing one another.
The essential math fact about these logs is the log of a product is equal to the sum of the log. So you can see log of x y equal to the log of x plus the log of y. So that is used as one goes through the analysis of these models that have log terms, and as I say, in this course, I'm only going to be using the natural logarithm and we'll write that as log(x) and forget the subscript ultimately. So there's the log function.
Here they are presented for you. On one slide, the four essential math functions that we'll be using, the linear, the exponential, the log, and the power. And you can see that these, taken as a whole, are going to provide us with a very flexible set of curves to get us started in the quantitative modeling of business processes.
So summarizing what we've done in this first module, we started off talking about uses for models. The two key uses for these quantitative models tend to be in predictive analytics, in making predictions, and forecasts, and also in doing optimization problems.
We've seen the steps involved in the modelling process. It starts off by defining some variables, identifying the scope of the model. There's a formulation stage. But you must not forget that there is an entire validation and sensitivity analysis phase as well.
If your model works well, that's good. But typically it's not going to work well the first time around. That's why I put a feedback loop in the modeling process. So the model never in my experience works perfectly straight out of the box the first time around. We're very iterative, we go back and we revisit some of the assumptions behind the model. We might look for additional terms to put into the model. We might reformulate the model. There's an iterative process there. Ultimately, we feel that the model validates well and we performed our sensitivity analysis. We then ask ourself the key question, is the model fit for purpose? And I've used that language
very purposely there because I have not said, is the model right or is it wrong. Because models are never absolutely right because they are almost by definition, simplifications of a much more complicated real world. The key question is, is the model fit for purpose, is it useful at helping me answer questions?
In other words, is it going to be a useful decision support tool. So don't forget to validate your model.
We've discussed various types of models. That was the language that I introduced in modeling. We talked about deterministic and stochastic. We talked about discrete and continuous. We talked about static and dynamic models. So those terms are important to understand because you might at some point have a conversation as you create more of these models with someone and say, well did you create a discrete time or continuous time model? And being able to understand those words is very helpful if you want to be able to participate in those conversations. The final part of the module was reviewing some essential mathematics in particular seeing the functions that we're going to be using as we create our quantitative models there were four key functions. Linear, power, exponential, and log. And from a modeling point of view, what you want to understand about these functions is how they relate changes in the input to changes in the output and whether or not those changes are being thought of in absolute terms or relative terms. So recall, a straight line is characterized by its constant slope. And that tells us that absolute changes in X are always accompanied with the same absolute change in Y of M. That's what the slope of M equals. Whereas if we had a power function, then we would have a 1% change in X is associated with an approximate M% change in Y. So percent change in X is percent change in Y. And you simply have to think about and understand your business process and ask yourself, well, on which type of change is this process most readily modeled? In terms of absolute change or percent change. And by doing that, you're able to think which of these functions should be used in the model.
Ta bắt đầu bằng một vài ví dụ về việc sử dụng các mô hình toán học.
Có 4 hàm số toán học thường hay dùng trong các mô hình toán học là hàm tuyến tính bậc nhất (linear function), hàm luỹ thữa (power function) (hàm số bậc hai,...), hàm mũ (exponential function), hàm logarit (logarithm function).
Một mô hình toán học thường mô tả các hiện tượng kinh tế, vật lý một cách đơn giản hơn thực tế. Điều này là để chúng ta có một mô hình đơn giản (các phép tính toán không quá phức tạp, có thể thu được kết quả ước tính nhanh, ...) có thể đưa ra những phỏng đoán về hiện tượng trong tương lai. Tất nhiên, ta cần chọc lọc những yếu tố cần phải có trong mô hình (yếu tố thể hiện bản chất của hiện tượng, không thể bỏ qua vì sẽ mất đi tính chính xác cần thiết). Việc xây dựng một mô hình toán học hữu ích là một nghệ thuật.
Bây giờ, ta cung cấp một số ví dụ cụ thể.
Chẳng hạn, ta quan tâm đến việc đầu tư đồ trang sức, như kim cương, vàng, .... Rõ ràng, một viên kim cương nặng hơn sẽ có giá cao hơn. Thế nhưng mối quan hệ giữa cân nặng và giá tiền chính xác là gì? Một mô hình tuyến tính có thể dùng trong trường hợp này, tức là quan hệ giữa cân nặng và giá tiền của viên kim cương là quan hệ tuyến tính.
Chẳng hạn, ta có thể quan tâm mức độ lan truyền của một bệnh dịch nguy hiểm. Ta cần phải dự đoán sự lan truyền của bệnh dịch theo thời gian để có thể tính toán cần bao nhiêu cơ sở y tế đáp ứng cho bệnh dịch trong 6 tháng tới? Việc dùng mô hình toán học có thể rất hữu ích trong trường hợp này. Một mô hình toán học có thể dùng là hàm mũ. Trong giai đoạn đầu của bệnh dịch, số ca nhiễm bệnh tăng rất nhanh, tăng theo hàm mũ. Dùng mô hình toán mũ này, ta có thể dự đoán số ca bênh trong thời gian tới.
Chẳng hạn, ta quan tâm về mối quan hệ giữa giá và nhu cầu thị trường của một loại sản phẩm. Nếu ta tăng giá, thì nhu cầu thị trường thường giảm. Giá tối ưu của sản phẩm đó là gì? Ta có thể dùng hàm luỹ thừa để mô tả mối quan hệ giữa giá và nhu cầu thị trường: nhu cầu = 60.000x giá mũ -2.5. Nếu ta tăng giá, thì mỗi sản phẩm mang về nhiều lợi nhuận hơn, nhưng ta sẽ bán ít hàng hơn. Vậy với giá nào để ta có thể thu về lợi nhuận cao nhất.
Ta cũng có thể quan tâm về việc thị trường tiếp nhận một sản phẩm mới như thế nào? Ta cần dự đoán số lượng sản phẩm sẽ được mua trong môt tháng tới? Thời gian đầu giới thiệu sản phẩm, ít sản phẩm được bán ra vì ít người biết đến. Sau đó, khi thị trường bắt đầu chấp nhận sản phẩm, nhiều người sẽ mua sản phẩm hơn. Ta thường dùng hàm logarith để mô tả quá trình này.
Không có nhận xét nào:
Đăng nhận xét