Break down a step graph

I have a series of step graphs that look like the sample image below. What I need to do is look at the data at each step and find the mean, variance, etc. for that subset of data. I've tried creating a histogram and looking at the high points but that doesn't necessarily capture each set of data (some of the data sets are messier than the graph below suggests). Any ideas on how to do this short of writing a long script?