SampleData = RandomVariate[RayleighDistribution, 5000]; Histogram[SampleData]
This creates a histogram that (in my case) looks something like this:
I want to fit this histogram with a curve. The documentation of RandomVariate shows something similar to what I had in mind:
(However the blue line isn't actually a fitted curve; the documentation is simply plotting the [known] analytical formula.)
How can I fit the histogram? The obvious way is to use
Interpolation, but the naive attempt to
Interpolation[Histogram[SampleData]] doesn't work; Mathematica complains that the histogram is not a list of data and coordinates.
Edit: My raw data contains about 6000 points and looks like this:
This isn't what I'm trying to fit however; I want to fit the histogram, which looks like this:
Ideally the defined "NewFunction" would be able to take input such as
NewFunction and return about 70. A normalized NewFunction would be even better.