A power law is a functional relationship between two quantities, where one quantity varies as a power of another.
Questions tagged [power-law]
124 questions
1
vote
2 answers
Painter puzzle - algorithmic estimation from first principles
This problem is based on a puzzle by Joel Spolsky from 2001.
A guy "gets a job as a street painter, painting the dotted lines down the middle of the road." On the first day he finishes up 300 yards, on the second - 150, and on the 3rd even less so.…

Will Ness
- 70,110
- 9
- 98
- 181
1
vote
1 answer
Creating power law distribution chart based on raw data
So, i have a raw data that if charted, should form a power law distribution. I'm not really sure how to smooth the chart. I can do it in Excel, but i want to do it in R.
I have a dataframe with 2 column. one is called frequency and another is called…

user2773013
- 3,102
- 8
- 38
- 58
1
vote
1 answer
KS test for power law
Im attempting fitting a powerlaw distribution to a data set, using the method outlined by Aaron Clauset, Cosma Rohilla Shalizi and M.E.J. Newman in their paper "Power-Law Distributions in Empirical Data".
I've found code to compare to my own, but im…

David
- 326
- 1
- 11
0
votes
0 answers
Fitting my data to power law and exponential function
I need to determine if the probability density of my data follows power law or exponential law and plot a linear fit on a loglog scale or a semilog scale respectively. My code works very well if my data follows a power law, but gives me a very bad…

S C
- 284
- 2
- 9
0
votes
1 answer
Generating values from lognormal and power law distributions within bounds
I have a dataset of an arbitrary number of elements (say, 10000) which follows lognormal distribution over a certain range of values (say, between 1 and 500). I successfully fit a distribution with the powerlaw module in Python. Then I need to…

Julian_P
- 101
0
votes
1 answer
How to use Maximum likelihood estimator to find a slope of power law distribution
I have a discrete power spectrum f(x) which is a power law with a specific exponent b: f(x) = A*x^(b). I want to estimate that exponent when I have f(x) and x. I'm interested in using a Maximum Likelihood Estimator (MLE) to find it. Why? Well,…

Mohamed
- 1
- 1
0
votes
1 answer
small KS p-value in fitting power law using degree data from graph with expected power-law degree distributions
I am using the fit_power_law function from the igraph R package. The function returns "KS.p" (the p-value of the Kolmogorov-Smirnov test) as a significance test of the fitness. As I understand it, the smaller the KS p-value, the more likely one can…

Mengjun Wu
- 3
- 1
0
votes
0 answers
how to compare 2 distribution with log-liklihood ratio with compare_distributions(d1, d2)
I want to compare power law distribution with log-normal using likelihood ratio test.I use power law package and use the code below with continuous data set of one variable.According to clauset et al.(2009) If this p-value is small ( p < 0.1) then…

Neda Fathi
- 13
- 4
0
votes
0 answers
Methods to check significance of data that has a power law distribution
Does anyone know a library in python that would allow to test signifincance of data that follows a power law distribution?
I tried using one-way ANOVA test, but then found that it is used for normally distributed data.
0
votes
0 answers
Extreme Value Theory: Problem with showing convergence - Power Law in Domain of Attraction of Fréchet
I'm doing a project on Extreme Value Theory in R and I'm having trouble showing convergence to Fréchet with maxima from a Power Law distributions, using normalizing constants.
convergence in domain of attraction:
[1]…

Manx30
- 3
- 2
0
votes
2 answers
Power law fit in Python
I have two columns of data, x and y. I am interested to do power law fit of the form: y=a+b*x^c. Are there packages available in Python which does it?

Wiz123
- 904
- 8
- 13
0
votes
1 answer
How to apply a constraint to a power law model so that it passes through a specific data point (Python)
I would like to develop a power law model using lmfit (or another library). Is there any way I can apply a constraint or bound to the model so that it has to pass through a specific data point (exp. the point (1, 2))
plm =…

Tyler Dejong
- 13
- 3
0
votes
0 answers
Calculation of the power-law distribution (and exponent)
Aim: My aim is the calculation and display of a power-law distribution.
Input to Phyton: The input files for Python provided by me are 1-column .txt files. Each .txt file has a column of numeric values extracted from time-series data. My script…

Philipp
- 335
- 2
- 4
- 12
0
votes
1 answer
Double broken power law fit is not working in python
I have been trying to curve fit double broken power law.
def sbpl(x,f0,a1,a2,a3,xb1,xb2):
if x[0] < xb1:
F=f0* x**(-a1)
elif xb1 <= x <= xb2:
F=f0* ((xb1)**(a2-a1)) *(x)**(-a2)
else:
…

NUSRIN HABEEB
- 1
- 1
0
votes
1 answer
Python's powerlaw package: AttributeError: 'powerlaw_gen' object has no attribute 'Fit'
I am trying to built a power law graph on Python but it raises error as below:
AttributeError: 'powerlaw_gen' object has no attribute 'Fit'
Even when I picked a standard data sample from an example posted by another user (@AcCap) on this forum in…

LucyP
- 31
- 5