I am trying to fit the (probability density) histogram of some data with the exponential function, but I am having difficulties.
My raw data are in file called datachopped
. They are not 'probability density'. I want to fit the probability density histogram of this data with Exp[-x]. So I use the following command:
Histogram[datachopped, Automatic, "PDF",
Epilog -> First@Plot[Exp[-x], {x, 0, 4}, PlotStyle -> Red]]
This gives me this plot:
The data is/was here
However, I don't know how well this plot fit, i.e., how to compute the chi-squared, etc. Any help would be appreciated.