# Statistical Hypothesis Testing

Does stress have an influence on the time people need to finish a task? To answer this question 2 groups of test people are compared. One of the groups ($n_1=10)$ does a task under the influence of stress, and the other group $(n_2=12)$ does the same task without stress. The average times (in seconds): $\bar{x}_1 =433$ and $\bar{x}_2 = 367$. The sample standard deviations are: $s_1 = 65$ and $s_2 = 84$.

I need to test this hypothesis. I'm however having trouble with this because I never really learned how to test hypotheses using statistics, and I don't know any 'plan of attack' as to how to tackle hypothesis testing. This is what I have up until now:

$X$ = time in secs

Group 1 (with stress):

$n_1 = 10$

$\mu_{\bar{x}_1} = 433$

$\sigma_{\bar{x}_1} = 65$

Group 2 (without stress):

$n_2 = 12$

$\mu_{\bar{x}_2} = 367$

$\sigma_{\bar{x}_2} = 84$

But that's about it. The null hypothesis is that stress doesn't have an effect, but I don't know how to describe that mathematically. So I'm stuck. Is there a general way to do hypothesis testing? What is my missing link in this specific case?

-
@Inquest I have no idea what z-test, t-tests, etc.-test mean. Also, one-sampled, two-sampled, paired, etc... no idea at all –  ZafarS Jan 17 '13 at 19:09

There is a "general way" to do hypothesis testing (more than one, in fact), but that's a topic for a whole Mathematical Statistics course rather than a Math.SE question. Most people who do statistical hypothesis tests never learn about it; it's sort of behind the scenes.

In this setting, where you want to test the equality of two group means for populations which are something like normally distributed, what they want you to do is a t-test. Since we have two separate samples (Group 1 and Group 2), this is a two-sample t-test. Since the people in the groups are different (person 1 in group 1 doesn't correspond in any meaningful way to person 1 in group 2) it's a non-paired two-sample t-test. (Paired two-sample t-tests include settings such as twin studies where one twin is in each group and before-after measurements).

Since the standard deviations of the two groups are not hugely different, it's probably safe to use the pooled t-test. (If you want to be a bit more conservative you can do the Welch-Satterthwaite t-test). The pooled standard deviation is calculated as $$s_{p} = \sqrt{\frac{(n_1-1)s_{1}^2+(n_2-1)s_{2}^2}{n_1+n_2-2}}.$$ The test statistic is given by $$t = \frac{\bar {x}_1 - \bar{x}_2}{s_{p} \cdot \sqrt{\frac{1}{n_1}+\frac{1}{n_2}}}.$$ The test statistic is compared to a $t$ distribution with $n_1 + n_2 − 2$ degrees of freedom to find the $p$-value. You reject the null hypothesis if the $p$-value is smaller than some cut-off $\alpha$ (often .05).

-
In my class we've only studied the normal and binomial distributions. Does this mean I only have to use t-tests (I still don't know exactly what a t-test is).? –  ZafarS Jan 17 '13 at 19:40
The t is a distribution similar to normal but with fatter tails (meaning that finding an outlier is higher than Normal). Just like you look up a normal table, you must look up a t table. –  Inquest Jan 17 '13 at 22:02
@Inquest Would you mind taking a look at my recent question 'Did my teacher make a mistake with this statistics question?' ? It's also about this same hypothesis, I believe my teacher made a mistake and I also show of my method. –  ZafarS Jan 19 '13 at 14:30
Then you compute the SEMean (the standard error for the sample means) by $$\operatorname{semean}_1= {\operatorname{stddev}_1 \over \sqrt{N_1} }$$ and for the second group $$\operatorname{semean}_2={ \operatorname{stddev}_2 \over \sqrt{N_2} }$$. Then the confidence interval, such that with 95% likelihood the true population mean is inside the interval around the empirical mean for the subgroup in your sample, is determined by $$\operatorname{lowerbound}_{1,95 \% } = \operatorname{mean}_1 - 2 \operatorname{semean}_1 \\ \operatorname{upperbound}_{1,95 \% } = \operatorname{mean}_1 + 2 \operatorname{semean}_1$$ You do the same for the mean and the confidence interval of the second subgroup.