{"categories":[{"label":"Mathematics","url":"https://skillfed.io/packages/category/scientific-engineering-mathematics/3"}],"enrichment":{"capability":"Fits heavy-tailed distributions like power laws to data and compares them against alternative distributions such as lognormals using statistical methods from Clauset et al. 2007.","skillfed_tags":["statistical-testing","distribution-fitting","heavy-tailed-data"],"use_cases":["Analyze network degree distributions or other empirical data to test whether they follow power laws.","Compare competing heavy-tailed distribution hypotheses using likelihood-ratio tests to determine the best fit.","Visualize fitted power-law distributions and raw data together using matplotlib integration.","Validate whether observed tail behavior in scientific datasets (e.g., biological, physical) matches power-law predictions.","Fit power-law exponents (alpha) and minimum values (xmin) for downstream modeling or theoretical comparison."],"what_it_does":"powerlaw is a statistical toolbox for testing whether empirical data follows a power-law distribution and comparing it against competing heavy-tailed models like lognormals. It implements the rigorous methods from Clauset et al. 2007 and Klaus et al. 2011, which address the common problem of incorrectly identifying power laws in real-world data. The package fits power-law parameters (alpha and xmin), performs goodness-of-fit tests, and conducts likelihood-ratio comparisons between distributions.\n\nThe library is designed for researchers and data analysts who need to determine whether their data exhibits true power-law behavior or whether simpler distributions (like lognormal) provide equally good or better explanations. It integrates with matplotlib for visualization and uses numpy and scipy for numerical computation. The package includes a lognormal_positive variant for cases where theoretical constraints require the underlying distribution parameters to remain positive.","worth_installing":"Yes. The package is actively maintained, has no known vulnerabilities, low install friction, and a permissive license. It is the standard tool for rigorous power-law fitting in Python and is well-suited for academic research, data analysis, and any work requiring careful statistical comparison of heavy-tailed distributions. Install it if you need to test whether data actually follows a power law rather than relying on visual inspection or naive fitting."},"id":"powerlaw","links":{"html":"https://skillfed.io/packages/powerlaw","md":"https://skillfed.io/packages/powerlaw.md","pypi":"https://pypi.org/project/powerlaw/"},"maintenance":{"status":"active"},"meta":{"latest_release":"2026-01-02","license_spdx":null,"license_treatment":"permissive","name":"powerlaw","python_support":"supports_current","summary":"Toolbox for testing if a probability distribution fits a power law"},"popularity":{"monthly_downloads":118899,"position":12100,"tier":"top_15000"},"security":{"n_vulnerabilities":0},"version":"2.0.0"}
