# Probability Density Function- Is continuous really continuous?

We know that PMF is for Discrete Random Variables whereas PDF is for Continuous Random Variables. But consider this thing. Say we are measuring the height of all women in India, now say their heights range between 130cm to 165cm. Now while collecting data we get the height of some women as 152.65341414cm, 152.8797194791cm , 152.8794917491cm. Now can we really plot them on the graph? We need to take the ceil or the floor value right? That is we are actually taking a discrete value. So while data collection even in case of a continuous random variable isn't it that we need discrete points to set up our PDF graph and from there we can actually do the continuous stuff like when asked what is the prob that height is between 150-156cm we can now integrate the f(x) obtained from the graph.

So my question is in PDF do we actually plot continuous data or we plot discrete data and from there we reach the calculations for continuity?

for example say when we work with the Irish Dataset (https://archive.ics.uci.edu/ml/datasets/iris) we plot the length of the petals like this in a graph

and from there we draw the Gaussian distribution curve, but the plotting is actually based on some discrete values.

• Those heights seem awfully precise.
– J.G.
May 8, 2020 at 12:12
• That is the point, in continuous data precision can be anything right? That is why I am considering ceil or floor value to be taken, and while doing so, we are making them discrete May 8, 2020 at 12:21
• So it continuity used anymore while plotting? It is much more like plotting using discrete data points and then using continuity concept to get the idea about a certain range May 8, 2020 at 12:22
• just upvoted @Toni answer below but also wanted to comment that the discrete fit (bar histogram) to the data above isn't necessarily the "best" pdf from the standpoint of entropy minimization. If the underlying model for bar graph histogram is that first bin starts at $L_0$ = 1.0 with bin width $\Delta L$=0.075 (appears to be near this value) ... it could be that the entropy is minimized with a choice of $L_0$ = 1.05 with a bin width of $\Delta L$=0.067 ... a continuous fit to the data, using KDE as suggested below in answer for instance, might not be the entropy minimizing fit either. May 8, 2020 at 12:53
• entropy being $\sum p_i \ln p_i$ where, for constant width bin histogram, each $i$ is a bin and $p_i$ is the fraction of data points which fall in that bin May 8, 2020 at 12:54

When we measure a continuous random variable $$X$$ of PDF $$f_X$$ to a finite precision with discrete support $$S$$ as an approximation $$Y$$ of $$X$$, so that functions $$g,\,h$$ exist with $$g(y),\,h(y)$$ respectively the infimum and supremum of the set of values of $$X$$ consistent with $$Y=y$$, $$Y$$ has PMF $$f_Y(y)=\int_{g(y)}^{h(y)}f_X(x)dx$$. If $$h-g$$ is small, $$f_X$$ varies little over this interval so $$f_Y(y)\approx(h(y)-g(y))f_X(y)$$, and this reduces to an approximate proportionality relation if $$h-g$$ is constant. This is an exercise in numerical integration.
What you should actually think when you speak of a density function is a limiting concept.Without going into the measure theoretic details regarding absolute continuity and Radon Nikodym derivatives,its better to consider the distribution of a unit mass over $$\mathbb{R}$$ to be given by a differentiable function $$F$$ such that for each real $$x$$, $$F(x)$$ represents the amount of mass distributed in $$(-\infty,x]$$.Now,for a point $$x$$ in $$\mathbb{R}$$, what do you think your answer should be when you speak of the amount of mass concentrated in an interval $$(x-h,x+h)$$ around $$x$$?Precisely $$F(x+h)-F(x-h)$$, right?And since this interval measures $$2h$$ in length, you would say the density of the material distributed over this interval is $$d_{h} = \frac{F(x+h)-F(x-h)}{2h}$$.Now,what happens if I make $$h$$ smaller and smaller?Due to the differentiability of $$f$$, $$d_h$$ would actually tend towards $$F'(x)$$, this is what you call the 'density' at the point $$x$$, which happens to be the limit of densities of the mass distributed over an arbitrarily small interval around $$x$$. On doing this pointwise, the function $$F'(x)$$ you end up with is what you call the 'density' function.In real world examples,however,you mostly perform random experiments with finitely many trials, and hence,when you plot the results like you did,it gives you a step function which is an approximation to $$f$$.This approximation gets better and better as you keep on refining,that is increase the number of trials for your experiment.The density function,I repeat,is a theoretical concept.