flattening line from noise

41 Views Asked by At

I have group of points that when plotted are creating the blue line. How can I calculate the red line?

Note: I plotted it with paint in windows, but generally speaking I what the blue line flattened to be close to the red line.

Thanks

link to the image- blue line is the input, red should be the output