Project 46: Chi Square GOF Highest Contribution

Intro Problem: Expected COUNTS for school distribution:

9th Grade: 63

10th Grade: 54

11th Grade: 36

12th Grade: 27

Actual COUNTS for school distribution:

9th graders: 60

10th graders: 50

11th graders: 40

12th graders: 30

Explanation:

Contributions:

(60-63)^2/63  = .143

(50-54)^2/54 = .296

(40-36)^2/36 = .444

(30-27)^2/27 = .333

The Chi Square test statistic is .143 + .296 + .444 + .333 = 1.22 but the category that contributed the most to this value was 11th graders with a contribution of .444.

Project 46: The variables 'expected' and 'counts' have been initialized.  

'expected' represents the expected counts ([63, 54, 36, 27] in the example above)

'counts' represents the actual counts observed ([60, 50, 40, 30] in the example above)

Task: Appropriately initialize the values of 'big' which represents the value of the highest contribution to the chi square value (.444 in the example given)

**If your code works for 5 test cases, you can enter your e-mail address

Universal Computational Math Methods:

pow(5,2) returns 25.0

abs(-3.0) returns 3

sqrt(49.0) returns 7.0