I create a 4th or 5th degree fit curve to find the extrema point of distribution. However, how will I calculate the margin of error of the extrema on x values? Is there any statistical method or function to calculate this?
The picture below, shows the light change over time of an astronomical event. Red vertical line represent the extrema point. How can I find the margin of error on the x-axis of the extrema point? Because the position of the extrema point will also change due to the margin of error in the y values.