# $X=\sum_{i=1}^{N}X_i$,estimator for $N$

Let $X_i$, $i\geq 1$, be independent and identically distributed random variables having the uniform distribution over $(0,1)$. Let $X$ be defined as $X=\sum_{i=1}^{N}X_i$, where $N$ is an unknown integer.

(a) Find an unbiased estimator $T(X)$ of $N$.

(b) Decide with adequate reasons, if $\dfrac{T(X)}{N}$ converges to $1$ almost surely, as $N$ goes to infinity.

At first I thought that since $E(X)=N\cdot \dfrac{1}{2}$, then the unbiased estimator, $T(X)=2X$. But one of my friend said that since $X$ contains $N$, $2X$ can not be an estimator here which is true.

So, I am stuck. Any help appreciated. Thanks.

Since $\mathbb{E}(X_i) = \tfrac{1}{2}$ for all $i \in \mathbb{N}$ we have $\mathbb{E}(X) = \tfrac{1}{2} N$, which means that $N = 2 \cdot \mathbb{E}(X)$. Hence, if we don't mind estimating an integer by a real number, a natural estimator for $N$ is the one you hypothesised ---i.e., $\hat{N} = T(X) = 2X$. Your friend is wrong to tell you that this statistic cannot be used as an estimator; the mere fact that the random variable $X$ depends on $N$ does not invalidate your use of any function of $X$ as a proposed estimator (remember that even though you don't know $N$, you still get to observe $X$).

This estimator is unbiased, since $\mathbb{E}(\hat{N}) = 2 \cdot \mathbb{E}(X) = N$, and it also converges almost surely to $N$ (via the strong-law-of-large-numbers). The drawback of this estimator is that (with probability one) it gives an estimate that is not an integer, but so long as you are okay with this, this estimator meets the required properties you want.

• Thanks, I actually did the same thing. But since $N$ is an integer, the answer should be $[2X]$ or $[2X]+1$ or something like that. but that can not be unbiased estimator. So, what should I do then? May 16, 2018 at 16:50
• Yes, that's where it gets more complicated. If you round to an integer in some way you are going to need to re-compute the bias. If you can compute the bias, and get it so it does not depend on $N$, you should be able to add a multiplicative term to correct for bias. Not easy though - perhaps make this a new follow-up question?
– Ben
May 16, 2018 at 22:52
• yes, I posted another prolem here: math.stackexchange.com/questions/2830407/… Jun 24, 2018 at 15:01