HOMEWORK #2
DUE SEPTEMBER 30
(3 POINTS)

 

Write a program to find the mean, standard deviation and variance of the input data set. Your program should open the file ‘datahw2.dat’ to read the data values. You need to copy this file from ‘/home/h4/fort1/hw’ The constraint is that you should use only one do loop to calculate three required statistics.

 

Turn in

  1. Your program to read the data and calculate these statistics.
  2. The result you obtained after applying in on the given file.
Supplement:

For the input data xj, j=1,N
 

standard deviation =sqrt(var)