Consider $P:A\to\mathbb{R}$ where $P(x)> 0 \text{,} \ $ $A$ is an subset of $\mathbb{R}$ and
$$P(x)= \begin{cases} P_1(x) & x \in A_1\\ P_2(x) & x \in A_2\\ \end{cases}$$
where $A=A_1\cup A_2$ and $A_1,A_2$ are pairwise disjoint.
What is the "most intuitive" average of $P(x)$, for all $x \in A\cap[a,b]$, that is unique and where $a,b\in\mathbb{R}$?
Note “unique” means a system that produces a single average, instead of multiple averages, using reasoning/intuition.
Also note this question is subjective but there are areas of math (such as measure theory) that is based on intuitions/ intuitive properties. For example, we can pick any arbitrary measure to find the average of Dirichlet's Function in $[0,1]$, but instead, we use the Lebesgue measure.
Why is the Lebesgue measure intuitive? Because if real numbers in $[a,b]$ are written as infinite, randomly generated digits; there is zero probability they will represent a number in $[a,b]$. Moreover, there is zero probability that finite, randomly generated digits will repeat infinitely to give rational numbers; hence, these digits have a probability $1$ of being irrational. Say we multiplied these intuitive probabilities times $b-a$. This gives the results of the Lebesgue measure. Hence we can state the Lebesgue measure is intuitive for these cases?
However, if we are focusing on countable $A\cap[a,b]$, it should still have a measure of one and the average of $P$ should exist between the infimum and supermum of its range. The problem is most countably additive measures of $A\cap[a,b]$ is zero giving $P$ an average outside the range.
What measure should we use instead? What do you think are intuitive properties/examples that the average should follow?
Here are two examples, I believe our measure and average should match
If $A$ has a Lebesgue measure of one the average of $P$ should intuitively be
$$\int_{\mu(A_1\cap[a,b])}P_1(x)dx+\int_{\mu(A_2\cap[a,b])}P_2(x)dx$$
Where $\mu$ is a measure that equals the Lebesgue measure (when the Lebesgue measure of $A$ is one).
Even better, we could use the Gauge Integral, which is far more general and doesn't use a measure. However, even the Gauge integral gives the average of $P$ zero, when defined on a domain with zero Lebesgue measure.
Here are two cases that the average of $P$, where the Lebesgue measure of $A\cap[a,b]$ is zero, should intuitively follow.
If $A_1$ and $A_2$ are finite in $[a,b]$, the average of $P$ is
$$\frac{\sum\limits_{i\in A\cap[a,b]}P(i)}{\left|A\cap[a,b]\right|}=\frac{\left|A_1\cap[a,b]\right|\sum\limits_{i_1\in A_1\cap[a,b]}P(i_1)}{\left|A_1\cap[a,b]\right|\left|A\cap[a,b]\right|}+\frac{\left|A_2\cap[a,b]\right|\sum\limits_{i_2\in A_2\cap[a,b]}P(i_2)}{\left|A_2\cap[a,b]\right|\left|A\cap[a,b]\right|}=\frac{\left|A_1\cap[a,b]\right|}{\left|A\cap[a,b]\right|}\sum\limits_{i_1\in A_1\cap[a,b]}P(i_1)\frac{1}{\left|A_1\cap[a,b]\right|}+\frac{\left|A_2\cap[a,b]\right|}{\left|A\cap[a,b]\right|}\sum\limits_{i_2\in A_2\cap[a,b]}P(i_2)\frac{1}{\left|A_2\cap[a,b]\right|}$$
And probability measure $\mu(X\cap[a,b])$ for $X\subseteq A$ is
$$\mathbf{W_1}=\mu(A_1\cap[a,b])=\frac{\left|A_1\cap[a,b]\right|}{\left|A\cap[a,b]\right|}$$
$$\mathbf{W_2}=\mu(A_2\cap[a,b])=\frac{\left|A_2\cap[a,b]\right|}{\left|A\cap[a,b]\right|}$$
$$\mathbf{W}_1\sum\limits_{i_1\in A_1\cap[a,b]}P(i_1)\frac{1}{\left|A_1\cap[a,b]\right|}+\mathbf{W}_2\sum\limits_{i_2\in A_2\cap[a,b]}P(i_2)\frac{1}{\left|A_2\cap[a,b]\right|}$$
If $A_1$ is countable infinite in $[a,b]$ and $A_2$ is finite, since $A\cap[a,b]$ is countably infinite, if $\mathbf{J}_m$ contains all finite subsets of $A\cap[a,b]$ where $\max\limits_{m\in\mathbb{N}}|\mathbf{J}_m|=\left|\mathbf{I}_n\right|\le n$; $\mathbf{I}_n$ is arranged as $\left\{a_1,a_2,...,a_n\right\}$ where $a\le a_1<a_2<...<a_n\le b$, and
$$ \max_{i\le n,i\in\mathbb{N}}\left(\text{diff} (\mathbf{I_n})\right)=\max_{i\le n,i\in\mathbb{N}}\left\{a_2-a_1,a_3-a_2,...,a_n-a_{n-1}\right\}\le K(n)$$
such that $K:S\to\mathbb{R}$, $\mu(S)=1$ and $\lim\limits_{n\to\infty}K(n)=\inf\text{diff}(A)$; then the measures $W_1$ and $W_2$ are
$$\mathbf{W}_{1}=\mathbf{\mu}(A_1\cap[a,b])=\lim_{n\to\infty}\frac{\left|A_1\cap \mathbf{I}_n\cap[a,b]\right|}{\left|\mathbf{I}_{n}\cap[a,b]\right|}$$
$$\mathbf{W}_{2}=\mathbf{\mu}(A_2\cap[a,b])=\lim_{n\to\infty}\frac{\left|A_2\cap \mathbf{I}_n\cap[a,b]\right|}{\left|\mathbf{I}_{n}\cap[a,b]\right|}$$
And $\text{avg}(P)$ is
$$\mathbf{W}_{1}\lim_{n\to\infty}\sum_{i_1\in A_1 \cap I_n \cap [a,b]}P_1(i_1)\frac{1}{\left|A_1\cap I_n\cap[a,b]\right|}+\mathbf{W}_{2}\lim_{n\to\infty}\sum_{i_2\in A_2 \cap I_n \cap [a,b]}P_2(i_2)\frac{1}{\left|A_2\cap I_n\cap[a,b]\right|}$$
Any $\mathbf{I}_n$ gives the same answer but I'm not sure how to prove this.
Moreover, if $A$ is dense in $[a,b]$,
$$\text{avg}(P)=\frac{1}{b-a}\mathbf{W}_1\int_{a}^{b}P_1(x) \ dx+\frac{1}{b-a}\mathbf{W}_2\int_{a}^{b}P_2(x) \ dx=\frac{1}{b-a}(1)\int_{a}^{b}P_1(x) \ dx+\frac{1}{b-a}(0)\int_{a}^{b}P_2(x) \ dx$$
$$\frac{1}{b-a}\int_{a}^{b}P_1(x) \ dx$$
Here's the proof. Since $A$ is dense in $[a,b]$, it can approximate arbitrarily close to any point in $\mathbb{R}$. Hence it's possible for the limits outside the domain to exist. We extend $P:A\to\mathbb{R}$ to $P:A \cup C\to\mathbb{R}$ where for $c\in \mathbb{R}\setminus A$
$$C=\left\{P^{-1}\left(\lim_{\left\{ x\in A\right\}\to c}P(x)\right) \right\}$$
Since $A_1$ is dense in $\mathbb{R}$, $P:A\cup C\to\mathbb{R}$ can be split into $P_1:A_1\cup C\to\mathbb{R}$ and $P_2:A_2\to\mathbb{R}$.
Since $A_2$ is the discontinuties of $P:A\cup C \to \mathbb{R}$ and the Lebesgue measure of $A_2$ is zero, the Lebesgue criteria for reimman integration states the riemman integral for $P_1:A_1\cup C \to \mathbb{R}$ can exist. Hence we apply the mean value theorem of integration on $P_1$.
If $A_1$ and $A_2$ is dense in $[a,b]$ the average is unclear. For one, we could set $\mathbf{I}_n$ to equal subsets of $A_1$, $A_2$ or $A_1\cup A_2$. In this case, $\mathbf{W}_1$ or $\mathbf{W}_2$ could equal anything
I will post my intuition for this example. If you have a measure that matches these intuitions, post it below.