Variance (maybe?) of categorical data I don't really know the correct terminology to ask this question well. I have categorical data with counts and I want a measure of how "diverse" or "spread out" the data is. Variance comes to mind, but I don't know if that applies here.
Here is a two example of three distributions:
Sample 1   A: 100
B: 0  
C: 0  

Sample 2A: 20
B: 20
C: 20

Things to note: the overall size between samples will not be consistent (i.e. how sample 1 has 100 counts and sample 2 has 60 counts) but I would like to compare between samples. In addition sample 1 and sample 2 represent opposite ends of the spectrum of the metric I would like where sample 2 is uniformly distributed (highly variant) and sample 1 has minimal variance. In addition the data is categorical so (A:10, B:0, C:10) should be equivalent to (A:0, B:10, C:10) when evaluated.

New Question: Within sample and between sample categorical variation
A: You can always look at the variance of the counts, but looking at your description, entropy seems to be a natural choice, since it meets all of your criteria. Entropy is defined as
$$
S = -\sum_i p_i \log p_i
$$
where $p_i$ is a probability of observing $i$-th category. The more uniform would be the distribution, the higher entropy it displays, so it is about being "diverse" vs uniform.
In your case, you have counts, so you can use them to calculate the empirical probabilities
$$
\hat p_i = \frac{n_i}{\sum_j n_j}
$$
where $n_i$ is the count for the $i$-th category. Since you have exact zeros in the counts, you should use some estimator of the probabilities that "smoothes" the zeros, since otherwise the formula for the entropy would not work (single zero would zero-out everything), one approach could be using a Bayesian estimator like Laplace smoothing, i.e.
$$
\hat p_i = \frac{n_i+\alpha}{\sum_j n_j+\alpha}
$$
where $\alpha$ is some constant, e.g. $\alpha=1$. In R this translates to:
> prob <- function(n, alpha=1) (n+alpha)/sum(n+alpha)
> entropy <- function(p) -sum(p*log(p))
> entropy(prob(c(0, 0, 100)))
[1] 0.1092225
> entropy(prob(c(20, 20, 20)))
[1] 1.098612
> entropy(prob(c(10, 0, 10)))
[1] 0.8418553
> entropy(prob(c(0, 10, 10)))
[1] 0.8418553

As you can see, sample 1 has low entropy, while sample 2 has high entropy. For samples 3 and 4, the entropy is the same, higher then for sample 1 (they are less extreme), but lower then sample 2 that is uniformly distributed.
