Suppose we are sampling N = 7 queries out of all queries issued to a search engine A. Since some queries are more popular than others, we end up with U = 3 unique queries in our sample. Assume the search engine A always returns the same documents. Hence, all instances of the same unique query gets the same relevance score.
query sample_weight score_a score_b
============== ============= ======= =======
nba 4 0.7 0.8
stimulus check 2 0.6 0.6
hamster 1 0.9 0.1
We want to compare the effectiveness of our control search engine with a new search engine B on this same set of queries. The difference in the means on this sample can be compared in either of the following equivalent manners:
- [4 * (0.8 - 0.7) + 2 * (0.6 - 0.6) + 1 * (0.1 - 0.9)] / 7
- [(0.8 - 0.7) + (0.8 - 0.7) + (0.8 - 0.7) + (0.8 - 0.7) + (0.6 - 0.6) + (0.6 - 0.6) + (0.1 - 0.9)] / 7
Now, what gets me confused is how to do a paired t-test. Should I do it based on the unique queries (i.e., with two vectors of size 3), or on all occurrences (i.e., with two vectors of size 7). In other words, which of the following is correct?
- paired_t_test([0.7, 0.6, 0.9], [0.8, 0.6, 0.1])
- paired_t_test([0.7, 0.7, 0.7, 0.7, 0.6, 0.6, 0.9], [0.8, 0.8, 0.8, 0.8, 0.6, 0.6, 0.1])
- Some thing else