# Math 450 - Introduction to modelling

## Final Exam

Our final exam is Monday, May 2, starting at 8 am in Willard 173.

I will be in my office 2-4:30 Saturday and Sunday for students with questions.

Here are some practice problems

## Introduction

This is the web page for Math 450, taught by Tim Reluga in the spring semester of 2016.

We will learn to model problems and systems using mathematics and computers. We'll be using the python computer language (which I will teach everybody at the start of the course). We'll cover statistical models, cellular automata models, and classical applied-math models. We'll also discuss the nature of modelling, based on readings from Nate Silver's Signal and the Noise.

Course syllabus

Office hours will be Mondays, 1:30 - 2:30, or by appointment.

Computer labs: Jan. 20 and 22, 216 Osmond

## Homework

• Due Wednesday, January 20.

• Read the introduction and chapter 1 of Silver.
• Get and install Canopy on your own computer
• Due Friday, January 20.

• Due Monday, Feb 1st.

• Due Friday, Feb. 5th.

• In-class presentations (see this guide on how to present a project)
• Due Monday, Feb 8th.

• Due Wednesday, Feb 17th.

• Due Friday, March 4th.

• 2nd project from modelling competition
• Due Wednesday, March 16th.

• Due Wednesday, March 23th.

• Due Monday, March 28th.

• Read chapters 6,7, and 8 of Signal and Noise. There will be another brief reading quiz.
• Due Wednesday, April 6.

• Due Wednesday, April 13.

• Due Friday, April 22.

## Projects

1. Partner presentation of a new use of python for us.

• Due Friday, February 5.
• 10-minute in-class presentation.
• Teach use something new and useful about scientific computing with python.
• These turned out very well. I've collected all of the presentations into a single file. When I get your code examples, I'll post those also.
• Pyglet scripts one, two, and Mario
• 3 dimensional plotting with Matplotlib
• Using odespy.py to solve differential equations, 1, 2, 3, 4.
2. Every year, the Consortium for Mathematics and its Applications holds a modelling competition for students interested in applying mathematics.

• Choose one of the contest problems from the list of previous problems.
• Prepare your solution to the problem according to the contest instructions.
• Turn in your solution on March 2nd.
• Topics:
• Jacob: 2010's problem B, Criminology.
• Tim: 2015's problem A, Ebola.
• Mohammad: 1995's solving the helix-plane equation.
• Brian: 2010's problem A, finding a baseball bat's sweet spot.
• Jonathan: 2013's Problem A, Brownie pan design.
• Alexa, Hunter, Sijia: Sudoku problem
• Heng: Bathtub temperature
3. Possible topics for a third project:

• Make a new model that challenges one of the recent models from the Journal of Quantitative Analysis in Sports.

• Construct a model for pedal locomotion on mars that will predict how fast humans or some other animal will be able to walk based on physics and geometry.

• In synthetic biology, the "repressilator" is a famous example of how nonlinear dynamics can be incorporated as a design tool into the construction of biological machines. Implement a model describing this biochemical, and analyze its properties.

• Find an equation for the letter "g" as drawn in the Courier font, explaining how the equation is constructed and represented and can be applied to get equations for other letters in other fonts.

• Pick up a hardcover book with the length, width, and height are all unequal. Try flipping this book around each of it's 3 principle axes. Explain the results of your experiments. Then present a set of differential equations that explain our experimental observations.

• The KPZ equation is a recently discovered equation that many people are currently studying. Somebody one the Fields medal last year for related research. What is it, and why is it important. (include some math!)

• The Ising model is a classic cellular automata model for magnetism consisting of mini-magnets of one of two orientations. Thermal fluctuations randomize the orientation of the magnets, while magnetic attraction tends to allign the mini-magnets. Use simulation to show that the two-dimensional Ising model exhibits a phase-transition similar to that of the percolation model.

• How many times do you have to shuffle a deck of 52 playing cards to make sure the cards are randomly mixed? Discuss how you will measure randomness, how different shuffling methods add randomness, and use simulations to support your conclusions.

• The BZ reactions are a family of chemical reactions that oscillate -- a phenomena that was long believed to be impossible. The BZ reactions can be explained by the Oregonator model and it's variations (note Tyson's two-variable version, in particular). Discuss.

• Fairy circles are a weird natural phenomena observed in the Namib Desert. Make a mathematical or computational model that explains why these circles occur there, and not other places in the world.

• When it was first discoverd, there was great controversy bout the nature of HIV. Some scientists argued HIV was a very slow virus because it too decades before people got sick; others argued that HIV was just as fast as other viruses, but was held in check by our immune systems. Nobody new how to test these hypotheses until somebody discovered antiviral treatments for it. Explain how Perelson et al. answered this question using a mathematical model and patient data.

• Derive a distribution to predict how many gold medals the US will win in this summer's olympics in Brazil.

• In class, we built a differential equation model to describe Huffaker's mite experiments. Build a Markov process model that generalizes this, and use it to estimate the extinction probability for the population over time.

## Computer labs

For a formal, structured introduction to computer programming using python, MIT's online course Introduction to Computer Science and Programming is a very helpful reference. Check it out, if you feel like you need more background.

## Lectures

1. Introduction
2. Geometric curves
3. The Black-body theory of global climate - an example model with predictions.
4. Lab 1, introduction to python
5. Lab 2, Scientific computing with python
6. Compartment modelling with differential equations (part 1)
7. Compartment modelling with differential equations (part 2)
• Example python code for solving the differential equations from given initial values for the one compartmenta and two compartment models starting from a single dose.
8. Predators, Prey, and the Law of Mass action
9. Epidemics and Zombies
10. Optics, Femat's law, and differential equations
11. Pendulum motion
12. The hanging chain
13. Introduction to probability
14. Poisson model for meteors
15. Fitting distributions and curves
16. Linear Least Squares
17. Scaling laws by least squares
18. Scaling laws by dimensional analysis 1
19. Scaling laws by dimensional analysis 2
20. Wrapping up scaling laws and model fitting
21. Introduction to Markov Chains
22. Introduction to Markov Chains (cont)
23. 1/2 Inning of Baseball
24. Zipf's Law and Preferential attachment
25. Cellular automata models
26. Symmetry in discrete systems
27. The Heat equation and the Age of the Earth

• Canopy - python software for scientific computing that we'll make use of in class.

• The journal Nature has posted some python notebooks that you can experiment with like I will in class.

• Google's chrome browser has dropped support for MathML equation rendering, so I suggest using Firefox or Safari.

• Kaggle public data science site, with competitions.

• Command-line murder, a fun way to learn the unix shell (I think?)

• VIM Adventure for learning the secrets of the eternal vi and vim text editors.

• Bokeh is a new library for drawing interactive plots in Canopy.

• NIST handbook of engineering statistics

• When you are learning to program, one of the things you need to learn to do is to learn to READ programs. This is challenging because you have keep track in your head what's happening inside the computer and out of sight. This is harder when you are learning because you don't actually understand yet what's happening inside the computer. One thing that may help is the python code visualizer. Check out this example illustrating how a recursive implementation of Euclid's algorithm for greast common divisors works.

• Some recent comments about MathML as a browser standard -- this is inside baseball people trying to communicate and teach math.