Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a set of about 500 values, from which I'm currently plotting a histogram.

I'd like to plot a frequency curve, i.e. go from the left two graphs to the rightmost on the below image borrowed from Wolfram MathWorld.

Frequency curve

If I can manage this, I'll then have frequency curves for various points in time. I'd like to smoothly interpolate between them.

i.e. if I have a frequency curve at 1 month, another at 3 and another at 6, I'd like a function that accepts a range and a time, and returns the approximate frequency of that range at that point in time.

I don't really know where to begin with this. Any pointers on what I should read up on to accomplish this? And any ideas as to how can I go about doing it?


By "maintain the peak throughout" I mean that interpolating between two curves like these two:
1/(E^(x^2/2) Sqrt[2 Pi]) 1/(E^((-5 + x)^2/2) Sqrt[2 Pi])

Should not result halfway in a curve that looks like this:
((1/(E^(x^2/2) Sqrt[2 Pi])) + (1/(E^((-5 + x)^2/2) Sqrt[2 Pi])))/2

But should look like this:
1/(E^((-2.5 + x)^2/2) Sqrt[2 Pi])

share|cite|improve this question
What you are looking for is kernel density estimation. This can be done with any reasonable statistics software. – Nameless Oct 20 '13 at 14:49
@Nameless Thanks very much for the pointer. Any recommendations for how to create a smooth interpolation that maintains the peak throughout? – Alec Oct 20 '13 at 23:19
What do you mean "maintain the peak throughout"? – Nameless Oct 20 '13 at 23:40
@Nameless I've edited the question with graphs to clarify – Alec Oct 21 '13 at 12:09
Yes, you can do that with kernel density estimation. It depends on the bandwidth whether two peaks are summarized in one (large bandwidth), or whether they remain (smaller bandwidth). – Nameless Oct 21 '13 at 13:12

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.