IME/CS 422, FALL 2004

ASSIGNMENT 1, Due 9/08/2004

This assignment has the following objectives:

Please:

  1. Begin by copying this file( random.c) to your computer. You will notice that the program generates a user-specified number of random numbers between 10 and 100, U(10,100), and writes them to a file. Compile and load the program and verify that it is working properly by plotting a histogram of the data for 1000 values.
  2. Modify your program so the main program will sample from U(0,10) a user-specified number of times and store the values in an array.
  3. Finally, please code a third function to compute the sample statistics - mean, variance, minimum and maximum. Your function should take an array of values as an argument and output the sample statistics to the screen. Test your program using the array from part 2 above for at least n=10 and 1000. Print out your results for n=1000 to hand in with your write up. How good are your estimates of the parameters for the U(0,10) process? (Hint: Review confidence intervals and hypothesis testing for means from your Statistics course.)

    Note that you will want to use the "computational" formula for the sample variance below (Hint: "accumulate" the sum of the observation values, the sum of the squared values and the number of observations (n) - then compute the variance for each process).

You may write this assignment up as a normal homework (i.e., it is not necessary to follow the outline given on the syllabus). Please comment on any difficulties you encountered.

Hand in in your write up and a hard-copy of you program listing and output.  Please email your program(s) source with your project files (.dsw&.dsp, .dev, or Makefile) to me with "422 Source" in the subject line at  emooney@ie.montana.edu.