- Formulate a problem as a mathematical model
- Compute one or several approximate solutions to the model
- Interpret and critically evaluate the results of the model
- Iterate
- If you were a bachelor student at NTNU, then you have already taken an introductory course in programming in Python.
- You have likely encountered Python in several other courses.
- Python has a rich ecosystem of packages for mathematical computation like numpy, scipy and scikit.learn.
- Python is a standard within machine learning and analytics, both in industry and academia.
- Many excellent open sources for learning computational mathematics exist for python.
- "Lectures" are all-digital and organized around weekly "labs", which you can find below. A draft of all the labs are currently available, however I will be working throughout the semester to finalize the labs. In general, you can assume that the lab is in its finished form the week indicated in the course plan.
- The labs often include short videos where analytic problems are solved. You are encouraged to try similar problems after watching a video under the "try it" heading. The labs also often include short videos explaining key parts of the code for the numerical analysis.
- For the numerical parts, you should carefully try to replicate all code in the labs and understand what each line of code does and means. When replicating the code in the computational part of the labs, I recommend writing out the code rather than copy-and-paste--you will learn more that way.
- At the end of each lab, you will find an assignment with problems to work through. These assignments consist of both analytic problems (pen and paper) as well as computational problems. You should complete each assignment. You should also look through the description of the
**Math Project**below and work on this throughout the semester. I provide a solution sketch to most of the assignment questions. - Other than the first week,
**we will not have any fixed class time.**You can disregard the lecture times in your NTNU calendar. - Instead I will have
**extended office hours, Monday-Thursday, 9-13, where you are welcome to come and ask questions and get help.**You can find my office on the 4th floor, on the same end as the main entrance, on the corner by the staircase. - If I will be unavailable for office hours, I will post a message on blackboard.
- You will also be forming
**colloquium groups**of between 4 and 8 people, which you can use to work through labs, work on assignments and get mutual help. **Important:**In the course schedule below, you will notice that we that we are on a bit of a compressed schedule, with all of the labs and help-sessions planned before 1. November. There are two reasons for this. One is that I want to give you plenty of time to work on your semester project, where a lot, if not most of the learning in the course will be. Second, from the 1. november I will no longer be working at NTNU and will instead be moving to an industry job. So, in other words- You should have a well written introduction where you motivate the topic, give some background and describe the data. In the introduction you should also give a summary of your results.
- Otherwise, the requirements for structure and format are much looser for this project. The project is intended to be loosely organized, where instead of just showing end results, the student also show the analysis that led to your results. This project could be seen as complimentary to writing a full article or thesis — serving as a well structured "lab notebook" detailing the modelling and analysis process.
- You should have some background about your topic and the problem you wish to model. Explain why the topic is important and interesting and how your modelling will be useful in better understanding your topic. Showing a good understanding of business fields (economics, marketing, finance, etc) and how you apply mathematical modelling to them will be seen as a major plus.
- You should include your code for all your modelling. If you are working with data, you should also include your code for your data work: input, transformation, transformation, visualization, etc.
- You should generally aim to combine multiple mathematical models into an overall analysis with a common theme. You could implement an OLS regression to estimate parameters for a linear programming optimization, for example.
- You do not need a section for methodology but you should of course discuss methodology. Copying some general formulas from a text book has about zero value added. Explain why a methodology is appropriate for your topic (this is good general advice for written assignments).
- You should describe and interpret the results from your mathematical models.
- You should have a concluding section where you summarize your results and discuss implications.
- There are no strict length requirements, but a project should normally be between 2,000-5,000 words (not including code). If you have more than this, that's ok, but longer projects will generally not lead to a higher grade.
- If you are looking for an example of how a project might generally look, consult the application labs.
- To have a clear idea of what you will be doing in your project you will first need to carefully work through the labs - both the analytic parts to get a good intuition for the models, and the numeric/programming part in order to learn how you can modify models to represent the problem/system/concept your are interested. You will need a deep conceptual understanding of the math and modelling in order to complete the project in a good manner, so there are no short cuts.
- Above you will find guidelines and requirements for the term project. Beyond this you are free to both choose your own topic, models, and organisations. You really get to write your own exam here. You get the freedom to make your own choices in this project, but that is also an obligation. This is good practice for the business world/industry where you won't necessarily have someone telling you how you are supposed to accomplish a task.
- When I will be reading the term projects, beyond the requirements detailed on the course website, I will not be sitting with a checklist. I hope to see many different types of projects with different organisations, structures, models, arguments, osv. I will be looking for the ability to use mathematical modeling in the context of real world problems and concepts. You are encouraged to draw in knowledge from other courses as well as experiences you might have had from part-time and summer jobs, internships, organisations, volunteering, etc. Mathematical models are metaphors, where you represent some concept in mathematical form and use that form to give insight or to improve some process. I want to see evidence of this deep level of thinking about mathematics. This can be fun, but also difficult.
- I want to see process. One key difference between this project and other types of projects (like a master thesis), is that I want to see your process. A lot of your work might be exploratory - trying to figure out how to model something you are interested in. Some of this will be trial and failure, and you should show and describe this process and your thinking in the final project. I think about this project as being a form of a "lab notebook", where you should not just the final results and analysis, but also the intermediate steps you used to get to those results. The Jupyter notebook format is particularly well suited for this (as the name suggests) since you combine text, code and results in the same document.
- The quiz will have a focus on the analytic (pen and paper) part of the course, but there may be some general questions related to computation. You will not be asked to provide code or provide specific descriptions of algorithms.
- The quiz will be pass/fail. If you fail the first time, you will have one extra opportunity to pass. You will need to answer 70% of the questions correctly in order to pass.
- You will have a 24 hour period to finish the quiz over the course of
**Thursday the 19th of October**

# Applied Mathematics for Business and Economics, MET 430

## The Business School at NTNU

### Fall 2023

### Lecturer: Johannes Mauritzen

#### Introduction

The best way of getting hold of me is by email for general questions:

johannes[dot]mauritzen[at]ntnu[dot]no

I will try to get back to you within 1 working day (24 hours)

For subject matter questions, you should come to office hours and ask in person.

### About the course

This is a course about doing and applying math to business and economic problems. There is a particular focus on doing and understanding some key mathematics behind many statistical and machine learning tools (matrix algebra).

An important part of the course is learning new mathematical methods and techniques and solving them analytically (with pen and paper).

##### Formulation, approximation and computation

But the focus of this course is on taking mathematical models and *applying* those models to a business or economic problem you are interested in.

The true goal of the course is to give you the tools and practice to:

Most of the course will be focused on this process of formulating and then computing approximate solutions to problems. This culminates in a **Math Project**, where you will formulate and compute your own business or economic problems as mathematical models and explore the solutions (see below for more info).

In addition, there is a at home obligatory quiz where the focus will primarily be on analytic ("pen and paper") problems. The best way to prepare for the quiz will be to have worked through the problems interspersed in the lab under the "try it" heading and at the end of every lab. The quiz questions will be similar to these problems. The quiz will be pass/fail, and if you fail the first time, you will have one extra opportunity to pass. The quiz will be placed on Blackboard, where you answer in the form of multiple choice. You will have a 24 hour period to finish the quiz. (By the way, I realize there are plenty of ways to pass the quiz without actually having learned anything. That is beside the point. The sole purpose of the quiz is to give you a little nudge to spend some time learning the analytic material.)

##### Why Python?

We will be using the Python programming language throughout the course to help us formulate and compute our mathematical models. There are other popular options for working with mathematical computation like Matlab, Julia and R, all of which have their own strengths.

This is why we use Python:

### Course set-up

** You learn math by doing math**. No one every learned any significant mathematics by listening to a lecture. Ever.

This course is set up with this in mind. In this course:

### There's no crying in math

This course is designed to introduce students to mathematical modelling at a high level. Many students find it to be a difficult course that requires quite a lot of time and effort. Some students with less background in mathematics and or programming may have to put in an extra amount of work. This course also emphasizes independence, where you are expected both learn and apply that learning independently.

I make a special effort to try to provide students with the resources they need to succeed. I also actively try to get feedback on how the course could be better.

With that said, at the end of the day, the amount of learning you get out of this course is directly related to how much effort you put in.

### Evaluation

##### Math project

##### Deadline: Tentatively set for 15. December, but you should check the NTNU exam schedule for the deadline as the time approaches.

The project is in the form of a Jupyter Notebook, where you will turn in **a PDF of the jupyter notebook file through Inspira.**

You are encouraged to start working on the math project as early as possible. The project will likely require a good amount of trial-and-error.

You can work either individually or in group of a total of 2 people. If working in a group, you must write a short (1-2 paragraphs) description of how you divided the work and the contributions of each member.

You can write the your Math Project in either English or a Scandinavian language.

You have both the freedom and responsibility to choose your own topic and methodologies. You are encouraged to draw upon your coursework in business and economics to inspire topics and problems that you can apply modelling to. You are also encouraged to combine modelling with domain knowledge about whatever topic you choose. Finding an interesting topic and appropriate mathematical methodology is an important component of the work, and I will not provide you with a topic or suggestions for methodologies.

You should, of course, make use of the material covered in this course. Given that matrix algebra is a significant portion of the course, it should probably also be a part of any term project. But you are not limited to the methodologies covered in this course. You are free to explore other mathematical methods. You do not need to make use of all or even most of the methodologies we cover in the course.

If you choose to make use of statistical or machine learning models, simply applying existing packages to a dataset is not sufficient for this project. You should generally try to implement methods manually, explaining the underlying mathematics, and potentially using existing packages as a check of your results.

You also have a good deal of freedom in deciding the structure and presentation of the project. I will not provide example projects or templates. Instead, I want to encourage you to make independent and creative choices on the form of the term project. I provide a detailed description of what should be included below. Beyond that, you are free to organize your project as you see fit.

#### The project should be a mix of a traditional term paper and a lab report:

Keep in mind that the emphasis in the math project is on being able to formulate a model for a particular problem and get approximate solutions and then being able to explain the thinking behind the model. Getting all the technical details right is less important.

#### Some comments in response to frequently asked questions:

#### Policy on ChatGPT and related "generative" technologies.

The purpose of this course is to prepare you to do a business and economic analysis using mathematical modelling and numerical methods. In learning the necessary coding techniques, you are encouraged to make use of ChatGPT and related technologies. My experience is that these can be effective tools for coding more efficiently and getting help with coding problems. Potentially, these tools could make learning numerical modelling easier and more enjoyable. In other words, I see chatGPT etc as being tools to help you learn modelling, but not as a substitute for learning modelling.

I will not set any explicit limitations on using chatGPT or other technologies to generate text in your project. But be warned: these technologies have a tendency to produce text that sound plausible, but are inherently meaningless - in other words*bullshit*, and bullshit in your term project (whether generated by you or AI) will result in a poor grade. ChatGPT and other such technologies are tools, sources and references, and you should carefully cite, document and explain how you have used them in your term project. If you are unsure how to correctly cite ChatGPT or other sources, the library can assist you. If you, for example, generate text with ChatGPT and directly copy it into your term project without citing your source, this is plagiarism, and this can result in a failing grade.

### Analytic take-home quiz.

There will also be an at-home quiz.

### Course Plan (tentative, can change through the semester.)

Week | Theme | Literature | Lecture and Lab | Solution sketch |
---|---|---|---|---|

Week 1 | Differentiation and intro to python. | (EMEA Ch.6, 7.1), PPNM Ch. 2 and Ch. 20 | Pre-Lab, installation and review of python, , Pre-lab 2, Lists and arrays in Python Lab 1 | Sketch, prelab 2. Sketch, lab 1. |

Week 2 | Integration | (EMEA Ch. 10.1-10.5), PPNM Ch. 21 | Lab 2 | Sketch, lab 2 |

Week 3 | Intro to Matrix and Vector Algebra | PPNM Ch. 14.1, 14.5 (EMEA Ch. 12.1-12.10) | Lab 3 Lab 4 | Sketch, lab 3 Sketch, lab 4 |

Week 4 | Determinants and Inverse of a Matrix, Eigenvalues and eigenvectors | PPNM Ch. 5 (EMEA Ch. 13.1-13.10) | Lab 5 Lab 6 | Sketch, lab 5 Sketch, lab 6 |

Week 5 | Linear Algebra Applications: Least squares regression and Game Theory | PPNM Ch. 16 QE notebook | Lab 7 Lab 8 | Sketch, Lab 8 |

Week 6 | Intro to difference and differential equations | (EMEA 11.8-11.9) | Lab 9 | Sketch, lab 9 |

Week 7 | Numeric difference equations | PPNM Ch. 22 | Lab 10 | Sketch, lab 10 |

Week 8 | Linear Programming | Quant Econ | Lab 11 Lab 12 | Sketch, lab 11 Sketch, lab 12 |

Week 9 | Application: Time series with matrix algebra | Quant Econ | Lab 13 | Sketch, Lab 13 |

Week 10 | Application: Bayesian analysis | Think Bayes | Lab 14 | Sketch, Lab 14 |

Week 11-14 | Project work |

#### Worked exercises (some only partially)

### Literature

# Resources

Solutions from EMEA can be found at the end of the book. I do not have the copy right to distribute the solutions, but you can find a copy of the book in the library or a used book seller, and you are allowed to make personal copies of upto 15% of the book.

Here is a list of data sources I have run across over the years.

Here is a list of sources for learning more about programming in python.

Here is a list of sources for learning more about programming in r.

Here is a list of sources for learning more about statistics and machine learning in general.

Here is a list of sources for learning more about Bayesian analysis and statistics

- Formula sheet (previous version of MET430). This is a formula sheet for a previous version of this course. The course has changed substantially, and I make no guarantee, implicit or explicity, that this sheet is a good representation of the knowledge you should have.
- Brilliant online courses
- Libre texts Open source texts in mathematics
- Modelling and simulation in Python
- MIT open course ware