/* テスト1,テスト2,テスト3 被検者 A の得点 : 80 点, 90 点, 75 点 被検者 B の得点 : 30 点, 30 点, 25 点 被検者 C の得点 : 90 点, 100 点, 90 点 */ #include #include int main(void) { float fMean_of_1, fVar_of_1, fSD_of_1; float fMean_of_2, fVar_of_2, fSD_of_2; float fMean_of_3, fVar_of_3, fSD_of_3; fMean_of_1 = ( 80.0 + 30.0 + 90.0 ) / 3.0; fVar_of_1=(( 80.0 - fMean_of_1) * (80.0 - fMean_of_1) + (30.0 - fMean_of_1) * (30.0 - fMean_of_1) + (90.0 - fMean_of_1) * (90.0 - fMean_of_1) ) / 3.0; fSD_of_1 = sqrt( fVar_of_1 ); fMean_of_2 = ( 90.0 + 30.0 + 100.0 ) / 3.0; fVar_of_2=((90.0 - fMean_of_2) * (90.0 - fMean_of_2) + (30.0 - fMean_of_2) * (30.0 - fMean_of_2) + (100.0 - fMean_of_2) * (100.0 - fMean_of_2)) / 3.0; fSD_of_2 = sqrt( fVar_of_2 ); fMean_of_3 = ( 90.0 + 100.0 + 90.0 ) / 3.0; fVar_of_3=((75.0 - fMean_of_3) * (75.0 - fMean_of_3) + (25.0 - fMean_of_3) * (25.0 - fMean_of_3) + (90.0 - fMean_of_3) * (90.0 - fMean_of_3)) / 3.0; fSD_of_3 = sqrt( fVar_of_3 ); printf( " Mean, variance, and S.D of test 1 are \n" ); printf( "%f, ", fMean_of_1 ); printf( "%f, ", fVar_of_1 ); printf( "%f,\n", fSD_of_1 ); printf( " Mean, variance, and S.D of test 2 are \n" ); printf( "%f, ", fMean_of_2 ); printf( "%f, ", fVar_of_2 ); printf( "%f,\n", fSD_of_2 ); printf( " Mean, variance, and S.D of 3 are \n" ); printf( "%f, ", fMean_of_3 ); printf( "%f, ", fVar_of_3 ); printf( "%f.\n", fSD_of_3 ); return 0; }