# Question on basic hypothesis test and data collection

I have 2 other questions on hypothesis testing.

If I have a hypothesis like this:

Spanish companies have more contract offers from Portuguese companies, than German companies have from Portuguese companies.

Now I have 2 questions:

1- To test this imagine, I choose 100 Spanish companies randomly and 100 German companies, and ask them for number of contract offers they received from Portuguese companies, but I don't want to limit them to just one year (for doing a more thorough test), so I ask them to give me the number of contract offers they received for a range of years (for example, instead of asking them for data of just year 2014, I ask them for data from 2000 to 2014). But some companies haven't been yet existed in 2000, so, they don't have data for those years. Can I collect data, and make an average per year and use that to do my test?

For example, company A has been started from year 2004 and till end of 2014 had an average of 10 contract offers per year, and company B has been started from 1910 and between 2000 and 2014 had an average of 12 contract offers per year. Can I treat both of these data equally or should I eliminate the companies that have been established after year 2000. Or is there any other way to solve this problem?

2- Another question is, can I choose 100 Spanish companies and 200 German companies, and compare the difference between the means? Or I should choose equal number of companies from both countries (for example 100 Spanish companies and 100 German companies)?

Above all both questions depends on your assumptions and all context. If you are interested in what happens when you sample, and how you may control your surveys/experiments to be a reflection of the true population I would recommend you to read up on stratified sampling which is a method of controlling this effect.

Q1

As economy suggested if you can assume that time component has no effect on the the numbers (there is no trend over time to suggest otherwise) then it is fine to treat all the numbers as equal. However if there is clearly a trend, then you should make adjustments to reflect that.

Q2

In general, it would be wise to match the number of samples together, however it might be worth while to have more samples from German companies if there is a greater variability in their responses, as a way to limiting sampling variance, if the sampling variance between the two groups differ by a large amount.

• Thank you for the time and the help, really appreciate it. Commented May 10, 2015 at 22:10

Regarding #1:

Company A and Company B are equal in your analysis as long as you assume that companies, on average, enter and leave the market equally often (a pretty good assumption, unless there's something strange about the market structure). You can ignore the age of the company if all you care about is the raw number of contracts. Treat the counts equally.

Regarding #2:

Sample equally from Spain and Germany. What you want to show is that, all else constant, contracts for Spain are greater than contracts for Germany, so you don't want to vary the ratio of samples between Spain and Germany, because you're assuming there are not effects present from there being a much higher number, say, of Spanish versus German contract-seeking firms.

It's also more difficult to interpret your results if you have twice as many German firms in your sample.

Edit: I'm assuming YOU are assuming "all else equal". If you have a suspicion that German firms fall out of the marketplace faster, and therefore are less representative, or you suspect that since Spain has 10x number of contract-seeking firms than Germany they must have an advantage, then you have to tailor the analysis to test those specific effects. Anyway, it's still a good starting point to test the all-equal hypothesis.

• Thank you for the time and the help, really appreciate it. Commented May 10, 2015 at 22:11