information:filtering
Independent and identically distributed random variables with random sample size

There are cases when a sample is taken without knowing, in advance, how many observations will be acceptable according to some criterion. In such cases, the sample size N {\displaystyle N} is a random variable whose variation adds to the variation of X {\displaystyle X} such that,

which follows from the law of total variance.

If N {\displaystyle N} has a Poisson distribution, then E (N) = Var (N) {\displaystyle \operatorname {E} (N)=\operatorname {Var} (N)} with estimator n = N {\displaystyle n=N}. Hence the estimator of Var (T) {\displaystyle \operatorname {Var} (T)} becomes n S X 2 + n X ¯ 2 {\displaystyle nS_{X}^{2}+n{\bar {X}}^{2}}, leading the following formula for standard error:

(since the standard deviation is the square root of the variance).