I have a two different lists. One holds the values of the mean that was calculated from other sublists and another list which holds the standard deviation. Is there a way to find the best combination?Meaning to find the highest mean with the lowest standard deviation? This one is the list of means(with maximum 4.0):
[3.2577333333333334, 3.5, 3.381622807017544, 3.3605494505494504, 3.5, 3.1649999999999996, 4.0, 3.3724369747899154, 3.404678362573099, 3.4175, 3.5850000000000004, 3.3506896551724132, 3.3122834645669292, 3.125, 3.395, nan, 3.5850000000000004, nan, 3.4945999999999997]
This one is the list of standard deviation calculated:
[0.4258484028644727, 0.0, 0.37176233660557445, 0.4186736320715765, 0.165, 4.440892098500626e-16, 0.0, 0.4039026348822172, 0.38311593614201667, 0.0825, 0.08499999999999996, 0.41627395682935037, 0.40617175486607743, 0.37978612402245554, 0.32033363289488725, nan, 0.08499999999999995, nan, 0.28036590377576226]
What I want is to rank all the means based on the standard deviation. To rank them based on the top combinations those two can make.
For example the mean 3.2577333333333334 with standard deviation 0.4258484028644727 is worse than the mean 3.381622807017544 with standard deviation 0.37176233660557445.
The mean list is the average GPA for some courses, that is why I need to rank all of them based on the best combinations. I do not know if I can do something like this with something that already exists since I am new to this or if I should find my way of doing it.