Thứ Ba, 17 tháng 5, 2016

Coursera courses

Coursera là một chương trình học online miễn phí rất nổi tiếng, với nhiều chương trình học cực kì hữu ích. Rất nhiều nhà khoa học trên thế giới tham gia các khoá học của Coursera để tự nâng cao kiến thức bản thân.

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


Definition and Uses of Models, Common Functions


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. 
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. 
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. 

Key Steps in the Modeling Process


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. 
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


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 
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


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. 
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. 
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. 


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

Tìm kiếm Blog này

Lưu trữ Blog