I want to find a point estimator for median and mode of samples of a simulation. I know the mean has a form like this :
$\overline{X}_n = \frac1n \sum_{i=0}^{n} X_i $
i have found this equation on this forum : Best estimator for median
$\sum_{i=0}^{n}|X_i - s|$
but i don't know how to put it into practice in simulation. can anyone help with it?