Kepler's third law or periods affirms that:
"The squares of the times that the planets use to cover their orbits are proportional to the cube of their average distances from the Sun".
font from as an example https://it.wikipedia.org/wiki/Leggi_di_Keplero
(the first definition) and
from the English book PHYSICS, James Walker, 5^ edition
I write $r=\mathrm{d}(\text{Planet,Sun})$ and $r_i$ for $i=1,\ldots n$, are the radius vectors of the planet when it moves during its period of revolution around the Sun. I have written only $r_1, r_2$ and $r_3$. Considering that in the starting definition we speak of average distances, is it possible to write
$$\frac{T^2}{\langle r\rangle^3}=\text{constant}\tag 1$$
where I indicate the arithmetic average of the distances of a planet from the Sun when it travels through its elliptical orbit?
For example we have an equation of an canonical ellipse,
$$\frac{x^2}{a^2}+\frac{y^2}{b^2}=1$$ where $a$ is the major semi-axis, $b$ the minor semi-axis with $a>b>0$. Supposing to keep the numerator constant in the $(1)$ if I take just three distances $r_1$, $r_2$ and $r_3$ and I consider, using for example, Geogebra with a drawing
$$\langle r \rangle=\frac{r_1+r_2+r_3}{3}\approx a \tag 2$$
If this approach is meaningful then I can also write, with good approximation, that
$$\frac{T^2}{a^3}=\text{constant}\tag 3$$
So the $(3)$ is justified by the $(1)$. But in almost all books in Italian language of an high school books, the first definition is not given, but it is written that
The ratio between the square of the revolution period and the cube of the semi-axis major of the orbit is the same for all planets.
My question is:
Is there a correlation of average distances $\langle r \rangle$ with the $a$ or $\langle r \rangle\equiv a$?
Any answer is welcome and I hope with a lot of serenity.