# Median and mode point estimator for simulation

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?

• Can you say where you´ve found the term? The context is not really obvious. Jun 27, 2019 at 13:57
• @callculus We have done simulation and now we have some samples $X_1,X_2,...,X_n$ and we want to find the median of the whole model by simulation,got it? Jun 27, 2019 at 14:10
• More or less... But what about "i have found this equation on this forum" ? Where have you find it? Jun 27, 2019 at 14:17
• @callculus i'm so sorry i edited the post. Jun 27, 2019 at 14:22
• Well then, the sample median is an unbiased estimator of the population median. There is a "CLT" for medians which requires that the population density be non-zero at the median. // However, even though unbiased, the sample median need not be the best estimator of the population median: For normal dist'n , population mean and median are the same. Sample mean has smaller variance than sample variance. Jun 28, 2019 at 23:01