# Probability density function for continuous random variable

I recently picked up stats and went through discrete and continuous random variables. Discrete variables are straight forward, you have discrete values, you can get a frequency plot and convert the frequency plot to proportions and tada you have the probability distribution. No sweat!

But the same cannot be applied to continuous variables. We cannot have a frequency plot( which essentially will be a frequency of 1 for each value), so we plot grouped frequency(histograms). So how do we move to probability density function from here, we can not get the proportions from the grouped frequency or can we? For example- I collected weights of my batchmates to 2 decimal places, now how do I get the probability density function from it or plot it?

• It is impossible to get pdf from sample; what you can get is the estimate of the pdf. – user158565 Jul 24 '19 at 16:02
• @user158565 good point, I've edited my answer to say "estimate of" instead of pdf directly. – Huy Pham Jul 24 '19 at 16:23