Stats on categorical variables For a little background, I have 2 groups in my analysis. I have coded some lab results as 1 = bacterial colonies are red 2 = bacterial colonies are dark and shiny and 3 = bacterial colonies are black and rough. I would like to do some sort of statistical analysis on these so that I can tell if there is a significant difference between the numbers I have recorded for one group compared to the other, but the columns are different lengths as I do not have an equal number of samples in each group. Is there any tests anyone could recommend (have been working on minitab but also happy to use other softwares like prism).


It seems you may not have enough data for a definitive
test. Ordinarily, I would make a $2 \times 3$ table of counts
with groups as rows and colony type as columns. Then do a
chi-squared test for homogeneity on the table:
so = c(5, 3, 1);  sp = c(2, 9, 4)
TBL = rbind(so, sp);  TBL
   [,1] [,2] [,3]
so    5    3    1
sp    2    9    4

chisq.test(TBL)

        Pearson's Chi-squared test

data:  TBL
X-squared = 4.8914, df = 2, p-value = 0.08666

Warning message:
In chisq.test(TBL) : 
  Chi-squared approximation may be incorrect

Data are too sparse to give large enough expected counts for
the the "chi-squared statistic" to have nearly a chi-squared
distribution. So the P-value may not be correct.
Here are the expected counts, computed from the row and column
totals of observed counts in TBL.
chisq.test(TBL)$exp
    [,1] [,2]  [,3]
so 2.625  4.5 1.875
sp 4.375  7.5 3.125
Warning message:
In chisq.test(TBL) : Chi-squared approximation may be incorrect

For an accurate P-value all expected counts should exceed $5$ (with
perhaps an exception or two as small as $3.$ But these counts are
clearly too small.
As implemented in R, chisq.test can simulate a useful P-value:
chisq.test(TBL, sim=T)

        Pearson's Chi-squared test 
        with simulated p-value
        (based on 2000 replicates)

data:  TBL
X-squared = 4.8914, df = NA, p-value = 0.1304

However, the P-value is not below 5%, so we cannot reject
the null hypothesis of homogeneity at the 5% level.
R also has a version of Fisher's exact test that will
accept tables larger than the traditional $2\times 2.$
But Fisher's test also fails to find a significant result.
fisher.test(TBL)

        Fisher's Exact Test for Count Data

data:  TBL
p-value = 0.1375
alternative hypothesis: two.sided

Note: If the proportions of counts were to persist for
an experiment with twice as many colonies, then you would
have enough data to detect a significant result. But the
only way to know that is to do a larger experiment.
fisher.test(2*TBL)

        Fisher's Exact Test for Count Data

data:  2 * TBL
p-value = 0.01114
alternative hypothesis: two.sided

