How to convert a histogram to a PDF I know this may be an easy question, but due to lack of math knowledge I do not know the answer. Would you please explain to me with a simple example that how can I find PDF from a histogram. Thank you a lot.
 A: In a nutshell - you cannot. Histogram does not contain enough information regarding the distribution to obtain it.
You can (very roughly) estimate it by a discrete pdf, where $pdf(x) = \frac{histogram(bin(x))}{\sum_{bin} histogram(bin)}$, where $bin(x)$ is the bin containing $x$, and $histogram(y)$ is amount of points in the $y$'th bin. 
Although if you have access to the samples that were used to create a histogram you can use density estimation techniques, for example kernel density estimation.
A: For each bin in the histogram, the probability of that value is the number of counts in the bin divided by the total number of counts in the histogram.
Added:  if you want, you can then try to find a distribution that "looks like" the histogram.  If your histogram looks like a normal distribution, you could assume the distribution is normal and do a fit to find the parameters, then claim that is the PDF.
A: Trying to give answer with an example. 
% Matlab code to get the pdf from set of samples  
n = 1e5;                   % Total number of samples
x = 2*rand(1,n)-1;        % generate uniform distribution samples
b = 0.1;       % bin width, should be lesser to get more accurate PDF
[h,k] = hist(x,[-5:b:5]);
plot(k,h/n/k); 
Note that you should also devide the h by total samples and bin width. 
