# Independence of a statistic from size of sample

If you have some (non-constant) statistic $$T(X_1, X_2,...,X_n) = f(X_1,X_2,...,X_n)$$, is it independent of the number of elements in the sample $$(X_1, X_2, ..., X_n)$$? That is, is it independent of $$n$$? When is it independent, and when is it not independent?

Here's how I've thought about it so far:

In the most basic case of the sample mean of $$n$$ random variables $$(X_1,X_2,...,X_n)$$, we know the mean is $$T(X_1,X_2,...,X_n) = \frac{1}{n} \sum_{i=1}^n X_i$$, so I figured that in this case, $$n$$ is not independent of $$T(X)$$, since it appears in $$T(X)$$. My reasoning is that even though $$T(X)$$ does not explicitly take $$n$$ as a parameter, it is a member of the class of functions $$\{f: \mathbb{R}^n \to \mathbb{R} \}$$, and we only define it as such because we know the sample has $$n$$ elements. But this is a very informal argument, and I don't even know if it's correct. How do we know, formally, whether $$n$$ and $$T(X)$$ are dependent (or independent, if that's the case)? Does the answer depend on what $$T(X)$$ is, or can we say it's always dependent on $$n$$, as $$n$$ is the sample size, and $$T(X)$$ is a function from $$\mathcal{X}^n$$ to some other space? By formal, I don't necessarily mean measure theoretic, though that might be the only way to resolve this question.

• I think the statistic as a function can of course be independent of $n$ but not necessarily its sampling distribution. For example, $T(X_1, ..., X_n)= \max \{X_1, ..., X_n\}$ Oct 30 '20 at 5:39
• I think this is a good way to look at it: any reasonable (non-constant) statistic is not independent of the sample, as it's a function of the sample. Therefore it has some connection to the sampling distribution. But is the sampling distribution not a function of the size of the sample? E.g. we have the sampling distribution of 10 $U[0,1]$ random variables, the sampling distribution of 11 $U[0,1]$ random variables, etc. I think I can claim that these are different objects (but if not, let me know why). Oct 30 '20 at 6:11
• I think the sampling distribution of $X_{(n)}$ depends on $n$, so I think there is still a dependence on $n$. For example, $X_{(n)}$ for a single draw from $U[0,1]$ has expected value of 0.5, but for a sample of $n$ draws, $X_{(n)}$ has a larger expected value (probably like $\frac{n-1}{n}$ I would guess). So if you know $n$, you have information about $T(X)$. Also, the function $T(X) = X_{(n)}$ has domain $\mathbb{R}^n$, so I think it still has $n$ in it. I'm basically looking for a way to formalize this though, and I think you've really helped by mentioning the sampling distribution. Thanks! Oct 30 '20 at 6:19
• Perhaps I wasn't clear in my comment. I meant that looking at statistic as a function you can say it might be independent of $n$. But this will not be true for sampling distribution as it will always depend on $n$ (at least I cannot think of an example where it won't). Oct 30 '20 at 7:29

The question has nothing to do with measure theory, this is standard basic calculus: If one writes$$T(X_1, X_2,...,X_n) \stackrel{\text{def}}{=} f(X_1,X_2,...,X_n)$$the function $$f\,:\,\mathcal X^n\longmapsto\mathbb R^k$$is mapping $$\mathcal X^n$$ into a $$k$$-dimensional space. This means that $$f$$ and hence $$T$$ change for each value of $$n$$, that they are different functions for different values of $$n$$, and that, rigorously, they should be indexed by $$n$$: $$T_n(X_1, X_2,...,X_n) \stackrel{\text{def}}{=} f_n(X_1,X_2,...,X_n)$$ In other words, $$T_n$$ can only be applied on a sample of size $$n$$ and cannot be computed for a sample of size $$n-2$$ or $$n+3$$...

• Thanks for your answer! If they are indexed by $n$, what does that imply about the independence of $T_n(X_1, X_2,..., X_n)$ and $n$? This does clarify things: it seems that such a statistic, if non-constant, is never independent of $n$, as it's a function indexed by $n$. Still, I'm not sure if this is a valid, rigorous, or precise argument though (apologies if it clearly is, and I'm being dense-headed). Oct 30 '20 at 21:15
• I do not know how to spell it more clearly than the above: if $n$ changes, $T(\cdot)$ is a different function. It thus depends on $n$ in the sense that it cannot be constructed without knowing $n$. The term "independence" is ambiguous in this probabilistic context and should be avoided since $n$ is not a random variable. Oct 31 '20 at 8:29
• Thanks, the second sentence you wrote above resolves this, I think. Oct 31 '20 at 9:08
• If you could add that second sentence from your comment above to your answer, I think it could be helpful to others. I think that was the crux of my misunderstanding, at least. Oct 31 '20 at 9:26