G H College Haveri: Department of Bca
G H College Haveri: Department of Bca
G H COLLEGE HAVERI
DEPARTMENT OF BCA
G H COLLEGE HAVERI
DEPARTMENT OF BCA
am=sumx/n;
d=sumfx2/sumf;
sd=(sqrt(d-(am*am)));
cv=(sd/am)*100;
printf("=========================================\n");
printf("Airthmetic Mean=%f \n",am);
printf("Standard deviation= %f \n",sd);
printf("Co-efficient of variation= %f\n",cv);
getch();
}
/*=======OUTPUT=========
Enter the number of observations
5
Enter the observations
1
2
3
4
5
Enter the frequencies
3
5
9
6
2
========================================
x[i] f[i] fx[i] x2[i] fx2[i]
========================================
1.00 3.00 3.00 1.00 3.00
=======================================
2.00 5.00 10.00 4.00 20.00
=======================================
3.00 9.00 27.00 9.00 81.00
=======================================
4.00 6.00 24.00 16.00 96.00
=======================================
5.00 2.00 10.00 25.00 50.00
=======================================
15.00 25.00 74.00 250.00
=========================================
Airthmetic Mean=3.000000
Standard deviation= 1.000000
Co-efficient of variation= 33.333332 */