Calculate the p-value

statistics

I'm following a statistics course for the first time and I'm wondering how can I find the difference beteween two indepentent samples. I read the explanation but still couldn't understand how it works and I'm still stuck at finding the p-value. Here is the data:

$$\bar x_1=5.9$$
$$\bar x_2=4.1$$
$$\sigma_1=4.1$$
$$\sigma_2=3.7$$
$$n_1=42$$
$$n_2=47$$
And I want to test:
$$H_0:\mu_1-\mu_2>0$$
$$H_a:\mu_1-\mu_2<0$$

Lets say at a 0.05 level. So I find SE:
$$SE^2=\frac{\sigma_1^2}{n_1}+\frac{\sigma_2^2}{n_2}$$
This gives SE = 0.83
So I calculate my t stat:
$$t=\frac{\bar x_1-\bar x_2}{SE}=2.16458$$

How can I calculate the p-value and what would it mean?

Best Answer

The notation $\sigma_i$ rather than $s_i$ suggests you are treating the standard deviations as known rather than as being estimated based on the data. Furthermore, the way you find your standard error makes sense only if that is what you are doing. That is not realistic but is often done in early exercises. Therefore you should treat your test statistic $Z = (\overline x_1-\overline x_2)/\text{SE}$ as being normally distributed rather than as having a t-distribution.

Suppose your null hypothesis is that the means of the two populations are equal and the alternative hypothesis says only that they are not equal, without saying which direction the inequality goes. Then the p-value is the probability that $|Z|,$ the absolute value of $Z,$ exceeds the value actually observed, given that the null hypothesis is true. So, for example, suppose you have $|Z| = 2.3.$ then you need $\Pr(|Z|>2.3) = \Pr(Z>2.3) + \Pr(Z<-2.3) = 2\Pr(Z< -2.3).$ Normally you would find that probability by using either a table or a software package.

Related Question