Talent and wealth

Posted on February 17, 2018 by Ilya

Intro

Is it possible that the distribution of wealth (assumed power-law) is a consequence of the distribution of talent (assumed normal)? If so, what should be the mapping \(f\), between talent \(x\), and wealth \(y\).

Consider two random variables:

\(X\) is the talent, \(Y\) is the wealth.

Assuming \(X \sim \mathcal{N}(\mu, \sigma)\), \(Y \sim \mathrm{Power}(y_{\text{min}}, \alpha)\) find \(f:\mathbb{R} \to [y_{\text{min}},+\infty)\), \(Y=f(X)\).

\(f\) is assumed continuous, so: \[P(x<X<x+dx) = P(y<Y<y+dy)\] \[f_X(x<X<x+dx)dx = f_Y(y<Y<y+dy)dy\]

Integrating both sides from \(-\infty\) to x we get normal CDF (\(\Phi\)) on the left:

\[\Phi(x; \mu, \sigma) = \int_{f(-\infty)}^{f(x)}\frac{\alpha-1}{y_{\text{min}}^{-\alpha+1}}y^{-\alpha}dy\]

\[ \Phi(x; \mu, \sigma) = \frac{\alpha-1}{y_{\text{min}}^{-\alpha+1}(-\alpha+1)} y^{-\alpha+1}\bigg\rvert_{f(-\infty)}^{f(x)} \]

\[f(x) = \frac{1}{ \left( f(-\infty)^{-(\alpha-1)} - y_{\text{min}}^{-(\alpha-1)}\Phi(x; \mu, \sigma) \right)^{\frac{1}{\alpha-1}}} \]

Singularity points occur when:

\[\Phi(x; \mu, \sigma) = \left( \frac{y_{\text{min}}}{f(-\infty)} \right)^{(\alpha-1)}\]

If \(\alpha \geq 2\) and \(y_{\text{min}} > f(-\infty) > 0\) there is no singularity.

Getting hands dirty

I used pure Haskell to compute \(f\):


```haskell
import Data.List (transpose)

-- phi taken from https://www.johndcook.com/blog/haskell-phi/
phi :: (Ord a, Floating a) => a -> a
phi x = y 
    where
        a1 =  0.254829592
        a2 = -0.284496736
        a3 =  1.421413741
        a4 = -1.453152027
        a5 =  1.061405429
        p  =  0.3275911

        -- Abramowitz and Stegun formula 7.1.26
        sign | x > 0     = 1
             | otherwise = -1
        t = 1.0/(1.0 + p * abs x / sqrt 2.0)
        e = 1.0 - (((((a5*t + a4)*t) + a3)*t + a2)*t + a1)*t*exp(-x*x/2.0)
        y = 0.5*(sign*e + 1.0)

f :: (Ord a, Floating a) => a -> a -> a -> a -> a
f alpha ymin finf x = 1/(finf**p - ymin**p * (phi x))**(-1/p)
    where p = -alpha+1

toLine :: String -> [String] -> String
toLine sep [x]    = x
toLine sep (x:xs) = x ++ sep ++ toLine sep xs

toCSVstr :: Show a => String -> [[a]] -> String
toCSVstr sep xss = toLine "\n" (map (toLine sep . map show) xss)

main = do
    let ymin = 10 -- USD
        alpha = 2
        xs = [-5,-5+0.01..5]
        y finf = map (f alpha ymin finf) xs
        finfs = [0.1, 5, 9.9, 10]
        df = transpose $ [xs] ++ map y finfs
        csv = toCSVstr "," df
    writeFile "wd.csv" $ "x,"++ (toLine "," . map show) finfs ++ "\n" ++ csv
```

Plotting in python:


```python
import matplotlib.pyplot as plt
import pandas as pd
import numpy as np

df = pd.read_csv('wd.csv', sep=',', index_col='x')
df.columns = df.columns.map(lambda x: '$f(\\infty)$='+x)

_, axs = plt.subplots(1+df.shape[1], 1, sharex=True, figsize=(2, 5))

x = np.linspace(-5, 5, 100)
axs[0].plot(x, 1/np.sqrt(2*np.pi) * np.exp(-0.5*x**2), '-k')
axs[0].set_ylabel('$f_X(x)$')

for ax in axs[1:]:
    ax.set_ylabel('f(x)')
df.plot(subplots=True, ax=axs[1:])
```

Conclusion

In our simple model, it is possible to assign wealth with monotonously increasing function of talent.

References