I have a dataset of thousands of values arranged in one column. Over time, those values create a curve that resembles, say, a sine curve, moving up to a peak, down to a bottom point, and moving back up again.
Given the set of numbers, I want a formula that tells me the slope of the curve at that point. For example, if the six most recent points in the set are 44.9, 50.0, 53.0, 53.1, 50.0, 49.1 I want the formula to show that 49.1 is decreasing from the peak with a slight negative slope. Further, if the next six points are 47.5, 41.6, 35.4, 23.6, 11.5, -2.0, I want to show that -2.0 is around halfway between the peak and the bottom with a large negative slope.
How can I do this in calculus to get more accurate results than just taking the slope of the last few numbers?
The curve isn't uniform like a sine curve. I guess the best example I could give is how the stock market fluctuates somewhat randomly but often rises to peaks and descends to valleys.
In other words, is there a way to find a derivative for a set of points that don't belong to a function?
Because your points are at discrete intervals you will have to take the gradient between the points with the normal rise over run method.
You can approximate the gradient at a point by using the rise over run method using the the previous point and the point after that. Although I can't see this being very accuarate.