79313913

Date: 2024-12-28 14:10:56
Score: 1
Natty:
Report link

The code in the previous answer contains the line
signal = [c + np.random.normal(0, sigma_e)]
but it should be
signal = [np.random.normal(mu, sigma)]
As it is, all signal samples have lower standard deviation than desired, with the first being the worst, and the standard deviation approaches the target of sigma as the number of samples approaches infinity. With the change, all samples will have standard deviation sigma.

The code should allow for negative auto-correlation coefficients as well.

Unfortunately, the system didn't want to allow me to do anything but add my own new "answer".

Reasons:
  • Long answer (-0.5):
  • No code block (0.5):
  • Low reputation (1):
Posted by: Michael Wiener