Empirical PDF from Empirical CDF

(cross post)

Suppose I do an experiment N times and get a vector X of results. Let C_X(y) be the empirical cumulative distribution function of X. Suppose X is sorted so that x_1 \leq x_2 \cdots \leq x_N. Approximately,
C_X(y)=0\textrm{ if }y \leq x \textrm{ for all }x \in X
C_X(y)=1\textrm{ if }y > x \textrm{ for all }x \in X
C_X(y)=\frac{i+\frac{y-x_i}{x_{i+1}-x_i}}{N} \textrm{ if } x_i \leq y \leq x_{i+1}

Question: What is the most efficient way to compute the corresponding empirical PDF of X? Just interpolate through the histogram?

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s