1
$\begingroup$

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?

$\endgroup$
10
  • $\begingroup$ Can you say where you´ve found the term? The context is not really obvious. $\endgroup$ Jun 27, 2019 at 13:57
  • $\begingroup$ @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? $\endgroup$ Jun 27, 2019 at 14:10
  • $\begingroup$ More or less... But what about "i have found this equation on this forum" ? Where have you find it? $\endgroup$ Jun 27, 2019 at 14:17
  • $\begingroup$ @callculus i'm so sorry i edited the post. $\endgroup$ Jun 27, 2019 at 14:22
  • 1
    $\begingroup$ 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. $\endgroup$
    – BruceET
    Jun 28, 2019 at 23:01

1 Answer 1

3
$\begingroup$

The median is the value such that half of the density of above and half is below it.

To find the empirical median you put the data in a long vector. Then you sort the vector. The element in the middle of the vector is your empirical median (if there is an odd numer of elements). If the number of elements is even, the median is the average between the two central elements of the vector.

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .