An alternative method for finding the median is to find the root of the equation
g(a) = N i=1 |Xi − a| = 0.
(a) What root-finding methods might be appropriate for this problem?
(b) Can you take care of the problem of multiple roots as a function of N being even or odd?
(c) Code a routine following this approach and compare it to fstmed.
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here