DROPPING LOWEST GRADES MATC Math Club January 26, 2006 Jonathan Kane, Professor University of Wisconsin-Whitewater
What is dropping lowest grades? Obtaining the largest raw score Obtaining the largest mean score
DROP TWO GRADES: Largest raw score Get the largest raw score by dropping Quiz 1 & 4 to give a raw score of = 36. NOTE: this drops the grade with the largest percentage. TABLE 1: Alan’s Quiz scores Quiz12345 Score Possible Percentage
K = {1, 2, 3, 4, … k} For j K, quiz j has integer maximum possible score. A student earns an integer score. To drop r scores, find of size k – r so that the ratio is maximized.
DROP ONE GRADE DROP #1:(20 + 1) / ( ) = 17.5% DROP #2:(80 + 1) / ( ) = 67.5% DROP #3:( ) / ( ) = 50% The best grade to drop is quiz 2. NOTE: This retains quiz 3 with the lowest percentage and lowest raw score. TABLE 2: Beth’s Quiz Scores Quiz123 Score80201 Possible Percentage80205
BEST ONE GRADE TO DROP: Quiz 4 ( ) / ( ) = 63.4% BEST TWO GRADES TO DROP: Quizzes 2 and 3 ( ) / ( ) = 74.6% TABLE 3: Carl’s Quiz Scores Quiz1234 Score Possible Percentage
TABLE 4: Dale’s Quiz Scores Quiz Score20+c21-b 1 22-b 2 23-b 3 24-b 4 25-b 5 Possible Percetage Quiz Score26-b 6 27-b 7 28-b 8 29-b 9 30-b 10 Possible Percetage
Average of the grades quiz 0 and the quizzes in
BETH’S QUIZ GRADES DROP FIVE GRADES Each b j = 1 If c = 4, it is best to drop quizzes 1,2,3,4,5. If c = 6, it is best to drop quizzes 6,7,8,9,10. NOTE: A very small change in the problem completely changes the outcome.
BETH’S QUIZ GRADES C = 11 and each b j = 2 DROP FOUR GRADES It is best to drop quizzes 1,2,3,4. DROP FIVE GRADES It is best to drop quizzes 6,7,8,9,10. NOTE: The best five grades to drop does not contain any of the best four grades to drop.
COMMON APPROACHES TO FINDING ALGORITHMS Brute Force Greedy Algorithm Dynamic Programming
FINDING THE BEST r OF k GRADES TO DROP BY BRUTE FORCE Consider all the subsets of K. To drop 10 out of 100 grades, you would need to consider 17,310,309,456,440 subsets. At 1 Million subsets per second, it would take about 200 days to consider them all.
GREEDY ALGORITHM Take what looks like the best first step. Then take what looks like the best next step. Continue until a solution is found. Maybe it will be the optimal solution.
GREEDY ALGORITHM SHORTEST PATH
DYNAMIC PROGRAMMING Find the best solution for a small problem. Increase the size of the problem, and find the best solution for the new size. Continue increasing the size of the problem in increments until the final size is reached.
DYNAMIC PROGRAMMING KNAPSACK PROBLEM Your knapsack can hold a weight of 50. You can take as many of each item as you can fit. You want to maximize the sum of the benefits.
ITEM TYPEWEIGHTBENEFIT
BEST SOLUTION IF YOU CAN CARRY ONLY A WEIGHT OF 10 1 #1 for a benefit of 5. BEST SOLUTION IF YOU CAN CARRY ONLY A WEIGHT OF 20 2 #1 for a benefit of #2 for a benefit of 12. BEST SOLUTION IF YOU CAN CARRY ONLY A WEIGHT OF 30 1 #1 and best weight 20 for a benefit of #3 for a benefit of 20.
BEST SOLUTION IF YOU CAN CARRY ONLY A WEIGHT OF 40 1 #1 and best weight 30 for a benefit of #2 and best weight 20 for a benefit of #4 for a benefit of 24. BEST SOLUTION IF YOU CAN CARRY ONLY A WEIGHT OF 50 1 #5 for a benefit of #4 and best weight 10 for a benefit of #3 and best weight 20 for a benefit of 32. Best solution: 1 item #2 and 1 item #3.
Greedy algorithms and dynamic programming algorithms will not work for the dropping lowest grades problem because the best solution for n – 1 grades is unrelated to the best solution for n grades.
THE OPTIMAL DROP FUNCTION Want to maximize Rewrite as Define for each j, Want to find of size k – r and q so where q is as large as possible.
Define the Optimal Drop Function F(q) is easy and efficient to calculate. For a given q, just calculate the k f j (q) values and throw away the r smallest.
f j (q) for dropping 2 of Carl’s 4 quiz grades.
FIND ALL INTERSECTOINS There are k lines. Find the intersections of lines. Then calculate F(q) for each q at each intersection point.
BISECTION METHOD Start with x 1 and x 2 where the function F crosses the axis between x 1 and x 2. Find x 3 half way in between. Determine on which side of x 3 the function F crosses the axis. Continue until you are satisfied.
NEWTON’S METHOD?? Start with any q 1. Find F(q 1 ). Follow the line segment to q 2 on the axis. Repeat until q best is found.