I appreciate any hints on how to solve this problem mathematically. I'm also not sure how it should be solved, if it should be calculus then I will move the post to that forum. I tried uploading a spreadsheet but the site would not allow it so I will post the data below, which you can copy to a spreadsheet. The left column is the item #, which can be ignored, and the next column is a set of observations for each item, I'm calling this variable z.
There are 109 items. I sorted the items by descending value of z. I need to find the solution such that 5000 divided by (number of items) will be greater than the minimum value of z (I can delete items/observations). As an example, if I take 5000/ 109, it is 45.9, which is greater than 0. By removing the bottom items below that value, I can take 5000/ 56, which still does not work. By trial and error I then used 46 and 44, which is the solution, as 5000/44 = 113.6 and the 44th item has a value of 131, which is greater than 113.6. I know there must be some way to express this mathematically but I have not figured it out. Thanks for any help!
| 1334 | 5333.2 |
| 1089 | 4644.4 |
| 173 | 4405 |
| 1855 | 2420.8 |
| 768 | 1958.2 |
| 1269 | 1668.4 |
| 785 | 1553.2 |
| 560 | 1414.4 |
| 298 | 1391.6 |
| 1404 | 1088.2 |
| 783 | 1039.6 |
| 1637 | 780 |
| 746 | 723.6 |
| 1562 | 711.6 |
| 1271 | 650 |
| 306 | 630.2 |
| 1816 | 582.8 |
| 994 | 533.2 |
| 1649 | 491.2 |
| 1779 | 440.6 |
| 95 | 414.4 |
| 302 | 393 |
| 1000 | 390.2 |
| 65 | 388.6 |
| 193 | 383 |
| 1059 | 336 |
| 1255 | 334.4 |
| 1329 | 313.8 |
| 1689 | 310.4 |
| 2177 | 282.8 |
| 805 | 270.2 |
| 464 | 253.8 |
| 1201 | 252 |
| 1273 | 242.4 |
| 1378 | 242.2 |
| 1653 | 241.6 |
| 1106 | 192.6 |
| 512 | 192.4 |
| 2094 | 178.4 |
| 167 | 137.2 |
| 1621 | 136.6 |
| 2148 | 134 |
| 1546 | 131.8 |
| 401 | 131 |
| 967 | 101.2 |
| 1596 | 99.4 |
| 1557 | 75.8 |
| 809 | 73.8 |
| 1045 | 73 |
| 2082 | 66 |
| 161 | 65.8 |
| 521 | 60 |
| 1029 | 57.6 |
| 1202 | 50.6 |
| 1042 | 46.8 |
| 1992 | 46.4 |
| 933 | 41.4 |
| 1655 | 39.8 |
| 1850 | 39.6 |
| 862 | 35 |
| 192 | 33.6 |
| 1940 | 31.6 |
| 1506 | 30.2 |
| 2080 | 30 |
| 911 | 28 |
| 1725 | 27.6 |
| 2018 | 26.8 |
| 130 | 25 |
| 1569 | 24.4 |
| 1730 | 22.8 |
| 225 | 22.8 |
| 196 | 22 |
| 1994 | 20.8 |
| 1220 | 18.2 |
| 938 | 16.6 |
| 1376 | 16.2 |
| 1193 | 14 |
| 251 | 13.4 |
| 1250 | 12.4 |
| 727 | 10.4 |
| 2093 | 9.2 |
| 1380 | 8 |
| 2013 | 6.6 |
| 1398 | 6.6 |
| 272 | 3.8 |
| 1346 | 3 |
| 1091 | 2.6 |
| 750 | 2.6 |
| 1543 | 2.4 |
| 178 | 1.8 |
| 887 | 1.4 |
| 1504 | 1 |
| 1141 | 1 |
| 2186 | 0.8 |
| 652 | 0.8 |
| 1118 | 0.6 |
| 1040 | 0.6 |
| 842 | 0.4 |
| 492 | 0.4 |
| 393 | 0.2 |
| 1050 | 0.2 |
| 565 | 0 |
| 1610 | 0 |
| 179 | 0 |
| 1203 | 0 |
| 1559 | 0 |
| 2202 | 0 |
| 1741 | 0 |
| 1449 | 0 |
There are 109 items. I sorted the items by descending value of z. I need to find the solution such that 5000 divided by (number of items) will be greater than the minimum value of z (I can delete items/observations). As an example, if I take 5000/ 109, it is 45.9, which is greater than 0. By removing the bottom items below that value, I can take 5000/ 56, which still does not work. By trial and error I then used 46 and 44, which is the solution, as 5000/44 = 113.6 and the 44th item has a value of 131, which is greater than 113.6. I know there must be some way to express this mathematically but I have not figured it out. Thanks for any help!