MIT 6.001 Fall 1997 QUIZ 2 GRADES (define q2-grades ;0-20th percentile: '(16 18 19 21 22 23 23 23 25 25.5 26 28 28.5 29.5 30 31.5 32 32 33 34 36 36 36.5 37 38 39 39.5 40.5 40.5 40.5 41 41 42 ;;20-40th percentile: 42 43 43 43 44 44.5 45.5 46.5 47 47 48 48 48 48.5 48.5 49.5 50 50 50.5 50.5 51 53 53 53 53.5 54 54 55 55 55.5 55.5 56 56 ;;40-60th percentile: 56.5 56.5 56.5 56.5 57 57 57 57 57.5 57.5 57.5 57.5 58 58 58 58 58.5 59 60 60 60 61.5 61.5 62 62.5 63.5 63.5 63.5 64 64 64 64.5 64.5 ;;60-80th percentile: 65 65 65.6 66 66 67 67.5 68 68 68.5 69 70 70 70 71 72.5 72.5 73.5 74 74 75 75.7 76.5 77 77.5 77.5 78.5 78.5 79 79 79 79 79.5 ;;80-100th percentile: 80 80.5 80.5 81 81 82 82 82.5 83 83 83 84 84 85 85 85 86 86 86 86.5 86.5 87 88.5 89 89 90 91.5 91.5 93 93 93 93.5 100)) (define n (length q2-grades)) n ;Value: 165 (define av (/ (apply + q2-grades) n)) av ;Value: 59.9260606060606 (define med (list-ref q2-grades (floor (/ n 2)))) med ;Value: 58.5 (define square (lambda (x) (* x x))) (define (deviation n sum sum-of-sq) (sqrt (- (/ sum-of-sq n) (square (/ sum n))))) (define dev (deviation n (apply + q2-grades) (apply + (map square q2-grades)))) dev ;Value: 19.61774057039282