# Estimating the sample mean from countably infinite samples

Given a sample of $k$ numbers $x_1,...,x_k \in \mathbb{R}$, the sample mean is given by $$\frac{1}{k}\sum_{i=1}^k x_i.$$

How do we compute the sample mean if we observe a sample of

$P1.$ $n$ intervals $[a_1,b_1],...,[a_n,b_n]$ where $a_i < b_i$ and $a_i,b_i \in \mathbb{R}$?

$P2.$ $n$ intervals (defined above) and a set of $k$ numbers?

If $n=1$, then intuition implies that the sample mean is $\frac{1}{2}\left (a_1+b_1 \right )$.

But how does one deal with the multiple intervals of different sizes and a mixture of points and intervals?

For $P1$, could the sample mean be

$$\frac{\sum_{i=1}^n \int_{a_i}^{b_i} x\,\mathrm{d}x}{\sum_{i=1}^n \int_{a_i}^{b_i}\mathrm{d}x}?$$

If that is correct, how would one deal with $P2$?

• (1) Please explain how one "samples ... intervals." What do those intervals mean and what model are you implicitly assuming about how "sampling" takes place? (2) What does this question have with "countably infinite samples"? All your examples have only a single sample and either $n$ or $n+k \lt \infty$ observations. – whuber Dec 14 '16 at 22:31
• In the discrete case, one observes $k$ points. In the interval case, all the numbers between $a_i$ and $b_i$ are observed. – Kit Dec 14 '16 at 22:33
• Please explain what it means to "observe" an interval. There is more than one interpretation! – whuber Dec 14 '16 at 22:34
• Perhaps, I have phrased it incorrectly. Each point in the interval is an observation, just like we had $k$ points in the discrete set. So, when there are $k$ points and one interval, the total number of observations is $k + S$ where $S$ is the the number of points in the interval $[a,b]$. – Kit Dec 14 '16 at 22:40
• @GeoMatt There are plenty of examples of the Hough transform right here on CV. – whuber Dec 15 '16 at 0:14