This assignment contributes towards Project 2.
This purpose of this assignment is to learn and use the fundamental commands of Octave or Matlab:
The commands for creating and manipulating matrices:
In this assignment you will collect a data set including 100-10000 data points (for instance, height and weight of a sample of 100 persons). Several suggestions for data sets are included below. You will collect the data into a file, and read into Octave or Matlab. The data should come in the format (x_{i}, y_{i}).
You will seek a linear, polynomial or exponential model that matches the data, i.e. you will see if one of the following relationships approximated the dataset well:
A simple linear model:
A polynomial model:
where n is a small number, say, 1-5.
The exponential model, which reduced to the above by taking the logarithms of the data:
The above models are the most simple models because they only require solving linear equations. While more complex models are of interest, in this assignment we are only interested in ones which lead to linear equations By solution we mean the least squares fit, i.e. the collection of the parameters of the model which minimized the sum of the squares of differences between the experimental values of y_{i} and the values computed from the model.
Write a short paper in LaTeX discussing your results. For instance, you may notice that one of the models is better than others. Also, you should use \"Occam's razor\" which should be interpreted as follows: if two models produce about the same mean square error then the one with fewer parameters should be chosen.
Your paper should include plots of the data points and of the line representing the model. The axes should be labeled and the plot should have a title. The plot should be enclosed in a LaTeX figure.
Your paper should follow the format customary to the subject area. Typically they will include sections:
You should cite all relevant sources, including the source of your data. You should pay attention not to violate the law when using copyrighted material.
You should submit the LaTeX paper, the bibliography in BibTeX format, the Matlab/Octave scripts which were used to generate the data used in the paper and the figures. In short, everything that is needed to recreate your paper. You should also include the output of dvips named paper.ps.
If you are using WebDAV to submit your assignment, all files should be in subfolder hw3 of your main folder. If you are using the alternative method, you need to make a Zip archive of all relevant files named hw3.zip. The rchive hw3.zip should be submitted by clicking here.
Note: Please do not put the archive hw3.zip in your WebDAV folder!
Marek Rychlik <rychlik@u.arizona.edu>
Last modified: Wed Aug 27 19:41:25 MST 2003