I am seeking a formalism to define the average height of
the rational points on a curve. This is straightforward
if the number of points is finite, but (to me) not straightforward
when the rational points are dense along the curve.
I will stick to $\mathbb{R}^2$ but all generalizes
to $\mathbb{R}^d$.


The *height* of rational number $x=a/b$ in lowest
terms is $h(x)= \max \{ |a|,|b| \}$.
A point $p \in \mathbb{R}^2$ is
[rational](http://en.wikipedia.org/wiki/Rational_point)
if both coordinates are rational, and the height $h(p)$
is the maximum height of its coordinates.


*Example*.
$$
\left(
x-\tfrac{1}{2}\right)^2+\left(
2
 y-\sqrt{2}+1\right)^2=3
$$
has (I believe) exactly two rational points,
$$
(-\tfrac{1}{2},-\tfrac{1}{2}) \;,\; (\tfrac{3}{2},-\tfrac{1}{2})
$$
of heights $2$ and $3$, and so average rational height $2\frac{1}{2}$.


The challenge is to define average height for curves
that are dense in rational points, for example, $x^2 + y^2 = 1$.
One crude & clumsy attempt follows.


For $p \in \mathbb{R}^2$, define $r(p)$ as
$$
r(p)=
\begin{cases}
1 &\text{if $p$ is a rational point},\\
0 &\text{if $p$ is not a rational point}.
\end{cases}
$$
and define $H(p)$ to be the same as $h(p)$ but extended
to all points of $\mathbb{R}^2$:
$$
H(p)=
\begin{cases}
h(p) &\text{if $p$ is a rational point},\\
0 &\text{if $p$ is not a rational point}.
\end{cases}
$$


The average height of the rationals
on a curve $C$ should be something like
$$
\frac
{ \int\_C H(p) \, r(p) \, ds }
{ \int\_C r(p) \, ds }
$$
but the denominator is zero.
(Credit but no blame to [GlenO](https://math.stackexchange.com/a/1250235/237)
in an MSE posting.)



> 
> ***Q***. Is there a natural and well-defined notion of the average
>  height of an infinite set of rational points on a curve?
>  Or is it impossible to make sense of this concept?
> 
> 
> 



Average height of rational points on a curve
First, may I change your notation a bit? Usually one uses $H(p/q)=\max\{|p|,|q|\}$ for the (multiplicative) height of a rational number, and $h(p/q)=\log H(p/q)$ is the logarithmic height. So I'll use that notation.


One natural way to study the distribution of the infinitely many rational points on a curve is to use a Dirichlet series. So if your curve is $C$ and if we write $C(\mathbb Q)$ for the set of rational points on $C$, then define
$$
 D(C,s) = \sum\_{P\in C(\mathbb Q)} \frac{1}{H(P)^s}.
$$
For example, if $C$ is the affine line (what you're writing as $\mathbb R$), then $C(\mathbb Q)=\mathbb Q$ and 
$$
 D(\mathbb Q,s) = \sum\_{a/b\in\mathbb Q} \frac{1}{\max\{|a|,|b|\}^s}.
$$
This is equal to something like $2\zeta(s-1)+1$ (I may well have made a minor mistake here), but the point is that the residue at $s=1$ gives you information about the distribution of the heights. These height zeta functions play a prominent role in the conjectures of Batyrev and Manin that have attracted much attention over the past couple of decades. (The conjecture as described at <https://en.wikipedia.org/wiki/Manin_conjecture> is in terms of the height counting function, which is an alternative way to study the distribution of points.)


Or you could look at something like
$$
 N(C,x) := \sum\_{\substack{P\in C(\mathbb Q)\\ H(P)\le x\\}} H(P).
$$
Then the goal would be to determine the growth rate as a function of $x$. For $C(\mathbb Q)=\mathbb Q$, this is a nice exercise. 


ADDENDUM: On further thought, I guess the "average height of a point on a curve" would be
$$
 \lim\_{x\to\infty} \frac{\displaystyle\sum\_{\substack{P\in C(\mathbb Q)\\ H(P)\le x\\}} H(P)}{\displaystyle\sum\_{\substack{P\in C(\mathbb Q)\\ H(P)\le x\\}} 1}.
$$
But most likely this limit is going to diverge. So more interesting, I think, is to determine the growth rate of either $N(C,x)$, or of the ratio in the limit, as a function of $x$.


