When calling the ecdf function (empirical cumulative distribution function), why is the first "x" value always duplicated? This means that the first 'F' output is always 0. For example:
Trial>> y = 0:10; Trial>> [f,x] = ecdf( y ); Trial>> disp(x') 0 0 1 2 3 4 5 6 7 8 9 10 Trial>> y = 5:15; Trial>> [f,x] = ecdf( y ); Trial>> disp(x') 5 5 6 7 8 9 10 11 12 13 14 15
In other words, the minimum value in the input array always appears twice, but the corresponding F value in the first instance is always 0. Since the ECDF is given by:
…is this correct?
Thanks!
Best Answer