Function of a curve from a graph

As long as your standard deviation is small relative to 50, this will never be an issue.

I’m assuming CC wants to construct a function that has some reasonable chance of returning results in the 1-10 range; if that’s the case, then he’s likely to get results below zero, also. If he just wants to focus on a tight range around, sy, 50, then agreed.

Thanks for the tip-off on Excel.

What if I need to code in C# or say, another language?

Find somebody else’s code and use it. Numerical programming is hard even for people who know the math underlying a given problem. If you have the capability to link against C++ libraries or make calls into a .dll, you should use the Boost libraries.

Sorry to come back with another question on diminishing/increasing return. Let suppose I have a range of values x0 to x1, and y0 to y1, and I want a function such that

f(x0) = y0 and f(x1) = y1, but everything else in between is on a diminishing/increasing curve. Is there anyway to do that?

f(x) = a*log(x) + b should work.

Thanks once more. Is it possible to specify the steepness of the curve?

You need the function to satisfy y0 = alog(x0) + b and y1 = alog(x1) + b, so other than picking those two points, no, you don’t have any additional control. You could use square roots in place of logs if that works better for you.

Thanks for the explanation, wish I see the use of those log() and expo() functions back when I studying them during school.

If I am looking for a diminishing return graph, how would I change the formula?

I have tried this out and it works great, just one issue - it doesn’t work for negative numbers (I think x^C when x < 0 triggers an overflow and it becomes a massive negative number)

The problem is that, e.g., x^(0.5) can’t be a real number when x < 0 (since it’s the square root of a negative number).

Oh. Didn’t realize you needed to handle negative numbers (I was thinking you were starting with “skill values” which would always be positive). You can always add an offset:

y = A + B*(x+D)^C

where D would be the absolute value of your most negative “x”.