I have in my head a very simple concept, but it's difficult to search for. I feel like there must be a function for this in statistics, but I have no idea what to look for.
I have a 1 dimensional data set, a simple column of numbers. Let's say it's {1, 3, 6, 8, 5}. I want to find the absolute average difference, or step, between each data point. In this case the differences would be {2, 3, 2, 3}, so the average would be 2.5.
This post is after the same data, and I know I can generate a second set of data, then average it. But is there a statistical function that does this on the data set directly, without having to make an intermediate data set?
Thanks, Ian
Edit: Clarification regarding absolute steps
I don't think there is any way to compute $${1\over n}\sum_{j=1}^n|a_j-a_{j-1}|$$ without computing the individual numbers $|a_j-a_{j-1}|$.