0

I can create cumulative distribution by issuing following steps (as explained in this question):

> X = rnorm(100) # X is a sample of 100 normally distributed random variables
> P = ecdf(X)    # P is a function giving the empirical CDF of X
> P(0.0)         # This returns the empirical CDF at zero (should be close to 0.5)
[1] 0.52
> plot(P)        # Draws a plot of the empirical CDF (see below)

Question: is it possible to reduce somehow the size of the X sample that way the original X sample and reduced X sample will both have same CDF shape (after plot)? Is this even mathematically possible? Thanks.

Wakan Tanka
  • 523
  • 2
  • 6
  • 13
  • Since ECDF is defined in terms of individual datapoints, each having same 1/n weight, you cannot get "the same" ECDF. What exactly are your requirements? Why do you need to make the sample size smaller? – Tim Sep 13 '17 at 08:38
  • We use 3rd party tool for displaying CDF plots on the web. Problem is that this tool is limited to display max 5000 entries. – Wakan Tanka Sep 13 '17 at 08:43
  • 1
    Maybe take every $k$th element of the ordered data? – Glen_b Sep 13 '17 at 12:22

0 Answers0