I'm quite new to mathematical notations, so please forgive me for my lack of skills in creating technically correct formulas.
I came across a problem, when I have a variable set of numbers. Let the set $S$ be $\{53, 12, 4, 56.3, 30\}$. I need a notation for calculating an average for a subset of this variable set, where $S\in\Bbb Z$. I'm quite sure the following notation is flawed, but it is easy to understand: $${\sum_{i=1}^{n}a_i\over n }\;where\;a_i\in\Bbb Z$$
I have come across a post in this forum, where correct set notations in summations are declared, however those notations are not satisfactory for my needs. I have reformed those formulas, however I'm not sure if it's correct. $$\sum_{\{a\in\Bbb Z\,|\,a\in S\}}a.\over |S|$$
I wonder if the set criteria in the summation narrows down the number of elements ($|S|$) in the set $S$. Is this question makes any sense? If it is, is one of the notations good enough to use in a scientific presentation (not for mathematicians)? If they're absolutely horrible, can you help me form a better notation?
If you are taking the average value of those elements in $S$ that are integers you should have $$\frac{\sum_{\{a \in \mathbb Z : a \in S\}} a}{| \{a \in \mathbb Z : a \in S\} |}$$ provided that the sum is finite. Computing the "average" value of an infinite collection of integers is a much different problem.