# Calculating the Mean of a Range with Floor and Ceiling Functions?

I did a survey a couple months back, and one of the questions required a range of numbers. I may have discovered my own formula for how to calculate the mean of a range of numbers, but I don't know where to start on proving it, and also, I'm not sure if there is an easier way to do this or not, but I haven't been able to find out. Also, is it important enough to work on publishing it. I don't think it is at all, but it can't hurt to ask.

$$r_n$$ corresponds to each range, where $$r_1$$ is the minimum range and $$r_n$$ is the maximum

$$s_{r_n}$$ equals the amount of responses for a given range $$r_n$$

$$w_n$$ corresponds to the weight of each $$r_n$$, incrementally increasing by $$1$$

$$w_\mu$$ equals the mean weight of all the ranges

$$\lceil r_\mu \rceil$$ and $$\lfloor r_\mu \rfloor$$ are the maximum and minimum, respectively, of the range that corresponds to $$w_\mu$$

$$\mu$$ equals the mean of the entire range

$$\frac{s_{r_1}w_1+s_{r_2}w_2+...+s_{r_n}w_n}{s_{r_n}+s_{r_1}+...+s_{r_n}}=w_\mu$$

$$\lfloor r_\mu \rfloor + [(w_\mu-\lfloor w_\mu \rfloor) (\lceil r_\mu \rceil-\lfloor r_\mu \rfloor)]=\mu$$

Anyway, that's the whole thing. It's kinda in depth, but I'm pretty sure it works. I just have no idea how to prove it, and I doubt that it is even significant enough to attempt publishing or making known.