P = c( 52, 108, 84, 76, 23, 96, 78)
Q = c(108, 74, 32, 48, 59, 43, 76, 102, 35)
Boxplots and stripcharts (
P on bottom) both show
very similar samples. It seems unlikely that any
test will find
Q to differ significantly.
boxplot(P,Q, horizontal=T, col="skyblue2")
stripchart(list(P,Q), ylim = c(.5,2.5), pch=19)
The Wilcoxon rank sum test cannot give an exact P-value
because the two samples share a value (max =108) in common,
but the approximate P-value given does not seem promising.
Wilcoxon rank sum test
with continuity correction
data: P and Q
W = 40, p-value = 0.3964
true location shift is not equal to 0
In wilcox.test.default(P, Q) :
cannot compute exact p-value with ties
From the plots, either sample seems far from normal. Sample sizes are too small for a Shapiro-Wilk test to have reasonable
power, but neither sample is rejected as non-normal.
It seems worthwhile to look at a Welch two-sample t test,
which also fails to find a significant difference.
Welch Two Sample t-test
data: P and Q
t = 0.68638, df = 12.913, p-value = 0.5046
true difference in means is not equal to 0
95 percent confidence interval:
mean of x mean of y
The difference between the means is about $10,$
both standard deviations are about $28,$ and sample sizes are small.
One might finish with a permutation test, but 'the handwriting
is on the wall' that the data show no significant difference between hospitals. So, I won't show a permutation test.