I'm using rows of the table for observers, because we are looking
for homogeneity among them. (Ad hoc comparisons may be easier using
observes as rows.) Computations in R.
x1 = c(50,35,0,23)
x2 = c(0,0,1,2)
x3 = c(12,23,13,24)
x4 = c(23,45,2,31)
TAB = rbind(x1,x2,x3,x4)
chsq.out=chisq.test(TAB)
Warning message: # Look at expected counts below
In chisq.test(TAB) :
Chi-squared approximation may be incorrect
chsq.out
Pearson's Chi-squared test
data: TAB
X-squared = 56.922, df = 9, p-value = 5.231e-09
The P-value near 0 indicates a highly significant result, leading to
rejection of the null hypothesis $H_0.$ The number of degrees of freedom
is $\nu = (r-1)(c-1) = 3(3) = 9,$ for your $4 \times 4$ table.
The P-value is the probability, under $H_0,$ of a value greater than 56.922 for
a chi-squared random variable with $\nu = 9:$
1 - pchisq(56.922, 9)
[1] 5.230288e-09
chsq.out$obs # echo of TAB
[,1] [,2] [,3] [,4]
x1 50 35 0 23
x2 0 0 1 2
x3 12 23 13 24
x4 23 45 2 31
chsq.out$exp # note cells with <4 exp'd count
[,1] [,2] [,3] [,4]
x1 32.3239437 39.169014 6.0845070 30.4225352
x2 0.8978873 1.088028 0.1690141 0.8450704
x3 21.5492958 26.112676 4.0563380 20.2816901
x4 30.2288732 36.630282 5.6901408 28.4507042
chsq.out$res
[,1] [,2] [,3] [,4]
x1 3.1090178 -0.6661347 -2.466679 -1.3457196
x2 -0.9475692 -1.0430859 2.021307 1.2563454
x3 -2.0570972 -0.6091275 4.440668 0.8256453
x4 -1.3147998 1.3828998 -1.546968 0.4779404
There are 16 cells in the contingency table, thus 16 'contributions'
$\frac{(X_{ij} - E_{ij})^2}{E_{ij}},$ for $i,j, = 1,2,3,4.$
Here $X_{ij}$ are observer counts (integers), $E_{ij}$ are expected counts
as determined from row and column totals using the null hypothesis
of homogeneity (do not round severely). The sum of these 16 'contributions' is the chi-squared statistic.
'Signed square roots' of the contributions are called Pearson Residuals. The sum of squares of the residuals is the chi-squared statistic $56.922.$
sum(chsq.out$res^2)
[1] 56.92175
Thus, the residuals with the larger expected values (especially those above 2) may point to differences
between observed and expected counts leading to a significant result
and rejection of the null hypothesis. Here 'Obsever 2' seems to have
given different results than the other observers.
Ad hoc comparisons may help to understand the significant result.
For example, we can compare Observers 1 and 2, with an ad hoc
chi-squared test:
chisq.test(cbind(x1,x2))$p.val
[1] 6.447593e-09
Warning message:
In chisq.test(cbind(x1, x2)) :
Chi-squared approximation may be incorrect
You should use some method of avoiding 'false discovery' such as the
Bonferroni method if you do several ad hoc tests. The idea is to
reject only at levels smaller than 5%. (This is not an issue with our
very small P-value for the overall chi-squared test.) Also, I don't
expect your larger table will lead to expected counts small enough
to trigger error messages.
Addendum per Comments: In the following (fake) example, Observer 4 does
not see as many animals of any species as do the other three observers, but his/her counts are proportionately lower across
all species. (The proportionality is actually 'too good to be true', as
suggested by the extremely high P-value. It's almost as if Observer 4 just looked at notes of Observer 1, and reported about 80% as many sightings across all species. "When the P-value is tiny, doubt the null hypothesis; when the P-value is almost 1, give a second look at the model and the data.")
y1 = c(50,25,10,50)
y2 = c(47,28,12,52)
y3 = c(55,27,13,55)
y4 = c(41,20, 8,38)
TBL = cbind(y1,y2,y3,y4)
chisq.test(TBL)
Pearson's Chi-squared test
data: TBL
X-squared = 0.87592, df = 9, p-value = 0.9997
chisq.test(TBL)
where TBL is your table of counts would be the procedure in R. I got P-val almost 0, overwhelmingly rejecting $H_9$ that counts for species are homogeneous across Observers. $\endgroup$