1
$\begingroup$

I want a function that curves similarly to this graph. Following the one equal to 1.

Basically I want the y axis minimum to be 0.5 and the y maximum to be 3. The x axis minimum to be 0 and the x maximum to be 2,500,000. So when I put 0 in the function it will be 0.5. This could be done linearly but I want a curve like the one in the graph above. I want the y axis to increase fast and then slow done.

I've asked this same question before but I didn't get help on it. I hope this is worded better for solutions. And yes I've looked into Cumulative distribution functions like the one in the picture but have no idea how to implement it like I want to.

$\endgroup$
  • 1
    $\begingroup$ Take your favorite function that has a graph like that on the region $[0,1]\times [0,1]$ (for example $f(x)=\sqrt{x}$). To make the total height occupied by $y$ to be $3-0.5=2.5$ modify the original function to be $2.5f(x)$. That has the effect of "stretching" vertically. To make the $y$ minimum be $0.5$, modify the original function further as $2.5f(x)+0.5$. That has the effect of "shifting" vertically. Then, to make $x$-max be $2.5\cdot 10^6$ modify further as $2.5f(\frac{x}{2.5\cdot 10^6})+0.5$. That has the effect of stretching horizontally. $\endgroup$ – JMoravitz Dec 20 '17 at 21:20
  • 2
    $\begingroup$ I.e. one such function might be $f(x)=0.5+2.5\sqrt{\frac{x}{2.5\cdot 10^6}}$. You can modify other examples similarly. $\endgroup$ – JMoravitz Dec 20 '17 at 21:21
  • $\begingroup$ This is what I am looking for and I get this. Is there anyway to make it faster and then have it slow down towards the end? $\endgroup$ – John Doe Dec 20 '17 at 21:31
  • 2
    $\begingroup$ By choosing a different original $f(x)$. You say you've looked into cumulative distributions. Well... pick your favorite cumulative distribution whose sample space is $[0,1]$. $\endgroup$ – JMoravitz Dec 20 '17 at 21:33
0
$\begingroup$

Try with: $$y=0.5+2.5\left(\frac{x}{2500000}\right)^{\frac{1}{k\cdot\lambda}}$$

You can adjust the parameter $k\geq1$ in order to have the best fitting you need.

$\endgroup$
  • $\begingroup$ without adding 0.5 to this it just goes to 0.99999996 when I put in the max number I want for x (2,500,000). And with adding 0.5 it goes to 1.4999996. I want that number for 2,500,000 to be 3. $\endgroup$ – John Doe Dec 20 '17 at 21:24
  • $\begingroup$ This is exactly what I wanted I can even use k as a scale to accelerate the speed. Thank you JMoravitz and Jacob Classen for teaching me more about graphs and math in general. $\endgroup$ – John Doe Dec 20 '17 at 21:40
  • $\begingroup$ You are welcome, you can also upvote them to thanks! Bye. $\endgroup$ – gimusi Dec 20 '17 at 21:43
  • 1
    $\begingroup$ I have but it doesn't show up because of my rep. $\endgroup$ – John Doe Dec 20 '17 at 21:45
  • $\begingroup$ @JohnDoe I'll upvote them for you! $\endgroup$ – gimusi Dec 20 '17 at 21:47
1
$\begingroup$

$f(x)=1-(x+1)^{-\gamma}$, should do the trick as a base, you can use linear transformations to make it your own

$\endgroup$
  • $\begingroup$ I have no idea how to do linear transformations I guess I'll have to look more into it thank you for the answer. $\endgroup$ – John Doe Dec 20 '17 at 21:22
  • 1
    $\begingroup$ @JohnDoe given an original function $f(x)$ one can construct a related function $v_{\text{shift}}+v_{\text{scale}}f(h_{\text{shift}}+h_{\text{scale}}x)$. The values of $v_{\text{shift}}$ and the rest will modify the function in their own respective ways by shifting or scaling horizontally or vertically. $\endgroup$ – JMoravitz Dec 20 '17 at 21:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.