We manufacture foobars. In July, 91% of foobars were defect-free, but in August that figure was 89%.
Would chi-squared be the right method to determine if the difference of 2% between July and August is significant? I read somewhere that chi-squared should not be used to compare same variable from different time periods, as it would not qualify as independent variable in this case.
On prompt from @Glen_b, I dug out the passage where I got this idea from: "What is a p-value anyway?" by Andrew Vickers, page 196.
In answer to a review question, the book says: "All of the common statistical tests assume that the data are independent. Applying these tests to non-independent data is a very common error. An obvious example is repeat observations." The example data follows, in which sales over a week in two different stores are split into daily sales, so that instead of comparing two data points (weekly sales in each store) we can compare 14 data points (daily sales in each store). The erroneous assumption here is that we have 14 independent data points, while in fact we have two sets of non-independent data points, thus t-test or chi-squared cannot be applied.
The author defines independence as: "...two variables are independent if information about one gives you no information about the other." He then says this about the given example: "...if I tell you Monday's sales figures, you can take a reasonable guess at Tuesday's". Therefore, Tuesday sales are not independent from Monday sales.
Similarly, in my example August measurements are not independent of July measurements.