Skip to main content
100%

Fitting data to a power law, computing statistics and testing against other distributions.

✓ Published0🌍 Public
Aandyreagan
Last edited Oct 8, 2013
Created on Oct 8, 2013

This example tests whether donation data from six nonprofit organizations follows a power-law distribution. It uses the `powerlaw` Python package to fit each dataset, compute the scaling parameter alpha, and compare the power-law fit against lognormal, exponential, stretched exponential, and truncated power-law alternatives using likelihood-ratio tests. The code outputs a LaTeX table with basic statistics (mean, standard deviation, maximum), fit parameters, and significance levels for each institution and year, highlighting cases where the p-value is below 0.05.

AI-generated description

Similar vizzes