How to Write Up Computer Homework

I require a specific format for the write-up of assignments that require computer solutions. Not surprisingly, this format follows the same form as a scientific paper, whose purpose is to inform the reader about the results of a scientific investigation. Students in the Comp. Finance class will include the “Executive Summary”. Depending on how complicated the problem is, the sections do not need to be long or involved. Often a sentence or two might be all that is required. For larger projects, the detail may be more extensive. 

Why so picky? Two reasons, really, which both follow from the same fact: Computers are great ways to spew out tons of unorganized (as opposed to organized) gibberish in rather short periods of time. By requiring students to organize their results in a report, they must synthesize their output. In the process, they will be required to think about the results. This will lead to greater understanding of the material and, hopefully, the catching of errors. Nothing is worse than simply turning in a bunch of wrong answers without noticing that they are wrong. It is much easier to turn in incorrect computer results than incorrect analytical homework problems typically done in other classes, and the hope is that by following this ritual, turning in incorrect solutions will be avoided. The second reason is more practical: I don't want to have to read piles of computer generated gibberish. 

0.    Executive Summary

A short synopsis “for The Boss” that describes the problem being solved, the methods used, the results and the conclusions. Remember, The Boss wants results, not a bunch of blather, nor does The Boss want to read the whole paper. (The Professor, on the other hand, will.) Short and sweet, but get the point across in a few sentences. Short example: "A fourth order Taylor polynomial was used to approximate exp(x) on [-1,1].  An analytical error extimate was derived. Computed results show the true error to be within 10% of the estimated error." Another: "A second order finite difference method was used to compute the price of a European Put for sigma = 0.2 and r = 0.05. The value of the put is $10.72$, accurate to the penny."

I. Statement of Problem 

A short synopsis of the problem. Example: "Use a fourth order Taylor polynomial to approximate exp(x) on the interval [-1,1] and estimate the error. Show the error estimate is valid." 

II. Description of The Mathematics 

Briefly describe the mathematics used. For example, continuing the Taylor polynomial example above, describe the general form of the approximation and the form of the remainder. Derive the approximation for exp(x) and derive a bound for the error.

III. Description of the Algorithm 

Write down and explain the numerical method and how you implemented it. For the example you would show how the polynomial evaluation is factored and explain why this is the most efficient way to evaluate the polynomial. You might also copy (by hand) the relevant piece of code. 

IV. Results 

Present the results of the computations. Use Tables and Graphs! A concise, easy to read format is very important! For example, you might write a table: 

Table I. Comparison of Predicted and Computed Results

x

F(x)

P(x)

Est. Error

True Error

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Notice that the table has a heading and is numbered for easy reference. The same will be true of  figures.

V. Conclusions (The Most Important Part!) 

Discuss your results. Show that you understand the meaning of the results you get. If you predicted in Section II that the error is less than some bound and this is reflected in your table, say so. Like, "As predicted, the results show that the actual error is less than the estimate". If your predictions don't come true, try to explain why. You could have a mistake in your code or there are assumptions made in Sec. II that aren't valid. A good explanation could salvage an otherwise incorrect set of numbers. Your mission is to convince me in this section that you know what the answers should be and that you did indeed get them. Not only are correct answers important, but the fact that you can show me the answers are correct is important. (Think about it, if you can't convince someone that the results are correct, how will you know when they are incorrect?) This view is very different than that of most other classes where the student turns in the solutions and the professor gives determines the grade based on the correctness of the solution. The reason for the difference is that the computer is doing the work! I don't trust the computer, and you shouldn't either. This section is very important. 

VI. Program Listing 

  • Include this for completeness. I do not grade specifically on programming style, but I might want to comment on more efficient ways of coding something. 
  • It doesn't have to be long
  • Remember, depending on how complicated the problem is, these sections do not need to be long. Often a sentence or two might be all that is required.
  • All work must be organized on standard 81/2 x 11 Paper
  • This means either copy your results onto a sheet of notebook paper or carefully format them so that they can be cut out and pasted onto such paper, or include them in your word processor document. I will not grade it otherwise.
  • Graphs must be real. All graphs must be computer generated or hand plotted on graph paper according to the standard conventions. Standard conventions include labels, titles, etc. Ask if you are not sure. Notebook paper is not graph paper.
© David Kopriva 2013-2016