# Significance of two-sample problem/test

#### jonascj

##### New Member
I am self-studying an applied statistics course (reading the curriculum, doing the recommended exercises, doing old projects etc.) and I am now trying to deal with this problem:

How significant is a drop from 4039 to 3611 traffic related injuries per year?

The process (of being injured due to traffic) is a Poisson process with a given rate.

With $$\lambda > 3000$$ the normal distribution with $$\mu=\lambda$$ and $$\sigma^2 = \lambda$$ is a good approximation.

To test if this is significant I do a "two sample test". My text book have a test called / described as: "two Gaussian samples with known variance: are the means the same?".

This means the null hypothesis is that the means are the same. This can be rejected (or accepted, of course) and hence the alternative (that they are not the same) made seem more probable.

Define a new random variable which is the difference in the two means and test how compatible this is with zero:

$$Y_\mathrm{inj} = X_{\mathrm{inj, 2012}} - X_{\mathrm{inj, 2011}}$$

The standard deviation of the new random variable:

$$\sigma_{Y_{inj}} = \sqrt{\sigma_{inj,2012}^2 + \sigma_{inj,2011}^2} = \sqrt{4039+3611} = 87.46$$

The the actual difference in terms of $$\sigma$$

$$\frac{Y_{inj}}{\sigma_{Y_{inj}}} = \frac{4039-3611}{87.46} = 4.89$$

So now I know that the actual differens (which according to the null-hypothesis should be 0) is $$4.89\sigma$$ different from 0.

How do I turn this in to a statement like "This drop is significant at level $$\alpha$$". ?

I know, or think I know, that it has to do with this probability:

$$Pr(\mu - 4.89\sigma \leq x \leq \mu+4.89\sigma) = 0.9999989916$$

The amount of events lying within $$4.89\sigma$$ from the mean (in both directions) on a Gaussian. But I don't know how to make the last final statement of the significance.

Any help would be appreciated.

Best regards
Jonas

#### jonascj

##### New Member
A friendly bumb.

Does the question not make sense, have I left out some important information, or similar? I'll be happy to clarify or elaborate on what I've done so far...

#### GretaGarbo

##### Human
The observed value of 4.89 is larger than the critical value of 1.96 in the standard normal, so it is significant.

But you could also have done a likelihood ratio test or a test in a glm model:

y <- c(4039, 3611)
group <- c(1, 2)
summary(glm(y ~ factor(group), family=poisson))

Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) 8.30375 0.01573 527.729 <2e-16 ***
factor(group)2 -0.11201 0.02290 -4.891 1e-06 ***
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

(Dispersion parameter for poisson family taken to be 1)

Null deviance: 2.3958e+01 on 1 degrees of freedom
Residual deviance: 4.2810e-13 on 0 degrees of freedom
AIC: 24.171

I don't manage to get the columns align correctly (why?) but the estimated z-value here is also 4.891.

A friendly bumb.

Does the question not make sense, have I left out some important information, or similar? I'll be happy to clarify or elaborate on what I've done so far...
Some questions are simply forgotten or not observed because of being busy.

#### jonascj

##### New Member
The observed value of 4.89 is larger than the critical value of 1.96 in the standard normal, so it is significant.
$$Pr(\mu - 1.96\sigma \leq x \leq \mu+1.96\sigma) = 0.9500$$ ...

But how significant is it?

My textbook says on the null hypothesis:

You test it, at some level of significance, and if this test fails you have supported your primary aim, as the alternative to the null hypothesis is that there is some effect there - at what level you are not required to say.
So I should be able to say at what level of significance I have tested my null hypothesis, or (since I obtained the result before setting my level) how significant is my result.

Is it significant at $$1-Pr(\mu - 4.89\sigma \leq x \leq \mu+4.89\sigma) = 1-0.9999989916 = 0.00000100839 = 0.0001\%$$ level?

#### GretaGarbo

##### Human
Yes, that is the p-value:

Code:
2*(1 - pnorm(4.89))
1.00836e-06

#Compare with:
2*(1 - pnorm(1.96))
0.04999579