Given a sequence of numbers $A = a_1, a_2, \cdots, a_n$.
One way to calculate the mean absolute deviation of $A$ is by $G(A)= \sum_{i=0}^n |a_i - median(A)|$.
yet, there can be an alternative, by first aggregating a histogram with $k$ bins. $A \to (w_1, w_2, \cdots, w_k)$ with edges $e_0, e_1, \cdots, e_k$.
And then get an approximation from bin edges and bin weights.
I'm wondering how can i bound the error given some $k$ bins and assuming $A \sim U(0, m)$. uniformly random.
If $k > n$, the resulting is clearly the same, but if $k<<n$, not sure how can i be sure about the result.