Skip
# Make a function of this graph. That's like an anti-graph!

(adsbygoogle = window.adsbygoogle || []).push({});

(adsbygoogle = window.adsbygoogle || []).push({});

Post

# Make a function of this graph. That's like an anti-graph!

November 22, 2007 9:24 AM Subscribe

Help me create a function from a graph, details inside.

I want to create a function from this xkcd webcomic that depicts the so-called Ballmer Peak. To make it simple, I want the y-axis to peak at 10. Get out your calculators!

I want to create a function from this xkcd webcomic that depicts the so-called Ballmer Peak. To make it simple, I want the y-axis to peak at 10. Get out your calculators!

Maybe a Poisson distribution that's offset to the appropriate spot.

posted by GuyZero at 9:39 AM on November 22, 2007

posted by GuyZero at 9:39 AM on November 22, 2007

fatllama almost duplicated mine exactly.

4*exp(-(x/0.07)^2)+10*exp(-(160*(x-0.14))^2)

posted by Wolfdog at 9:42 AM on November 22, 2007

4*exp(-(x/0.07)^2)+10*exp(-(160*(x-0.14))^2)

posted by Wolfdog at 9:42 AM on November 22, 2007

I combined a modified logistic curve (the overall trend of the graph) and a normal distribution curve (the spike in the graph).

The gnuplot equation is: 1-1/(1+exp(-(x-6)))*.5 + exp(-abs(x-10)**2*10)

The peak at x=10 is because of the term (x-10) in the second part of the equation. The height of the peak can be changed by multiplying the whole term, and its tightness by changing the "*10" inside the term.

posted by jepler at 10:40 AM on November 22, 2007 [1 favorite]

The gnuplot equation is: 1-1/(1+exp(-(x-6)))*.5 + exp(-abs(x-10)**2*10)

The peak at x=10 is because of the term (x-10) in the second part of the equation. The height of the peak can be changed by multiplying the whole term, and its tightness by changing the "*10" inside the term.

posted by jepler at 10:40 AM on November 22, 2007 [1 favorite]

Gatllama, Wolfdog, and jepler all answered the question you asked but this might be useful for other people reading this thread. Enguage Digitizer is a free tool for analyzing images of graphs to get discrete data points from them. [link]. Useful when you can't get raw data from journals or papers. You still have to get the equation from the data, but even can do a credible job of that.

posted by KevCed at 4:14 AM on November 23, 2007 [1 favorite]

posted by KevCed at 4:14 AM on November 23, 2007 [1 favorite]

This thread is closed to new comments.

For instance,

y = 4 exp{-x^2/(0.1)^2} + 9 exp{-(x-0.13)^2/(1e-5)}

With a bit more work, you can constrain the coefficients to always have a certain maximum, like 10, but these seem to give you something close.

posted by fatllama at 9:39 AM on November 22, 2007