next up previous index
Next: Homework Lab. 2 Up: Projects Previous: Final Project: Due May   Index

Homework $-$ Lab. 1

These exercices should be done by Monday February 3rd at 9.00 am, (I gave you an extra weekend to waste on them), email the results from your runs of numbers 2, 3 and 4 to me at sph11@cornell.edu, finding out how to save the results as a text file and how to email a text file are part of the assignment!

1. Using the web

2. Simulating floating point arithmetic
Using Van Loan's functions, show how floating point errors occur, find an example of three numbers whose variance computed with the textbook algorithm has negative variance when the computations are done with 3 decimal places only.

3. A monte carlo experiment to find $\pi$
If you throw uniform random darts within a square board, the ratio of the number of throws within a circle of diameter the side of the square to the total number of throws will be $\frac{\pi}{4}$, use this method to compute an approximation to $\pi$.

Take an average over 500 simulations of 1000 throws.

Compute the variance of your estimate.

You can compare with a very good representation of $\pi$ you can consult through the command vpa(pi).

4. A computer experiment to show how $\phi^n$ diverges
As we saw in class, the golden ratio $\phi=\frac{\sqrt{5}-1}{2}$ obeys the recurrence relation

\begin{displaymath}
\phi^{n+1}=\phi^{n-1}-\phi^n
\end{displaymath}

Compute the first 150 terms of this recurrence, and compare to the first 150 powers of $\phi$ (from 0 to 150), plot the terms when the series starts to diverge by more than 1.

5. Testing data entry and a little statistics
Try doing lesson 1 from the matlab lessons:
http://www.math.utk.edu/~gross/matlabfiles/quant.lifesci.matlab.html


next up previous index
Next: Homework Lab. 2 Up: Projects Previous: Final Project: Due May   Index
Susan Holmes 2002-01-12