r/math•
functor7

A (non)-Bias in Primes

There is a bias in primes, typically known as Chebyshev's Bias or the "Prime Race". Basically, this bias says that if you start going along the number line and sort the primes into two bins as you go along, one bin for prime that are 1 mod 4 and the other for those that are 3 mod 4 (we can ignore2), then for 99% of this "race" there will be more primes in the 3 mod 4 bin. That is, most of the time there are more primes that are 3 mod 4 than there are primes 1 mod 4.

This works in greater generality. If we sort primes mod N then there will (usually) be more primes in buckets x mod N where x is not a square mod N than in the buckets y mod N where y is a square mod N. It seems as though the primes try to avoid being quadratic residues as much as they can.

This is a bit odd in light of Dirichlet's Theorem on Primes in Arithmetic Progressions, which says that the primes are all equidistributed in appropriate residue classes as a whole. Though, it isn't inconsistent with this result, as it merely says that at the end - even if non-residues are in the lead for most of the race - it will end in a tie. But this bias still exists and there should be a meaningful reason for it.

To dig into these results a bit we, naturally, end up working with the Zeta function and its friends. These do, after all, hold information about how primes are distributed within its analytic properties. But with these functions (and some strong Riemann Hypothesis assumptions) we can prove this bias and quantify it pretty well (see here for more). But with this analysis we can actually see how we are, in a way, creating this bias.

The zeta functions do not tell us about primes. They tell us about prime powers. A lot of results about primes which use the zeta function actually prove a related result for prime powers, and then get rid of the contributions to higher prime powers through some kind of approximation or correction. You can see this happen in the Divergence of the Sum of Reciprocal Primes and in the Prime Number Theorem when we pass to the Chebyshev Function. Overall, the zeta functions tell us that prime powers are the natural objects of study when it comes to the distribution of primes.

The proof of Chebyshev's bias is along the same lines: Get rid of the contributions of higher powers through some asymptotic bound. But through this process is when we end up creating the bias itself. There is no Chebyshev's Bias for the prime powers and it is through the exclusion of higher powers that we create the bias. To see how this works, we can consider the case of sorting the prime powers mod 4. When we do this, every prime-square will fall into the 1 mod 4 bucket. That's a lot of numbers that automatically go to one of the buckets and to balance it out we will need the primes to act as counterweights which means favoring the 3 mod 4 bucket. And so Chebyshev's bias exists to prevent a bias in the distribution of prime powers.

I'm not the best at making graphics, but you can track how often one bucket is favored over the other as a percent and when you compare primes to prime powers, you can see the bias disappear in this graph). There are some scaling factors in here, but these arise from how Chebyshev's function tells us we should weight prime powers when counting them. Overall we can see that, in the end, Chebyshev's bias is an anti-biasing mechanism.

But, in the end, Terry Tao can explain things much better than I, though he didn't include a poorly made Python graph to illustrate things.

Posted Jan 22, 2021, 4:49 AM UTC

2369
chebushka•

Your observation about the contribution from squared primes being the source of the bias is also described by Granville and Martin. See the second and third paragraphs of p. 21 of their paper: https://arxiv.org/pdf/math/0408319.pdf.

When comparing the Chebyshev bias with Dirichlet's theorem, you write

it isn't inconsistent with this result, as it merely says that at the end - even if non-residues are in the lead for most of the race - it will end in a tie

but this is apples and oranges: the quantity being measured in Chebshev's bias is a difference of two prime number counts up to x while Dirichlet's theorem is about a ratio of prime number counts up to x. The tie at the end in Dirichlet theorem is about the limit of certain ratios of prime number counts, and such ratios completely wash out anything involving differences. So it's misleading to say Dirichlet's theorem is consistent or inconsistent with Chebyshev's bias, as they're not about the same kind of prime counting.

Here's an analogy. The functions x^2 + x and x^2 + sqrt(x) both have a ratio with x^2 that tends to 1 and a difference with x^2 that goes to infinity, so if you consider the asymptotic relations x^2 + x ~ x^2 and x^2 + sqrt(x) ~ x^2 as saying there is a "tie" in the growth rates, that is neither consistent nor inconsistent with the behavior of the differences. Knowing two functions are asymptotic is operating on a different scale than knowing something about their difference.

60
NoGrapefruitToday•

I don't know why you decided to write up this glorious post, but I'm really glad you did. Thank you very much for making my morning just a little bit more interesting!

11
QuateAlgebraic Topology•

Good read, thanks for the post!

10
IrishSoldier124•

Ya know, I joined this page for the hell of it, because I thought algebra was pretty cool and I was always happy with myself that I could figure out what y=Mx+b means and expand on it. Then I started reading what you guys post here and it’s like...are you all published mathematicians or researchers or something? I can’t wrap my mind around anything that’s posted in here like “oh yeah 4n+3 is an expressed form for these prime numbers” and I’m over here like “that’s a weird way of saying it can’t be divided by 2” 😂 I love this page but damn, yall lost me quick

2
PM_ME_UR_THEOREMS•

I have a bachelor in math and I don't understand half the stuff that people put on this subreddit haha no need to feel bad. Math has a lot of specialization into certain fields, so if you haven't studied a field before its quite hard to follow posts on that topic.

If you wanna learn more about whats in this post, deffo rec learning some number theory. Its one of the most accessible forms of pure math to get into for a layman.

1
dxdydz_dVNumber Theory•

Awesome post. I had never thought about zeta functions as describing prime powers in this way before. You describe how primes try to avoid being non-residues and how this ties into Chebychev's bias, and I have to ask, do the behavior of primes as cubic (or higher power) residues or non-residues also lead to any form of biasing effects?

1
functor7OPNumber Theory•

Yes, they all contribute to some degree. For instance, there should be more primes away from cubic residues. It's just much smaller a contribution than prime squares because, up to a point, primes and prime squares make up almost all prime powers.

1
BoundingBadgerNumber Theory•

Any bias from higher prime powers will quickly wash out, asymptotically speaking. A key feature of Chebyshev's bias is that the order of magnitude of the contribution coming from subtracting off the prime powers is the same as the contribution from a single nontrivial zero of the relevant zeta or L-function (assuming RH): both are on the order [; O(x^{1/2}) ;]. The contribution from each zero is unbiased on a logarithmic scale, so to overcome the bias coming from the prime squares (e.g., for 1 mod 4 to jump ahead of 3 mod 4), the different nontrivial zeros essentially have to work together to overcome the contribution from the squares. This happens, but it's rare, leading to the 99.99%-type results on how often Chebyshev's bias holds.

​

If RH weren't true, even if there were only one non-trivial zero to the right of the half-line, the contribution from that single zero would almost always overpower the bias coming from the prime squares. Given the state of computations, that zero would have to lie very high up in the complex plane, so its effects would take a while to be felt, but eventually it'd dominate and Chebyshev's bias would wash away; 1 (mod 4) and 3 (mod 4) would each be ahead 50% of the time. This is the kind of effect that will be seen for cubes and higher powers of primes, except that there certainly are low-lying zeros on the half-line, so any bias coming from prime cubes would quickly fade. It'd be observable for a while, but pretty rapidly (in the scale typically considered for Chebyshev's bias) it'd become almost irrelevant. The zeros (which I think of as inherent noise in the distribution of the primes) would mute almost all effects.

2
Sijja_•

Thanks for this..☺️😘

1