# How to determine decay rate?

Three decay solid lines are plotted in the graph below. They are sqrt(1/n), sqrt(log(log(n))/n) and sqrt(log(n)/n) respectively.

I plot my dataset on the graph as the hdi dashed line. How to determine which decay line the hdi dashed line is closest to? In fact, for every decay line, I can multiply the hdi line by a constant to make it look very close to it. My question basically is: how to determine the decay rate for a given line?

• I'd suggest you try log-log scaling on your plot; it should make it easier to see detail. Multiplication by a constant would be converted to a shift so you're just be looking for parallel curves. Nov 7, 2019 at 0:23

As advised in the comments (+1), since y-values are very small, you can't observe the asymptotical behaviors of the curves with this scale (at least clearly). Just add plt.yscale('log') to your plotting lines. It seems you're using Python matplotlib. Below is an example:

import numpy as np
import matplotlib.pyplot as plt

plt.figure(figsize = (18,6))
n = np.arange(2,40000)

plt.plot(n, np.sqrt(1/n), color = 'orange')
plt.plot(n, np.sqrt(np.log(np.log(n))/n), color = 'green')
plt.plot(n, np.sqrt(np.log(n)/n), color = 'red')

plt.yscale('log')
plt.show()


which has the following output: