I hope that someone can help me with this! I have a list of values as below:


and I need to find the CDF! how can calculate and present that in a chart?

I do appreciate any help with this. Thanks in advance.

  • 1
    $\begingroup$ Welcome to CV! The empirical cumulative distribution function? If so, what don't you understand about calculating it? $\endgroup$ Jan 8, 2015 at 17:09
  • 1
    $\begingroup$ In R, you can calculate ECDF by calling ecdf(data), where data is a vector, consisting of your data values. Please see more details here and here. $\endgroup$ Jan 8, 2015 at 17:23
  • $\begingroup$ Is there a way in which I can do it in excel? $\endgroup$
    – Lina
    Jan 8, 2015 at 17:34
  • 1
    $\begingroup$ Undoubtedly you can do it in MS Excel, but if your question is really about that it is off-topic here. See advice in the Help Center about software-related questions. Whatever the software, the recipe is sort the values from smallest to largest, and form the cumulative or running sum of fractions 1/$n$ for sample size $n$. If you want to sort from largest to smallest, that is the reverse or complementary (cumulative) distribution function or survival or survivor function. $\endgroup$
    – Nick Cox
    Jan 8, 2015 at 18:51
  • $\begingroup$ Lina - what are the values in your question? $\endgroup$
    – Tim
    Jan 9, 2015 at 9:20

1 Answer 1


$\hat{F}(x)$ is simply the proportion of observations $\leq x$.

That proportion only changes at observation values (it's a step-function).

So you count the proportion of observations at or below each data value, and use the fact that the function will be constant until the next data value to obtain the empirical cdf for any $x$.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.