# Why do my Stack Exchange reps follow a power law?

I noticed a pattern while looking at my network profile the other day, and I'm wondering if it's a fluke, or if there is something deep to it.

My reps for my top five Stack Exchange communities follow a inverse-square power law pretty neatly. (Red dots are data; blue curve is a perfect inverse-square law.)

The ratio of my top SE rep to subsequent ones is 1, 4.02, 8.86, 16.58, 21.15. All but the last are within a few percent of the expected 1, 4, 9, 16, 25 for an inverse-square law. I'm not a statistician, so I have the following questions:

1. How can I go about testing whether this is a fluke or not?
2. Is there a universality argument for why this power law might arise?

Some remarks:

• If you go further down my list of SE reps, the power law disappears, because it mostly consists of sites I've only visited or maybe posted once on. All power laws have a cutoff, though, so this is unsurprising.
• I've looked at some other user profiles, and there seem to be different classes of users. Many are only active on one site, and there is no power law there. Others are active on multiple sites and do seem to have superficially similar statistics to mine, but I don't know enough to test whether any of this is statistically significant.
• This may fall under, or be highly related to Zipf's law Feb 8, 2021 at 7:38

### Statistical hypothesis testing

To test your hypothesis, you might (unsurprisingly) find statistical hypothesis testing to be a useful paradigm. In your case, your null hypothesis $$H_0$$ is that your empirical data follows a power law distribution. Your alternative hypothesis $$H_a$$ would be that it follows some other distribution. Can you reject your null hypothesis?

Your empirical data is a sample, and as such you can compute statistics (just a numeric value, basically) on that sample. You can choose a statistic such that the less likely the sample is, assuming the null hypothesis is true, the "more extreme" (usually, the larger) the statistic.

A given statistic follows a given distribution (by definition). As such, you can compute the probability of a value as extreme or even more extreme for the statistic than that obtained from your sample, given the null hypothesis is true: this is just the complementary CDF (i.e. the tail distribution) of the statistic.

This p-value can also be interpreted as the probability of a type I error, also known as a false positive. In statistical hypothesis testing, a false positive happens when you reject your null hypothesis when it was in fact true. As such, the p-value is a convenient tool for finding out how likely a null hypothesis is to be true (or not!).

It is good scientific practive to fix a statistical significance level $$\alpha$$ before hand: if the p-value is smaller than it, a type I error is very unlikely, so you can safely reject the null hypothesis (still, you might be wrong, so never think that the p-value is conclusive, definitive evidence!). Likewise, the larger the p-value is, the more likely the null hypothesis is to be true. Probably the most common value for $$\alpha$$ is $$0.05$$, but it's really up to you.

### Applied statistics

In your case, you want to find out whether your empirical data (your sample) comes from a specific distribution. A fairly standard test for this is the Kolmogorov-Smirnov test (KS test). In this case, the relevant KS test is the one-sample test, since you're comparing a sample to a reference distribution (instead of two samples).

I don't have access to your data, but if you want to test this on your own, many statistical software packages offer functionality to use the KS test to test a hypothesis. SciPy is such a package for Python, which allows you to test the goodness of fit of your power law to the empirical data you have.

As a useful extra tidbit to your problem, the vocabulary revolving around the significance level might be a bit opaque: replacing the significance level $$\alpha$$ with the confidence level $$1 - \alpha$$ might make a bit more sense.

A small warning though: your very small number of data points might give you a large p-value despite having a very good fit! This is due to the way the KS statistic is defined.

### Universality

It's quite difficult to say much about the universality of your particular case, without looking at data for a wider sample for StackExchange users. StackExchange offers a data explorer which allows you to query the reputation of users on different sites.