Recently, I introduced the golden search method – a special way to save computation time by modifying the bisection method with the golden ratio – and I illustrated how to minimize a cusped function with this script. I also wrote an R function to implement this method and an R script to apply this method with an example. Today, I will use apply this method to a statistical topic: minimizing the sum of absolute deviations with the median.
While reading Page 148 (Section 6.3) in Michael Trosset’s “An Introduction to Statistical Inference and Its Applications”, I learned 2 basic, simple, yet interesting theorems.
a) $latex mu$ minimizes the function $latex f(c) = E[(X – c)^2]$
b) $latex q_2$ minimizes the function $latex h(c) = E(|X – c|)$
I won’t prove…
View original post 1,012 more words