How do I estimate a smooth cdf from a set of observations?

I have a set of observation, let's call it $X$ and would like to fit a cdf to it. $X$ has a distribution which is roughly approximable with the normal distribution. This CDF should correspond to a continuous distribution function.

So far I've used a parametric approach by estimating mean and standard deviation and using a normal cdf but I would like to know what other options are available and how to use them.

How does the set of available option change if I require the cdf to be a smooth curve?

• Search our site for kernel density estimation (or try the kernel-density-estimate tag, on which there are hundreds of posts. For example, there's one with pictures here. There are other forms of nonparametric density estimation, but this is the most common. There's also wikipedia. It's a standard function in many stats packages. ... ctd Commented Oct 5, 2015 at 23:10
• ctd ... this gives a smooth pdf, as a finite mixture of the density of the kernel. One way to get a smooth cdf, is to take the cdf corresponding to that kernel and take the same mixture over it. (... now I read the answer more closely, I see that's what it's getting at, but I'll leave my comment as it offers more detail, including an easy way to get a bandwidth, even if it's not optimal for the cdf). Commented Oct 5, 2015 at 23:23
• A rougher but simpler method to program would simply cumulate the density (scaled by the gap in x-values), which you could do in R like so: y=rgamma(100,10,1);plot(ecdf(y));d=density(y); lines(d$x,cumsum(d$y)*(d$x[2]-d$x[1]),type="l",col=2,lwd=2) Commented Oct 6, 2015 at 0:12