Main Page   Namespace List   Class Hierarchy   Compound List   File List   Compound Members   File Members  

sdtest.cpp File Reference

#include <stdio.h>
#include "stddev.h"

Go to the source code of this file.

Functions

 main ()

Variables

double data []
 Table 1 from "Statistics Manual" by Crow et al. More...


Function Documentation

main ( )
 

Definition at line 23 of file sdtest.cpp.

00024 {
00025   size_t N = sizeof( data ) / sizeof(double);
00026   stddev sd;
00027   double mu, sigma;
00028   
00029   sigma = sd.sd( data, N );
00030   mu = sd.mean();
00031   printf("stddev = %7.4f, mean = %7.4f\n", sigma, mu );
00032 }


Variable Documentation

double data
 

Initial value:

 {1472, 1315, 1984, 1900, 1646,
                  1709, 1780, 1571, 1681, 1453,
                  1799, 1372, 1420, 1612, 1546,
                  1255, 1818, 1357, 1412, 1775, 
                  1850, 1417, 2057, 1468, 1694,
                  1776, 1456, 1489, 1618, 1544,
                  1251, 1422, 1506, 1651, 1687, 
                  1080, 1866, 1713, 1624, 1370,
                  2107, 1668, 1411, 1654, 1503,
                  1934, 1451, 1240, 1500, 1606 }
Table 1 from "Statistics Manual" by Crow et al.

stddev = 220.6 (calculated here as 220.6428) mean = 1589.8

Definition at line 12 of file sdtest.cpp.


Generated at Wed May 21 21:19:27 2003 for Basic Statistics Functions by doxygen1.2.8.1 written by Dimitri van Heesch, © 1997-2001