# One Sample Test of Hypothesis

A one sample test of hypothesis generally looks at a sample group and tries to make a determination about the overall population as a result. For example say Google makes a change to its algorithm, like it just did a few weeks ago. You could do a sample of your website traffic and see if it looks different from its historical levels - i.e. did the change affect your website and, if so, how. You could be worried about radiation levels in Japan so you take a sample and compare it with known historical levels, to see if there is a change. You are looking at the sample's values and comparing it against the population. You could also be making estimates about the population. You could take a sample of voters coming out of polls after an election and try to make an estimate of how the overall voting is going. The relationship is between your sample and the population.

In comparison, in general a two sample test of hypothesis is about comparing the two samples with each other. In my ethics class we're currently talking about older worker discrimination vs younger worker discrimination. So you could look at layoffs in a company and see how a sample of older workers were affected vs how younger workers were affected. You're drawing samples from specific sub-groups in the population. Or you could look at all applicants applying for jobs for any company in Massachusetts. You could look at elderly workers applying for jobs, and younger workers applying for jobs, and see if their acceptance rates are different. You are comparing the two groups against each other.

Another example could be in website traffic. You could look at website visitors who come from the US vs website visitors who come from India, and see if their traffic patterns are different. You are taking two specific sub-groups of your population and comparing them against each other. You could also see how both groups compare with the overall population values.

That is, let's say you're curious about how many website visitors are coming to your 'wine and food' area. It might be that you discover that people from the US are more likely to visit this area than people from India are. but you could also find that both groups are coming to the area far lower than the overall general population of visitors do.

With the one sample test of hypothesis, the null and alternative hypothesis related between that sample's values and the overall population's values. So for example you checked whether the weights of the parakeets in your sample group were within the range of the weight of parakeets in your overall population. The alternative hypothesis would be that they were not within that range.

With a two sample test of hypothesis, your null and alternative hypothesis involve how the two samples relate to each other. So if I had a group of parakeets who were fed a seed-only diet, and compared them with a group of parakeets who were fed a nutritionally balanced diet, I would compare the weights of those two groups against each other to see how they differed. The null hypothesis might be that it made no difference what they were fed, that they would weigh the same. The alternative hypothesis might be that there was going to be a weight difference that was statistically important.

Statistics Basics