How do I find the equation for estimated ratios, 1700:13, 1275:7, 450:3?

221 Views Asked by At

In the game SCP: Secret Laboratory, there's an enemy character called SCP-049 who can kill players and then resurrect them after a set number of seconds. These are the times that I've plotted out so far:

SCP-049 Health | Seconds until resurrection is complete
1700 hp        | 13 seconds
1550 hp        | 11 seconds
1275 hp        | 7 seconds
 850 hp        | 4 seconds
 450 hp        | 2 seconds
   1 hp        | 1 second

The seconds aren't perfect because I had to time them in my head instead of objectively with a timer.

It seems to be exponential and not linear. I've tried writing out an equation on a piece of paper but I wasn't able to figure it out.

How can I create a rough equation that's close enough to these ratios to be replicated?

5

There are 5 best solutions below

2
On BEST ANSWER

Simple quadratic or exponential work find:

enter image description here

4
On

An exponential fit seems close

enter image description here

2
On

It seems that from the graph, an exponential fit does the job. However, I experimented and found that adding a linear term increased the correlation:

enter image description here

$$y = 1.00144^x + 9.20443 \cdot 10^{-4}$$ $$R^2 = 0.9932$$

From the graph it seems like $(450,3)$ is an anomaly. However, if you measure that point again and it comes up with a similar result, then you can add a quadratic term to make that point fit:

$$y = 1.00164^x + 2.36515 \cdot 10^{-3}x - 2.42192 \cdot 10^{-6} x^2$$ $$R^2 = 0.9955$$

0
On

I tried a parabola $$ f(x) = 4.152249135\times 10^{-6} x^2+1.00000000 $$

parabola

4
On

Based on the power model $$y=a +b\,x^c$$ we can find (using nonlinear regression) $$a=1.20472 \qquad b=8.0561\times 10^{-7} \qquad c=2.21806$$ and this corresponds to $R^2=0.998985$ and $SSQ=0.365$. $$\left( \begin{array}{ccc} x & y & y_{calc} \\ 1700 & 13 & 12.9928 \\ 1550 & 11 & 10.8089 \\ 1275 & 7 & 7.43234 \\ 850 & 4 & 3.73834 \\ 450 & 2 & 1.82288 \\ 1 & 1 & 1.20472 \end{array} \right)$$

Based on the exponential model $$y=a+b\, e^{c x}$$ $$a=-0.425564 \qquad b=1.37329 \qquad c=1.34804\times 10^{-3}$$ and this corresponds to $R^2=0.999416$ and $SSQ=0.210$ (better than the previous one).

$$\left( \begin{array}{ccc} x & y & y_{calc} \\ 1700 & 13 & 13.1582 \\ 1550 & 11 & 10.6714 \\ 1275 & 7 & 7.23402 \\ 850 & 4 & 3.89352 \\ 450 & 2 & 2.09335 \\ 1 & 1 & 0.94958 \end{array} \right)$$