Can you average categorical variables and then perform a two sample t-test? I have a situation where I have two sets of apples.  I want to show that one batch has more problems than the other.  How could I go about doing it?
The problems are things like:  "Mold", "Worms", "Rotten"
So far I looked at each apple and gave it a score where each instance of a problem counted as "1".  So if an apple had mold and worms it had a value of 2 (for two problems).
I then added the problems of the apples in each group and took an average, standard deviation, and performed a two sample student's t-test.  Would this be the accurate way of assessing whether one group of apples had more problems than another group or is there a more accurate method?
 A: If you count the number of problems you have a discrete quantitative variable, and you can perform quantitative analysis on it - for example, t-test.
Whether it makes sense depends on whether that quantitative measure is a good description of your observations for your purpose. Please notice that by counting problems you lose some information on the nature of the problem. Furthermore, by averaging your lose information on the distribution of the problem.
Let's make some questions:


*

*Is a population with 50% of rotten apples equivalent to a population with 50% of moldy apples? If it weren't, counting problems wouldn't be useful.

*Is a population with 25% of moldy rotten wormsy apples and 75% healthy apples equivalent to a population of 25% moldy apples, 25% rotten apples, 25% wormsy apples and 25% healty apples? If it weren't, averaging wouldn't make sense (and please notice that those populations aren't equivalent to anybody wanting to get as many healthy apples as possible).


I would outline a couple of alternatives that might be useful depending on your purpose:


*

*Count the number of apples without any problem and perform a proportion test.

*Test if problem distribution are significantly different with a chi square test of homogeneity.

