What statistical analysis to run for count data? I have 10 storages, each has 10000 units. A technical problem has been found in 2 storages, that might leads to an increase in the number of defective units. Basically, I want to compare the number of defective units of these 2 storages with the number of defective units of the others 8 storages, in order to verify if there is a significant difference between 2 groups of storages. Which statistical test should I use for the comparison, when I have only 2 storages in the first group?
 A: I think you could fit a generalised linear model with Poisson family distribution. The response variable is the number of defects in each unit and the explanatory variable is the presence/absence of a fault in the unit.
This is an example in R:
# Some dummy data
defects <- c(10, 12, 13, 8, 10, 10, 12, 9, 23, 25)
fault <- c(rep(F, 8), rep(T, 2))
DF <- data.frame(defects, fault)
DF
   defects fault
1       10 FALSE
2       12 FALSE
3       13 FALSE
4        8 FALSE
5       10 FALSE
6       10 FALSE
7       12 FALSE
8        9 FALSE
9       23  TRUE
10      25  TRUE

Fit the model and check if there is any evidence for the fault variable to affect the number of defects:
fit <- glm(defects ~ fault, data= DF, family= 'poisson')
summary(fit)

Call:
glm(formula = defects ~ fault, family = "poisson", data = DF)

Deviance Residuals: 
    Min       1Q   Median       3Q      Max  
-0.8056  -0.1931  -0.1555   0.3901   0.7436  

Coefficients:
            Estimate Std. Error z value Pr(>|z|)    
(Intercept)   2.3514     0.1091  21.551  < 2e-16 ***
faultTRUE     0.8267     0.1809   4.569  4.9e-06 ***
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

(Dispersion parameter for poisson family taken to be 1)

    Null deviance: 20.9397  on 9  degrees of freedom
Residual deviance:  1.9927  on 8  degrees of freedom
AIC: 49.589

Number of Fisher Scoring iterations: 4

In this case, fault does seem to have an effect. Since the estimate of the fault state is 0.8267, it means that the group of faulty units has 2.29 times more defects than the non-faulty units (because $e^{0.8267} = 2.29$) with  p-value of 4.9e-06 against the null hypothesis of no difference between fault groups.
Note that with the Poisson family distribution you assume that there is no extra variation across units of the same fault group. This could make the analysis a bit anti-conservative in declaring significance. You could use familty quasipoisson or negative binomial to account for that.
