Lectures

Numerical solutions to ODE: initial value problems

Thursday, Apr 26, 2012
We will discuss the MATLAB solver ode45 and how to setup ODEs so that we can solve them with MATLAB

Numerical solutions to ODE: initial value problems

Monday, Apr 23, 2012

Numerical solutions to ODE: finite differences

Thursday, Apr 19, 2012
How to solve a boundary value problem by discretization. Solving a linear system in MATLAB. On Monday we will look at initial value problems.

Numerical solutions to ODE: finite differences

Monday, Apr 16, 2012
How to solve a boundary value problem by discretization.

The logistic map

Friday, Apr 13, 2012
Homework 10 discussion

EXAM 2

Thursday, Apr 12, 2012
120 minute exam. Topics: pagerank, monte carlo, random walks, stock prices

Practice problem

Monday, Apr 09, 2012

Cobweb diagram

Friday, Apr 06, 2012
Build a cobweb diagram of the logistic map.

Logistic Map

Thursday, Apr 05, 2012
The logistic map is a discretized version of the logistic model for population growth. The dynamical systems obtained from the logistic map exhibits chaotic behavior. We describe the logistic map and next time will write a program to run the map

Structs in MATLAB and tracking cash flows

Monday, Apr 02, 2012
We discuss structs which provide a neat way to store pieces of related but heterogeneous data. Spend some time talking about the second class loan simulation.

Bonds, CDs and rate of return. The second class loan

Friday, Mar 30, 2012
We will look at the fundamental financial instruments that are traded and the mathematical models for each one.

Random walks and Brownian motion

Thursday, Mar 29, 2012
Arguably the most important continuos random process.

Simulating stock prices

Monday, Mar 26, 2012
We will use our analysis of the historical stock prices to generate stock paths.

MATLAB coding style and vectorization

Friday, Mar 23, 2012
A reminder of some MATLAB indexing tricks and tips on making the code go fast

Binomial model for stock prices

Thursday, Mar 22, 2012
Today we will look at Drunkard's walk and generalize the notion to the notion of a random walk. We will see that this is the basis for a basic model in finance. We will then investigate some real world stock prices.

Monte Carlo methods

Monday, Mar 19, 2012

Monte Carlo methods

Friday, Mar 09, 2012
A Monte Carlo method is a random algorithm for estimating a numerical quantity such as an integral or a statistical distribution. The term is a reference to the casinos in Monaco. We will see how these techniques can be used to estimate integrals, and areas. If time permits we will look at Markov Chain monte carlo.

Statistics and monte carlo integration

Thursday, Mar 08, 2012
We will look at MATLAB's statistical facilities and review the law of large numbers. Then we will look at how integrals can be estimated using statistical methods

Reminders

  • Homework 6 is due 03/08/2012

Google's PageRank

Monday, Mar 05, 2012
We will discuss Google's pagerank algorithm and its connection to Markov chains

Reminders

  • Homework 6 is due 03/08/2012

Google's PageRank

Friday, Mar 02, 2012
We will discuss Google's pagerank algorithm and its connection to Markov chains

Reminders

  • Homework 6 is due 03/08/2012

EXAM I

Thursday, Mar 01, 2012
The first midterm

Review for Exam I

Monday, Feb 27, 2012
Bring your questions. I will give you things to do

Discussion of simulation homework

Friday, Feb 24, 2012
Shared our feelings.

Reminders

  • Homework 5 is due 02/27/2012 **Change in date**
  • Exam I is Thursday 3/1/2012
  • Review on Monday, 2/27/2012

Loops, randomness, simulation (a brief intro), part 3

Thursday, Feb 23, 2012

Reminders

  • Homework 5 is due 02/27/2012 Change in date
  • Problems to practice (stars indicate problems you should definitelly do): chapter 4: 4, 7, 11, 12, 15*, 16, 20*, 29, 31*; chapter 6: 13, 20*
  • Read pages 283 -- 286 until normal distribution.

Loops, randomness, simulation (a brief intro), part 2

Friday, Feb 17, 2012
Today we talk about simulating simple processes such as coin flips, die rolls

Reminders

  • Quiz 5 will be 02/23/2012
  • Homework 5 is due 02/27/2012 Change in date
  • Problems to practice (stars indicate problems you should definitelly do): chapter 4: 4, 7, 11, 12, 15*, 16, 20*, 29, 31*; chapter 6: 13, 20*
  • Read pages 283 -- 286 until normal distribution.
Stuff
  • [Handout from yesterday updated](02-16-loops-simulation.pdf)

Loops, randomness, simulation (a brief intro)

Thursday, Feb 16, 2012
Loops allow us to iterate though an array and run a piece of code for each iteration. They are a fundamental and useful construct. We will look at loops in the context of random simulation, such as the modeling of a coin flip, or die roll. You will need these techniques for the next homework set

Reminders

  • Quiz 5 will be 02/23/2012
Stuff
  • [Handout from today](02-16-loops-simulation.pdf)

Discussion of gamble function

Monday, Feb 13, 2012

Reminders

  • Homework 4 is due 02/14/2012
  • Quiz 4 is 02/13/2012

Functions, conditional, and homework discussion

Friday, Feb 10, 2012
Write the functions issquare, and isstochastic (assuming that the rest has been done). Also discuss the homework problem part 2

Reminders

  • Homework 4 is due 02/14/2012
  • Quiz 4 is 02/13/2012

Stationary distributions and MATLAB functions and control

Thursday, Feb 09, 2012
Today's action-packed class will see the conclusion of the first part of Markov chains. We will then spend some time discussing MATLAB control: if then, switch and the like; debugging; and functions. More of the same tomorrow

Reminders

  • Homework 4 is due 02/14/2012 **Change in date**
  • Quiz 4 is 02/13/2012

Markov chains

Monday, Feb 06, 2012

Reminders

  • Homework 4 is due 2/13/2012, that is a Monday

Markov chains

Friday, Feb 03, 2012
Markov chains can be used to model several interesting phenonmena. The theory is rich and deep. We look at the higher transition probabilities and the notion of absorbing state, regular chain, stationary distribution. Notes will be provided.

Reminders

  • Homework 4 is due 2/14/2012

Stochastic matrices

Thursday, Feb 02, 2012
Defined Stochastic matrix and described how one might check that a matrix is Stochastic in MATLAB. We also looked at functions in MATLAB.

Problems

Homework 4, problem 1 was described in class today. Two more problems will be on the homework.

Reminders

  • Homework 3 in due tonight

Drunkard's walk

Monday, Jan 30, 2012
A random walk is one of the simplest examples of a Markov chain. This week we will discuss Markov chains and some of their applications, including pagereank. We will also consider the idea of Markov chain monte carlo which will lead to Monte Carlo simulation

Reminders

  • Homework 3 is due Thursday

Images in MATLAB: an example of using multidimensional arrays.

Friday, Jan 27, 2012
Color images are represented in MATLAB as multidimensional arrays. Today we do a little demo to see how we can use MATLAB to extract parts of the image. This also allows us to explore MATLAB's image processing functions. Notes will be posted over the weekend.

Problems

T2.4-3, T2.4-4 eye, zeros, access subarrays Ex 2.4-3, Ch 2: 27, 35, 45, top of p 76

Reminders

  • Homework 3 is due next week
  • Quiz on Monday on 2.1 -- 2.5 and polynomials and matrix manipulation.

Matrix manipulation

Thursday, Jan 26, 2012
Today we will become Ninjas of matrix manipulation in MATLAB. We will learn to index, slice, dice, chop, extract, refill and test matrices. These skills must be practiced and sharpened as they will make your life with MATLAB a lot easier. Also discuss the rand funtion.

Problems

T2.1-1,Ex2.3-2,Ex2.3-3,Ex2.3-1,Ex 2.3-2,Ex 2.3-3,T2.3-1

Reminders

  • Homework 2 is due tonight
  • Quiz postponed

Polynomials and matrices in MATLAB

Monday, Jan 23, 2012
Manipulating polynomials and matrix arithmetic in MATLAB

Reminders

  • Homework 2 is due 1/26
  • Read chapter 2.4, 2.5 and try come of the commands

Polynomials in MATLAB and matrices

Friday, Jan 20, 2012
Dicussion about the uses of arrays and matrices in mathematics. Polynomials represented as arrays and the `roots` function.

Reminders

  • Homework 2 is due 1/26
  • Read chapter 2.1, 2.2, 2.3 and try come of the commands

More plotting, ellipse project, Riemann sums

Thursday, Jan 19, 2012
More advanced plotting routines covered today. We also looked at the ellipse project. The Riemann sums program motivates us to think of functions as input. Derivatives are functions of functions! We briefly touched upon elementwise operations. More tomorrow.

Reminders

  • Homework 1 is due tonight
  • Homework 2 is posted
  • Read chapter 2.1

Plotting graphs, user interaction

Friday, Jan 13, 2012
A plot or graph can often convey more information than the corresponding text or table. We will cover MATLAB's plotting routines. We will also look at prompting users for input and producing formatted output

Reminders

  • Homework 1 is due next week.
  • Read chapter 5.1, 5.2 on advanced plotting

Script files and arrays

Thursday, Jan 12, 2012
We will look at the process of combining a set of instructions into a script file. Scripts allow us to save our work and to automate repetitive tasks. We will then look briefly at functions. Functions and scripts are what allow us to create *modular* programs: reusable pieces of code from which we can built programs of increasing complexity

Overview of Matlab

Tuesday, Jan 10, 2012
Today we will cover the basics of using MATLAB. We will familirize ourselves with the MATLAB environment and use MATLAB as a calculator. We will also look at the MATLAB editor and help system.

Problems

T1.1-1, 1.1, 1.5, 1.12

Reminders

  • Read chapters 1.1, 1.2, 1.3 and 1.4 for Thursday
  • Sign up for Dropbox

Homework

  • Homework 1 [PDF]
  • Due Thu Jan 19 2012
  • Homework 2 [PDF]
  • Due Thu Jan 26 2012
  • Homework 3 [PDF]
  • Due Thu Feb 02 2012
  • Homework 4 [PDF]
  • Due Tue Feb 14 2012
  • Homework 5 [PDF]
  • Due Mon Feb 27 2012
  • Homework 6 [PDF]
  • Due Thu Mar 08 2012
  • Homework 7 [PDF]
  • Due Thu Mar 22 2012
  • Homework 8 [PDF]
  • Due Thu Mar 29 2012
  • Homework 9 [PDF]
  • Due Thu Apr 05 2012
  • Homework 10 [PDF]
  • Due Thu Apr 26 2012

Quizzes

    • Fri, Jan 20, 2012
    • Topic: Chapter 1
    • Mon, Jan 30, 2012
    • Topic: Chapter 2.1 -- 2.5 (polynomials and matrices)
    • Mon, Feb 06, 2012
    • Topic: Markov chains (read the notes until you finish the section on higher transitions)
    • Mon, Feb 13, 2012
    • Topic: Programming quiz on writing functions, using if statements, switch statements, and possibly loops.
    • Thu, Feb 23, 2012
    • Topic: Loops, simulation. Read chapter 4 for reference, also do the practice problems.
    • Fri, Mar 23, 2012
    • Topic: Monte Carlo methods and integration
    • Thu, Apr 05, 2012
    • Topic: Mathematical finance and random walks
    • Thu, Apr 19, 2012
    • Topic: The logistic map
    • Mon, Apr 30, 2012
    • Topic: Ordinary Differential Equations

Exams

  • Exam 1
  • Thursday, Mar 01, 2012
  • Exam 2
  • Thursday, Apr 12, 2012