next up previous contents
Next: Solution Up: Procedures Previous: Solution

 

Standard Deviation

Write a program which contains an internal function that returns the standard deviation from the mean of an array of real values. Note that if the mean of a sequence of values tex2html_wrap_inline3304 is denoted by m then the standard deviation, s, is defined as:

displaymath3302

[Hint: In Fortran 90 SUM(X) is the sum of the elements of X.]

To demonstrate correctness print out the standard deviation of the following numbers (10 of 'em):

5.0 3.0 17.0 -7.56 78.1 99.99 0.8 11.7 33.8 29.6

and also for the following 14,

1.0 2.0 3.0 4.0 5.0 6.0 7.0 8.0 9.0 10.0 11.0 12.0 13.0 14.0

Go back to Notes gif




next up previous contents
Next: Solution Up: Procedures Previous: Solution

©University of Liverpool, 1997
Thu May 29 10:11:26 BST 1997
Not for commercial use.