Advertisement · 728 × 90
#
Hashtag
#Theilindex
Advertisement · 728 × 90
Welcome to the UNC Salary Information Database.

@ experts in #IncomeInequality,
Has anyone ever used the various numerical metrics with salaries at an institution level?

I.E. what is the #Gini Coefficient or #TheilIndex for the various unis in the #UNC system, courtesy of the staff salary database: uncdm.northcarolina.edu/salaries/ind...

1 0 1 1
T = rSym = (Theil_T[(a,b)] + Theil_T[(a,b)]) / 2
H = zHoover = Hoover inequality ("Robin Hood index")

Software to compute theses measures:
in https://drive.proton.me/urls/FBYNTG45P4#RafOE8CV1KPf

The original source: TheilHooverPlatoGini.hs (Haskell code).
I additionally generated TheilHooverPlatoGini.py and TheilHooverPlatoGini.lua using ChatGPT.

T = rSym = (Theil_T[(a,b)] + Theil_T[(a,b)]) / 2 H = zHoover = Hoover inequality ("Robin Hood index") Software to compute theses measures: in https://drive.proton.me/urls/FBYNTG45P4#RafOE8CV1KPf The original source: TheilHooverPlatoGini.hs (Haskell code). I additionally generated TheilHooverPlatoGini.py and TheilHooverPlatoGini.lua using ChatGPT.

Plato_Inequality_Indicator.hs (Haskell code) is here:
in https://drive.proton.me/urls/FBYNTG45P4#RafOE8CV1KPf

You can use e.g. GhatGPT to convert the code to other languages.

Plato_Inequality_Indicator.hs (Haskell code) is here: in https://drive.proton.me/urls/FBYNTG45P4#RafOE8CV1KPf You can use e.g. GhatGPT to convert the code to other languages.

Two experimental inequality measures:
- zPlato
- rAccept and zAccept

The acceptance measure surely is disputable.

#ResearchProposal #TheilIndex #TheilRedundancy #HooverInequality #HooverIndex #RobinHoodIndex #Gini #GiniIndex #GiniCoefficient #PlatoInequality #inequality

See also ALT-text

0 0 1 1
-- Part 1 --

-- This Haskell code was sent as a prompt to Meta AI:
-- Request to Meta AI:
--   Not considering computation errors,
--   show that both functions are equivalent.

-- ---------------------------------------------------------------------------------
type GroupSize = Double
type GroupRessources = Double
type Percentile = (GroupSize, GroupRessources)
type AllPercentiles = [Percentile]
type Percentiles = [(GroupSize, GroupRessources)]
type TheilRedundancy = Double

computeTheilT_1 :: Percentiles -> TheilRedundancy
computeTheilT_1 allPercentiles = 
  0.5 * sum [log (a / b) * ((a / aTotal) - (b / bTotal)) | (a, b) <- allPercentiles]
  where 
    aTotal = sum [a | (a, _) <- allPercentiles]
    bTotal = sum [b | (_, b) <- allPercentiles]

computeTheilT_2 :: Percentiles -> TheilRedundancy
computeTheilT_2 allPercentiles = 
  0.5 * sum [theilTab a b aTotal + theilTba a b bTotal | (a, b) <- allPercentiles]
  where 
    aTotal = sum [a | (a, _) <- allPercentiles]
    bTotal = sum [b | (_, b) <- allPercentiles]
    theilTab a b aTotal = a * log (a / b) / aTotal
    theilTba a b bTotal = b * log (b / a) / bTotal
-- ---------------------------------------------------------------------------------

main :: IO ()
main = do
  let percentiles = [(10, 10), (20, 400), (30, 9000), (40, 160000)]
  let theilT_1 = computeTheilT_1 percentiles
  let theilT_2 = computeTheilT_2 percentiles
  print ("Theil T (1): " ++ show theilT_1)
  print ("Theil T (2): " ++ show theilT_2)
{-
> .\SymmetricTheilT.exe
"Theil T (1): 1.2577697898110196"
"Theil T (2): 1.2577697898110196"
-}

-- Part 1 -- -- This Haskell code was sent as a prompt to Meta AI: -- Request to Meta AI: -- Not considering computation errors, -- show that both functions are equivalent. -- --------------------------------------------------------------------------------- type GroupSize = Double type GroupRessources = Double type Percentile = (GroupSize, GroupRessources) type AllPercentiles = [Percentile] type Percentiles = [(GroupSize, GroupRessources)] type TheilRedundancy = Double computeTheilT_1 :: Percentiles -> TheilRedundancy computeTheilT_1 allPercentiles = 0.5 * sum [log (a / b) * ((a / aTotal) - (b / bTotal)) | (a, b) <- allPercentiles] where aTotal = sum [a | (a, _) <- allPercentiles] bTotal = sum [b | (_, b) <- allPercentiles] computeTheilT_2 :: Percentiles -> TheilRedundancy computeTheilT_2 allPercentiles = 0.5 * sum [theilTab a b aTotal + theilTba a b bTotal | (a, b) <- allPercentiles] where aTotal = sum [a | (a, _) <- allPercentiles] bTotal = sum [b | (_, b) <- allPercentiles] theilTab a b aTotal = a * log (a / b) / aTotal theilTba a b bTotal = b * log (b / a) / bTotal -- --------------------------------------------------------------------------------- main :: IO () main = do let percentiles = [(10, 10), (20, 400), (30, 9000), (40, 160000)] let theilT_1 = computeTheilT_1 percentiles let theilT_2 = computeTheilT_2 percentiles print ("Theil T (1): " ++ show theilT_1) print ("Theil T (2): " ++ show theilT_2) {- > .\SymmetricTheilT.exe "Theil T (1): 1.2577697898110196" "Theil T (2): 1.2577697898110196" -}

-- Part 2 --

main :: IO ()
main = do
  let percentiles = [(10, 10), (20, 400), (30, 9000), (40, 160000)]
  let theilT_1 = computeTheilT_1 percentiles
  let theilT_2 = computeTheilT_2 percentiles
  print ("Theil T (1): " ++ show theilT_1)
  print ("Theil T (2): " ++ show theilT_2)
{-
> .\SymmetricTheilT.exe
"Theil T (1): 1.2577697898110196"
"Theil T (2): 1.2577697898110196"
-}


{-
Answer from Meta AI:

Let's expand theilTab a b aTotal + theilTba a b bTotal:

theilTab a b aTotal + theilTba a b bTotal 
= a * log (a / b) / aTotal + b * log (b / a) / bTotal
= a * (log a - log b) / aTotal + b * (log b - log a) / bTotal
= a * log a / aTotal - a * log b / aTotal + b * log b / bTotal - b * log a / bTotal
= log a * (a / aTotal - b / bTotal) - log b * (a / aTotal - b / bTotal)
= (log a - log b) * (a / aTotal - b / bTotal)
= log (a / b) * (a / aTotal - b / bTotal)


This is equivalent to the expression in computeTheilT_1.
Therefore, both functions are equivalent.

The output of your program also confirms this,
as both theilT_1 and theilT_2 have the same value.

-}

-- Part 2 -- main :: IO () main = do let percentiles = [(10, 10), (20, 400), (30, 9000), (40, 160000)] let theilT_1 = computeTheilT_1 percentiles let theilT_2 = computeTheilT_2 percentiles print ("Theil T (1): " ++ show theilT_1) print ("Theil T (2): " ++ show theilT_2) {- > .\SymmetricTheilT.exe "Theil T (1): 1.2577697898110196" "Theil T (2): 1.2577697898110196" -} {- Answer from Meta AI: Let's expand theilTab a b aTotal + theilTba a b bTotal: theilTab a b aTotal + theilTba a b bTotal = a * log (a / b) / aTotal + b * log (b / a) / bTotal = a * (log a - log b) / aTotal + b * (log b - log a) / bTotal = a * log a / aTotal - a * log b / aTotal + b * log b / bTotal - b * log a / bTotal = log a * (a / aTotal - b / bTotal) - log b * (a / aTotal - b / bTotal) = (log a - log b) * (a / aTotal - b / bTotal) = log (a / b) * (a / aTotal - b / bTotal) This is equivalent to the expression in computeTheilT_1. Therefore, both functions are equivalent. The output of your program also confirms this, as both theilT_1 and theilT_2 have the same value. -}

Symmetrized Theil-T Redundancy:

½ (a * ln (a / b) / aTotal + b * ln (b / a) / bTotal)

and

½ ln (a / b) * (a / aTotal - b / bTotal)

are equivalent.

#Theilindex #TheilRedundancy #GiniIndex #Ginicoefficient

0 0 0 1

Computing inequality measures:
snrk.de/TheilHooverP... contains Haskell code for computing the following symmetric (swap-invariant) #inequality indicators:
※ Gini [0,1]
※ Hoover [0,1]
※ Plato [0,1]
※ Theil_sym [0,∞), Theil_symCDF [0,1]

#Giniindex, #Gini, #Theilindex, #Platoinequality, #Hooverindex

0 0 1 5
Wealth distribution in the US, 1990:

X:\Haskell> .\IneqComps.exe "50,2.36|40,37.8|9,41.7|0.9,12.6|0.1,5.51"

IneqComps V16 2025-06-25

rSym     =  1.24162 (symmetric Theil redundancy)
zSym     =  71.108% (symmetric Atkinson inequality, zSym=1-exp(-rSym))
zPlato   =  70.605% (Plato inequality, Theil & Atkinson & Plato equivalent ratio: 85.303:14.697)
zGini    =  69.040% (Gini inequality,                      Gini equivalent ratio: 84.520:15.480)
zHoover  =  49.828% (Hoover inequality,                  Hoover equivalent ratio: 74.914:25.086)
1-Median =  92.121%
zAccept  = -0.74334 (experimental: zAccept=zHoover-rSym)



Wealth distribution in the US, 2020:

PS X:\Haskell> .\IneqComps.exe "50,2.385|40,28.9|9,37.7|0.9,16.7|0.1,14.3"

IneqComps V16 2025-06-25

rSym     =  1.53123 (symmetric Theil redundancy)
zSym     =  78.373% (symmetric Atkinson inequality, zSym=1-exp(-rSym))
zPlato   =  76.302% (Plato inequality, Theil & Atkinson & Plato equivalent ratio: 88.151:11.849)
zGini    =  74.734% (Gini inequality,                      Gini equivalent ratio: 87.367:12.633)
zHoover  =  58.710% (Hoover inequality,                  Hoover equivalent ratio: 79.355:20.645)
1-Median =  94.466%
zAccept  = -0.94413 (experimental: zAccept=zHoover-rSym)

Wealth distribution in the US, 1990: X:\Haskell> .\IneqComps.exe "50,2.36|40,37.8|9,41.7|0.9,12.6|0.1,5.51" IneqComps V16 2025-06-25 rSym = 1.24162 (symmetric Theil redundancy) zSym = 71.108% (symmetric Atkinson inequality, zSym=1-exp(-rSym)) zPlato = 70.605% (Plato inequality, Theil & Atkinson & Plato equivalent ratio: 85.303:14.697) zGini = 69.040% (Gini inequality, Gini equivalent ratio: 84.520:15.480) zHoover = 49.828% (Hoover inequality, Hoover equivalent ratio: 74.914:25.086) 1-Median = 92.121% zAccept = -0.74334 (experimental: zAccept=zHoover-rSym) Wealth distribution in the US, 2020: PS X:\Haskell> .\IneqComps.exe "50,2.385|40,28.9|9,37.7|0.9,16.7|0.1,14.3" IneqComps V16 2025-06-25 rSym = 1.53123 (symmetric Theil redundancy) zSym = 78.373% (symmetric Atkinson inequality, zSym=1-exp(-rSym)) zPlato = 76.302% (Plato inequality, Theil & Atkinson & Plato equivalent ratio: 88.151:11.849) zGini = 74.734% (Gini inequality, Gini equivalent ratio: 87.367:12.633) zHoover = 58.710% (Hoover inequality, Hoover equivalent ratio: 79.355:20.645) 1-Median = 94.466% zAccept = -0.94413 (experimental: zAccept=zHoover-rSym)

Whoops, the previous post was about 1990 (left side), not 2020 (right side).

#TheilIndex #TheilRedundancy #AtkinsonInequality #PlatoInequality #Gini #GiniIndex #GiniCoefficiant #HooverInequality #HooverIndex

Here are some wealth inequality indicators, this time for 1990 and 2020:

0 0 1 0
Graph depicting the "Distribution of Household Wealth in the U.S. by income group"

groups:
[0%,50%), group size 50%
[0%,90%), group size 40%
[90%,99%), group size 39%
[99%,99.9%), group size 0.9%
[99%.9%,100%], group size: 0.1%

time range:
1990-2020 (or later?)

Source: The Federal Reserve

-----------------------------------------------------------

Processed in Power Shell:

X:\Haskell> .\IneqComps.exe "50,2.36|40,37.8|9,41.7|0.9,12.6|0.1,5.51"

IneqComps V16 2025-06-25

rSym     =  1.24162 (symmetric Theil redundancy)
zSym     =  71.108% (symmetric Atkinson inequality, zSym=1-exp(-rSym))
zPlato   =  70.605% (Plato inequality, Theil & Atkinson & Plato equivalent ratio: 85.303:14.697)
zGini    =  69.040% (Gini inequality,                      Gini equivalent ratio: 84.520:15.480)
zHoover  =  49.828% (Hoover inequality,                  Hoover equivalent ratio: 74.914:25.086)
1-Median =  92.121%
zAccept  = -0.74334 (experimental: zAccept=zHoover-rSym)

X:\Haskell> .\IneqComps.exe --CSV "50,2.36|40,37.8|9,41.7|0.9,12.6|0.1,5.51"
1.241620979176E+00;711.084487868371E-03;706.052940093059E-03;690.396018805642E-03;498.279483845153E-03;921.205035971223E-03;-743.341495331143E-03;+1.000000000000E+00

Graph depicting the "Distribution of Household Wealth in the U.S. by income group" groups: [0%,50%), group size 50% [0%,90%), group size 40% [90%,99%), group size 39% [99%,99.9%), group size 0.9% [99%.9%,100%], group size: 0.1% time range: 1990-2020 (or later?) Source: The Federal Reserve ----------------------------------------------------------- Processed in Power Shell: X:\Haskell> .\IneqComps.exe "50,2.36|40,37.8|9,41.7|0.9,12.6|0.1,5.51" IneqComps V16 2025-06-25 rSym = 1.24162 (symmetric Theil redundancy) zSym = 71.108% (symmetric Atkinson inequality, zSym=1-exp(-rSym)) zPlato = 70.605% (Plato inequality, Theil & Atkinson & Plato equivalent ratio: 85.303:14.697) zGini = 69.040% (Gini inequality, Gini equivalent ratio: 84.520:15.480) zHoover = 49.828% (Hoover inequality, Hoover equivalent ratio: 74.914:25.086) 1-Median = 92.121% zAccept = -0.74334 (experimental: zAccept=zHoover-rSym) X:\Haskell> .\IneqComps.exe --CSV "50,2.36|40,37.8|9,41.7|0.9,12.6|0.1,5.51" 1.241620979176E+00;711.084487868371E-03;706.052940093059E-03;690.396018805642E-03;498.279483845153E-03;921.205035971223E-03;-743.341495331143E-03;+1.000000000000E+00


                  Any city however small, is divided at least into two,
                    one the city of the poor, the other of the rich;
                            these are hostile to each other.
                              (Plato, Politeia, 370 BC)

In the following example are five "cities". The redundancy (that's maximum entropy minus measured entropy) of the 4 cities is similar to the redundancy of the wealth distribution in two cities, where
- in the poor city 85.303% of the people own 14.697% of the wealth, and
- in the rich city 14.697% of the people own 85.303% of the wealth.
The Plato inequality indicator has been developed to get the data required for such a statement.

In the mid inequality range, the The Plato inequality indicator
behaves pretty much like the Plato inequality indicator, but in
the high inequality renge it is more sensitive then the Gini.


X:\Haskell> .\IneqComps.exe "50,2.36|40,37.8|9,41.7|0.9,12.6|0.1,5.51"

IneqComps V16 2025-06-25

rSym     =  1.24162 (symmetric Theil redundancy)
zSym     =  71.108% (symmetric Atkinson inequality, zSym=1-exp(-rSym))
zPlato   =  70.605% (Plato inequality, Theil & Atkinson & Plato equivalent ratio: 85.303:14.697)
zGini    =  69.040% (Gini inequality,                      Gini equivalent ratio: 84.520:15.480)
zHoover  =  49.828% (Hoover inequality,                  Hoover equivalent ratio: 74.914:25.086)
1-Median =  92.121%
zAccept  = -0.74334 (experimental: zAccept=zHoover-rSym)

X:\Haskell> .\IneqComps.exe --CSV "50,2.36|40,37.8|9,41.7|0.9,12.6|0.1,5.51"
1.241620979176E+00;711.084487868371E-03;706.052940093059E-03;690.396018805642E-03;498.279483845153E-03;921.205035971223E-03;-743.341495331143E-03;+1.000000000000E+00

Any city however small, is divided at least into two, one the city of the poor, the other of the rich; these are hostile to each other. (Plato, Politeia, 370 BC) In the following example are five "cities". The redundancy (that's maximum entropy minus measured entropy) of the 4 cities is similar to the redundancy of the wealth distribution in two cities, where - in the poor city 85.303% of the people own 14.697% of the wealth, and - in the rich city 14.697% of the people own 85.303% of the wealth. The Plato inequality indicator has been developed to get the data required for such a statement. In the mid inequality range, the The Plato inequality indicator behaves pretty much like the Plato inequality indicator, but in the high inequality renge it is more sensitive then the Gini. X:\Haskell> .\IneqComps.exe "50,2.36|40,37.8|9,41.7|0.9,12.6|0.1,5.51" IneqComps V16 2025-06-25 rSym = 1.24162 (symmetric Theil redundancy) zSym = 71.108% (symmetric Atkinson inequality, zSym=1-exp(-rSym)) zPlato = 70.605% (Plato inequality, Theil & Atkinson & Plato equivalent ratio: 85.303:14.697) zGini = 69.040% (Gini inequality, Gini equivalent ratio: 84.520:15.480) zHoover = 49.828% (Hoover inequality, Hoover equivalent ratio: 74.914:25.086) 1-Median = 92.121% zAccept = -0.74334 (experimental: zAccept=zHoover-rSym) X:\Haskell> .\IneqComps.exe --CSV "50,2.36|40,37.8|9,41.7|0.9,12.6|0.1,5.51" 1.241620979176E+00;711.084487868371E-03;706.052940093059E-03;690.396018805642E-03;498.279483845153E-03;921.205035971223E-03;-743.341495331143E-03;+1.000000000000E+00

Computing inequality indicators (Theil, Atkinson, Plato, Gini, Hoover) for the wealth distribution in the US, 2020 (right side of the graph).

#TheilIndex #TheilRedundancy #AtkinsonInequality #PlatoInequality #Gini #GiniIndex #GiniCoefficiant #HooverInequality #HooverIndex

0 0 1 0