1

I have a categorical variable with three levels

Cu
Cu000
Cu000
Cu035
Cu175
Cu000 
Cu175
Cu035
.
.
.

The exact distribution of the three values (Cu000, Cu035, Cu175) is as shown below.

Cu000 Cu035 Cu175 
  251   275   263 

I know that if the variable is binary then variance is p*(1-p), not sure how do I estimate the variance within a 3 level categorical variable? Any suggestion is apricated thanks.

Science11
  • 375
  • 2
  • 12
  • 3
    What do you want the variance of? There are *three* categories here, any one of which is (obviously) binary. Thus, you must be looking for something other than the three separate variances, but what exactly would that be? – whuber Aug 20 '21 at 21:54
  • @whuber, I am sorry the question was not clear. I have updated my question now. Hope this is a bit clear. I am looking for variance within a categorical variable with 3 levels. – Science11 Aug 21 '21 at 00:05
  • 1
    The variance of *what quantity*? The phrase "within a categorical variable with 3 levels" gives conditions but not what to calculate. Are you looking for the variances of each proportion for example? – Glen_b Aug 21 '21 at 01:55
  • @Glen_b, "variance of a categorical variable with 3 levels", – Science11 Aug 21 '21 at 02:11
  • 3
    In the sense that the asker is asking, there isn't one. As I understand, the asker is looking for a single number to capture how much the categorical variable deviates from having all probability mass on a single outcome. (doesn't exist—maybe entropy or some qualitative variation measure will suffice, but I don't know the asker's purpose) But you CAN look at each individual outcome (there are 3) as a Bernoulli r.v. to compute its variance. – Arya McCarthy Aug 21 '21 at 03:29
  • @AryaMcCarthy, that is exactly what I was looking for, a single number like Variance, for a categorical variable with more than 2 levels. Thanks Arya. Please post this in the answer section and I will accept this. – Science11 Aug 21 '21 at 03:36
  • 1
    I second the idea by @AryaMcCarthy about entropy. – Dave Aug 21 '21 at 03:58
  • I worry that we have led the OP into a solution that prior to suggesting it was not implied by the words they were using. It would be unfortunate if that guess is not actually what is required. – Glen_b Aug 21 '21 at 05:18
  • I’m not posting this as an answer because it’s not an answer. We don’t know enough about your problem for my carelessly suggested idea to make sense. – Arya McCarthy Aug 21 '21 at 12:35

0 Answers0