$\begingroup$

I posted this question on Math Overflow if you wish to answer there.

Consider $P:A\to\mathbb{R}$, where $A$ is a subset of $\mathbb{R}$.

I want the average of $P$ to ALWAYS be between the infimum and supremum of $P$'s range.

The average should follow the cases below

Case 1

The average of $P$ should $c_1=\frac{1}{b-a}\int_{a}^{b}P \ dx$, or the generalized Riemman integral, when $\lambda(A\cap[a,b])\ge 0$. Measure $\lambda$ is the lebesgue measure.

Case 2

If $\lambda(A\cap[a,b])=0$ and $A\cap[a,b]$ is uncountable, since the sets are divided into sub-intervals, where many are removed in $k$ repeated iterations; take a point from every defined sub-interval and divide it by the total number. The average of $P$ should be

$$c_2=\lim_{k\to\infty}\sum_{i\in S_k\cap[a,b]}^{}P(t_{k,i})(1/\left|i\right|)$$

Where $S_k$ is the remaining sub-intervals from iteration $k$, and $t_{k,i}$ is from the $i$th interval of $S_k$.

Case 3

If $\lambda(A\cap[a,b])=0$ and $A\cap[a,b]$ is countable then some measure $m(A\cap[a,b])$ should be $b-a$ whenever $A$ is dense in $[a,b]$; and, if more than one partitioned subset of $A$ is dense in $[a,b]$, or sub-intervals of $[a,b]$, then the measure of those sets should vary between $0$ and $b-a$. The remaining subsets with finite limit points or which are dense nowhere in $[a,b]$ should have a measure of zero.

Case 4

If $\lambda(A\cap[a,b])=0$ and $A\cap[a,b]$ is countable, then some measure $m(A\cap[a,b])$ should equal $b-a$ whenever $A$ is dense in $[a,b]$; and, $m(A_i\cap[a,b])=b-a$ if $A_i$ is the only partitioned subset dense in $[a,b]$. The remaining subsets that have finite limit points or are dense nowhere in $[a,b]$ should have a measure of zero.

For case 3 and 4, the average should be equivalent to

$$c_3=\frac{1}{b-a}\left(\sum_{j=1}^{k} P(x_{i})\Delta x\right) \ \ \ \ \ \ \ \ \ \ \ (1)$$

Where the partition of $[a,b]$ is a finite sequence of values $x_{i}$ such that $a=x_{0} < x_{1} < x_{2}< x_{3} < x_{4} <...< x_{k}=b$ and $x_{i}\in A$. Each interval $[x_{i-1},x_{i}]$ is a sub-interval of the partition and $\Delta x =x_{i}-x_{i-1}$. As $k$ approaches infinity, equation $(1)$ approaches the average of $P$.

Case 5

If $\lambda(A\cap[a,b])=0$, $A\cap[a,b]$ is countable and $A\cap[a,b]$ has finitely many limit points, then let $T$ be the limit points of $A$

For this case, the average should be equivalent to

$$c_4=(1/\left|T\right|)\sum_{x\in T} P(x) \ \ \ \ \ \ \ \ \ \ \ (1)$$

Case 6

If $\lambda(A\cap[a,b])=0$ and $A$ is finite, then the average of $P$ should be equivelant to

$$c_5=\sum_{x\in A}P(x) (1/|A|)$$

Case 7

If $A\cap[a,b]$ is positive but not full, then you should (somehow) partition $[a,b]$ into sub-intervals where one of the first 5 conditions MUST apply for each sub-interval. (If not, see case 6).

If first condition applies to any of the sub-intervals, take the measure of those sub-intervals and give the remaining sub-intervals measure zero. If the first condition doesn't apply to any sub-intervals; but, the second does, take the measure of those sub-intervals and give the remaining sub-intervals measure zero. If the first and second condition do not apply to any sub-intervals ; but, the third one does, take the measure of those sub-intervals and give the remaining sub-intervals measure zero. If the first, second and third condition don't apply to any of the sub-intervals but the fourth does, take the measure of those sub-intervals and give the remaining sub-intervals measure zero. So forth.

Have I covered all the cases for the average I am looking for? How do we combine all the averages into one equation?

EXTREMAL DENSITIES AND MEASURES ON GROUPS AND G-SPACES AND THEIR COMBINATORIAL APPLICATIONS

THE SOLECKI SUBMEASURES AND DENSITIES ON GROUPS

DENSITIES, SUBMEASURES AND PARTITIONS OF GROUPS