Quantcast
Channel: How do I figure out how many items I should expect to exceed my error threshold? - Cross Validated
Viewing all articles
Browse latest Browse all 3

Answer by knrumsey for How do I figure out how many items I should expect to exceed my error threshold?

$
0
0

Stating and Simplifying the Problem

To simplify things, let's assume that the total number of items, $n$, never changes. Let $X_{ij} = 1$ if item $i$ exceeds the threshold on day $j$. Let $Y_i = \max_{j=1,\ldots, 14}\{X_{ij}\}$ be an indicator for whether item $i$ exceeds the threshold at any point during the two week period. You are interested in the proportion$$p = E\left[\frac{1}{n}\sum_{i=1}^n Y_i\right] = \frac{1}{n}\sum_{i=1}^nE(Y_i),$$where the final equality holds regardless of dependence (by linearity of expectation). It is also reasonable to assume (in many cases, at least) that $E(Y_i)$ is the same for all $i=1,\ldots, n$, and so we have $p = E(Y_1)$.


Finding $E(Y_i)$

Since $Y_i$ is a binary random variable, we only need to find the probability that it equals $1$. That is...$$E(Y_i) = 1\times P(Y_1 = 1) + 0\times P(Y_i = 0) = P(Y_i=1).$$We can find this probability using a common theme in statistics; essentially that $Y_i=0$ if and only if $\{Y_{ij}=0\}$ for all $j$. If you think about this in terms of your problem this should be obvious!$^\ast$$$\begin{align*}p &= 1 - P(Y_i = 0) \\&= 1 - P\left((Y_{i1}=0) \cap (Y_{i2} = 0) \cap \ldots \cap (Y_{i,14}=0)\right).\end{align*}$$
In general, this probability can be difficult to find, as it depends on the autocorrelation of the random variables and the statistical model you rely on. If you are willing to assume independence across time (probably unrealistic), then we get$$p = 1 - P(Y_{i1} = 0)^{14} = 1 - 0.99^{14} = 0.1313$$which is very close to the approximation used by @Stephan Kolassa.


$^\ast$An item fails to exceed the threshold in a two week period if and only if it fails to exceed the threshold every day during the two week period. Duh.


Viewing all articles
Browse latest Browse all 3

Trending Articles