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

 

Standard Deviation

Write a program which contains an internal function which returns the standard deviation from the mean of an array of real values (make all variables visible to the internal procedure by host association). Note that if the mean of a sequence of values tex2html_wrap_inline2904 is denoted by m then the standard deviation, s, is defined as:

displaymath2902

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




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

Adam Marshall ©University of Liverpool, 1996
Fri Dec 6 14:10:26 GMT 1996