VAR SUBROUTINE VAR(X,N,IWRITE,XVAR) PURPOSE--This subroutine computes the sample variance (with denominator N-1) of the data in the input vector X. The sample VARIANCE = (The sum of the squared deviations about the sample mean/(N-1). INPUT ARGUMENTS--X = The single precision vector of (unsorted or sorted) observations. --N = The integer number of observations in the vector X. --IWRITE = An integer flag code which (if set to 0) will suppress the printing of the sample variance as it is computed; or (if set to some integer value not equal to 0, like, say, 1) will cause the printing of the sample variance at the time it is computed. OUTPUT ARGUMENTS--XVAR = The single precision value of the computed sample variance. OUTPUT--The computed single precision value of the sample variance (with denominatorlue of the sample PRINTING--None, unless IWRITE has been set to a non-zero integer, or unless an input argument error condition exists. RESTRICTIONS--There is no restriction on the maximum value of N for this subroutine. OTHER DATAPAC SUBROUTINES NEEDED--None. FORTRAN LIBRARY SUBROUTINES NEEDED--None. MODE OF INTERNAL OPERATIONS--Single precision. LANGUAGE--ANSI FORTRAN. REFERENCES--Snedecor and Cochran Statistical Methods, Edition 6, 1967, Page 44. --Dixon and Massey, Introduction to Statistical Analysis, Edition 2, 1957, Page 38. --Mood and Grable 'Introduction to the Theory of Statistics, Edition 2, 1963, Page 171. WRITTEN BY--James J. Filliben Statistical Engineering Laboratory (205.03) National Bureau of Standards Gaithersburg, MD 20899 Phone-- 301-921-2315 ORIGINAL VERSION--June 1972. UPDATED --September 1975. UPDATED --November 1975.