(Questions are at the bottom of the post. I’ve added two more doubts since the recent answer.)
Introduction
Consider $f:A\to\mathbb{R}$ where $A\subseteq[a,b]$, $a,b \in \mathbb{R}$ and $S$ is a fixed subset of $A$.
Before mentioning my set function, it is important to know I need it to compute my average. The average should satisfy the following
Positivity: If $f>0$, $\operatorname{average}(A,f)>0$.
Linearity: $\operatorname{average}(A,f+g)=\operatorname{average}(A,f)+\operatorname{average}(A,g)$, and $\operatorname{average}(A,cf(x))$ is $c \times\text{average}(A,f(x))$.
As $f\to\text{constant function}$, $\operatorname{average}(A,f)\to\text{constant}$
The $\operatorname{average}{(A,f)}$ should give a defined, unique value when $f$ is defined on a measurable set. Take for example functions defined on Lebesgue measurable sets.
The average of $f$ should satisfy $\inf f \le \operatorname{average} (A,f) \le \sup f$ when $f$ is defined on measurable sets.
The Average defined by the Lebesgue Measure and Integral does not fit all the requirements. If $\lambda(A)$ is the Lebesgue Measure of $A$ and $\lambda(A)=0$, then the average of $f$ is undefined breaking rules 4 and 5. I wish to define an average that matches all the rules and gives the following.
When $\lambda(A)>0$, the average should be the Lebesgue Average.
When $A$ is finite the average of $f$ should be
$$\frac{1}{|A|}\sum_{x\in A}f(x)$$
When $A$ is infinite and $\lambda(A)=0$, divide $[a,b]$ into $r$ equal sub-intervals. Take the average of $f$ over the infimum of all sub-intervals that meet $A$. Call this the lower average. Take the average of $f$ over the supremum of all sub-intervals that meet $A$. Call this the upper average. As $r\to\infty$, if the lower and upper average meet at the same value, call this the total average. When the total average is defined it should equal the average I want to define.
There are cases of $f$ where neither of these averages can give a defined value. Rather we generalize these definitions into my average and see that supports rules 4. and 5.
The problem may not be well-defined since an average may be unable to exist on all zero Lebesgue Measure sets.
However, before working on my average, I would like to work on my set function which I shall use to compute my average.
Note the set function I am defining may not be a measure. It could be finitely additive but give positive values for sets with zero Lebesgue measure.
Definition of Outer Set Function $\mu^{*}(c,S)$
If we define the following:
$I=[a,b]$
$a,b\in\mathbb{R}$
$\left(I_k\right)_{k=1}^{m}$ are $m$ open sub-intervals of $I$
$\ell(I)=b-a$ is the length of $I$
$\ell(I_k)=c\in\mathbb{R}^{+}$ is the length of $I_k$ for $k=1,...,m$
$$\Omega(S\cap I_k)=\begin{cases} 0 & S\cap I_k \ \text{is countable}\\ 1 & S\cap I_k \ \text{is uncountable} \\ \end{cases}$$
then $\mu^{*}(c,S)$ is the outer piece-wise set function defined as
\begin{align*} & \mu^{*}(c,S)= \begin{cases}\inf\limits_{m\in\mathbb{N}}\left\{ \sum\limits_{k=1}^{m}c\ \Omega\left(S\cap I_{k}\right): S\subseteq\bigcup\limits_{k=1}^{m}I_{k}\right\} & A \ \text{is uncountable}\\ \inf\limits_{m\in\mathbb{N}}\left\{\sum\limits_{k=1}^{m}c : S\subseteq\bigcup\limits_{k=1}^{m}I_{k} \right\} & A \ \text{is countable}\\ \end{cases} \end{align*}
Explanation of $\mu^{*}(c,S)$
(Skip if you understand my definition)
The parameter $c$ must remain a variable throughout the computation of $\mu^{*}(c,S)$. When $A$ is uncountable, $\mu^{*}(c,S)$ should equal $cm^{\prime}_{\text{min}}$, where $m^{\prime}_{\text{min}}$ is the minimum number of $I_k$ that cover $S$ for $k$ where $S\cap I_k$ is uncountable. The reason we set some $I_k$ to lengths zero is that countable subsets of $A$, such as countable $S\cap I_k$, are regarded to be as small as the null set compared to the uncountable set. Hence we "prevent" corresponding $I_k$ from covering this part of $S$ by setting their "lengths" to zero instead of $c$.
When $A$ is countable $\mu^{*}(c,S)$ should equal $cm_{\text{min}}$ where $m_{\text{min}}$ is the minimum number of $I_k$ that can cover $S$. Here $S\cap I_k$ can be countable (instead of uncountable). When $A$ is countable, we do not set the length of any $I_k$ to be zero, since countable subsets of countable $A$, should be covered by $I_k$ such that the total length of $I_k$ should have a positive proportional value to $\mu^{*}(c,A)$.
Inner Set Function $\mu_{*}(c,S)$ and Total Set Function $\mu(c,S)$ where $\mu(c,S)=\mu^{*}(c,S)=\mu_{*}(c,S)$
The inner set function should be
$$\mu_{*}(c,S)=\mu^{*}(c,A)-\mu^{*}(c,A\setminus S)$$
Making the total set function $\mu(c,S)$ defined for values of $c$ where,
$$\mu(c,S)=\mu^{*}(c,S)=\mu_{*}(c,S)$$
I added this so the total set function would be as rigorous as the Lebesgue Measure. I'm not sure whether this is necessary.
The problem is for most values of $c$, $\mu^{*}(c,S)\neq \mu_{*}(c,S)$, so to fix this I set the limit as $c\to 0$.
$$\lim_{c\to 0}\mu(c,S)=\lim_{c\to 0}\mu^{*}(c,S)=\lim_{c\to 0}\mu_{*}(c,S)$$
Questions
What is $\lim\limits_{c\to 0}\mu(c,\mathbb{Q})$, $\lim\limits_{c\to 0}\mu(c,\ln(\mathbb{Q}_{>0}))$, and $\lim\limits_{c\to 0}\mu(c,\mathbb{Q}\cup\ln(\mathbb{Q}_{>0}))$, where $A=\mathbb{Q}\cup\ln(\mathbb{Q}_{>0})$? My guess is all the answers would be $\lim\limits_{c\to 0}c\left\lceil\frac{b-a}{c}\right\rceil$ since they are countable and dense in $[a,b]$. If I am correct, here is the problem...
If my set function is finitely additive:
$$\lim_{c\to 0}\mu(c,\mathbb{Q}\cup\ln(\mathbb{Q}_{>0}))=\lim_{c\to 0}\left(\mu(c,\mathbb{Q})+\mu(c,\ln(\mathbb{Q}_{>0}))\right)=2(b-a)$$
However, $\lim\limits_{c\to 0}\mu(c,\mathbb{Q}\cup\ln(\mathbb{Q}_{>0}))=\lim\limits_{c\to 0}c\left\lceil\frac{b-a}{c}\right\rceil=b-a$
The finite additivity on my set function doesn't give this, hence either my calculations are wrong or my set function is not finitely additive. Which is true? What should be $\mu^{*}(c,\mathbb{Q})$ and $\mu^{*}(c,\ln(\mathbb{Q}_{>0}))$ instead?
Edit: According to a recent answer, the set function is not well-defined for this specific case. Here are a few more things I need resolved.
When $A=[a,b]$, does my set function of $S$ equal the Lebesgue measure of $S$.
If $A=\mathbb{Q}$ could we solve $\lim_{c\to 0} \mu(c,S)$ by doing the following: Take elements of $S$ that have $n$ decimal places. Take $\lim\limits_{c\to 0}\mu$ of these elements as $n\to\infty$. If we cannot do this, how can we change my definition of $\lim\limits_{c\to 0}\mu(c,S)$ so this is possible.
\text{average}instead of\operatorname{average}then you don't get proper spacing in things like $5\operatorname{average} (f).$ Instead you see $5\text{average}(f).$ That does not just mean some space is added: rather, the amount of space to the left and right depends on the context. In an actual LaTeX document, you can put\newcommand{\a}{\operatorname{aveerage}}before the\begin{document}and then in the body of the thing just write\aevery time. $\qquad$ – Michael Hardy Aug 13 '20 at 20:11