# Statistical significance different observation windows

I'm sure that this is trivial and I just can't figure out the right keywords.

I have a dataset A containing values of how many cars were observed in an hour long window. I have a dataset B containing values of how many cars were observed in 30 minute long window somewhere else.

The two datasets are independent and there are enough measurements in both.

The task is to find if there is a significant difference in the mean number of cars in the two places.

My approach: If the same number of cars passes on average, then I would expect $$\mu_A/2 = \mu_B$$ to hold. Of course the means aren't exactly the same. How to test for statistical significance here?

• Welcome to CV. If this is an assignment or homework problem, please follow the guidelines for those. stats.stackexchange.com/tags/self-study/info Commented Feb 8 at 15:21
• It's not. I've simplified a research problem to the point where it's cars in time windows.
– uYb
Commented Feb 8 at 15:43

When comparing two means, the usual thing is an independent sample t-test. This makes certain assumptions which can be checked:

1. Data are continuous
2. Random sample from a population
3. At least approximately equal variances
4. At least approximate normality

3 and 4 can be checked. 2 is either there or not, if it isn't, you are going to have problems with almost any procedure. But 1. is not true, at least, not exactly However, if the numbers are pretty high, then it is going to be close enough to true that you can proceed. If the two streets were very isolate stretches of road, or even you were counting cars at 3 AM, then it might be an issue.

An alternative is a Wilcoxon test, but this is not, strictly, a test of means.

If you are worried about whether the data are continuous, you could do a count-model regression (such as Poisson or negative binomial) with the count as the dependent variable and "location" as the independent variable. These are explicitly designed for counts, but I suspect this may be overkill for the problem as stated. However, in your comment, you say this is a simplified version of a research problem. That worries me. Also, a regression would let you add covariates such as time of day and day of week, that might be very useful.

In any case, doubling the number in the sample from half-hour seems right.

• Thank you. I'm not sure why I was so bound on comparing adjusted means and not simply halving each measurement and then doing a regular t-test. The data are not continuous, but we are averaging 25 or so "cars" per "hour".
– uYb
Commented Feb 8 at 16:24