Project 66: Testing for Outliers

A sample of adults working in the business industry were asked how much physical money they had on them at the time (cash and coins).  The boxplot below shows a summary of the results.

For the boxplot above:

 the minimum of the dataset is 10

the 25th percentile of the dataset (Q1) is 15

the 50th percentile of the dataset (median) is 95

the 75th percentile of the dataset (Q3) is 490

the maximum of the dataset is 790.


Tukey's Rule states that any value in the interval [Q1 - 1.5IQR, Q3 + 1.5IQR] is not an outlier.  However, any value outside this interval is considered an outlier.  


For the example above:

IQR = 490 - 15 = 475

1.5IQR = 712.5

Q1 - 1.5IQR = 15 - 712.5 = -697.5

Q3 + 1.5IQR = 490 + 712.5 = 1202.5


Since the lowest and highest values in the dataset (10 and 790) are within the interval [-697.5, 1202.5], there are no outliers in the dataset.


Project 66: The variables min, q1, med, q3, and max have been initialized.

Task: Appropriately initialize the value of 'numKnownOutliers' that represents how many outliers are known based on the five number summary.  The value of 'numKnownOutliers' will either be 0, 1, or 2.

**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