# Hypothesis Testing the difference in two means - Is N just the number in each group or should it also include each observation in each group?

I am working on a problem where I will be using a hypothesis test to find the difference in two means; a control group, and a test group. Each group consists of several stores where observations are taken every week. Imagine the dataset as so:

As you can see, I have 5 stores in my control group, and 3 stores in my test group. And my formula is as follows (hypothesis test for independent samples, population variance unknown):

My question is... for my N.. Should I use 5 and 3? Or should I account for the number of observations for each store as well? (I.e. N = 15 & 9). Does it matter?

Thanks!

You use the number of observations taken, since that is how you increase the confidence in your estimate. Go with $$15$$ and $$9$$.
However, an assumption of the t-test is that the observations are independent of one another, which you violate. The extent to which you believe this matters will affect how you proceed. There are more advanced modeling techniques that will account for this. If you are part of a business that is investigating this, that will require you to hire (or contract with) a statistician. In the more likely scenario that this is part of an assignment for freshman business analytics, then the right answer is $$15$$ and $$9$$.