Let $(X,d)$ be a metric space. If set $A\subseteq X$, let $H^{\alpha}$ be the $\alpha$-dimensional Hausdorff measure on $A$, where $\alpha\in[0,2]$ and $\text{dim}\_{\text{H}}(A)$ is the Hausdorff dimension of set $A$.


**Motivation:** If the set $A\subseteq[0,1]\times[0,1]$, I would like to measure set $A$'s deviation from a uniform subset $A^{\prime}$ of $[0,1]\times[0,1]$ with Hausdorff dimension $\alpha$, where:



> 
> If set $A^{\prime}\subseteq[0,1]\times[0,1]$ has Hausdorff dimension $\alpha$ less than $2$; for all real $x\_1,x\_2\in J\_n$ *where* sequence of sets $(J\_n)\_{n\in\mathbb{N}}=(\left\{1/n,2/n,3/n,\cdot\cdot\cdot,1\right\})\_{n\in\mathbb{N}}$, if $0\le x\_1<x\_2\le 1$ and $\mu$ is the [*counting measure*](https://en.wikipedia.org/wiki/Counting_measure) *where*:
> 
> 
> $$\mu^{\star}(A)=\begin{cases}
> 1/\mu(A) & \mu(A)<+\infty\\
> 0 & \mu(A)=+\infty
> \end{cases}$$
> 
> 
> with $\mu^{\star}(A)< x\_2-x\_1\le 1$; we *get* $A^{\prime}$ is **uniform** in $[0,1]\times[0,1]$, when for $j\in\mathbb{N}$ and $j< n$, the number of squares $[x\_1,x\_2]\times[x\_1,x\_2]$ with area $j^2/n^2$ satisfying:
> 
> 
> $$H^{\alpha}(([x\_1,x\_2]\times[x\_1,x\_2])\cap A^{\prime})=H^{\alpha}(\text{dom}(A^{\prime})){H}^{\alpha}(\text{range}(A^{\prime}))(x\_2-x\_1)^2$$
> divided by the total # of squares with area $j^2/n^2$ *approaches* $1$ *as* $n,j\to\infty$ and $j/n\to 0$.
> 
> 
> 


Moreover, I want to define a measure of uniformity to be *between* (and including) zero and one (or zero and infinity) such that the larger the measure, the smaller the *non-uniformity*.


**Question:** How do we define such a measure?



Defining a measure of uniformity for measurable subsets of $[0,1]^2$ w.r.t dimension $\alpha\in[0,2]$
Here is another possible approach, perhaps closer to what the OP had in mind.


Let $S:=[0,1]^2$ be the unit square. "Partition" $S$ naturally into four congruent squares $S\_{1,j}$ (with side length $1/2$ each), where $j=1,\dots,4$; the quotation marks are used here because the $S\_{1,j}$'s will have some common boundary points. Next, "partition" each $S\_{1,j}$ naturally into four congruent squares (with side length $1/2^2$ each), so that we get $4^2$ squares $S\_{2,j}$ for $j=1,\dots,4^2$. Continue doing so, so that at the $k$th step we get $4^k$ squares $S\_{k,j}$ for $j=1,\dots,4^k$, for each $k=1,2,\dots$.


Take any subset $A$ of $S$. For each $k=1,2,\dots$ and each $j=1,\dots,4^k$, let
$$A\_{k,j}:=(A\cap S\_{k,j})-s\_{k,j},$$
where $s\_{k,j}$ is the southwest vertex of the square $S\_{k,j}$, so that $A\_{k,j}\subseteq S\_k:=2^{-k}S$.


Suppose that for each $k$ we have a "measure" $D\_k$ of dissimilarity for subsets of $S\_k$, so that for any two subsets $B$ and $C$ of $S\_k$ we have a nonnegative real number $D\_k(B,C)$, which is the greater the more "dissimilar" $B$ and $C$ are (and is $0$ if $B=C$); here the term "measure" is used in the general sense, not necessarily in the sense of measure theory. For instance, $D\_k(B,C)$ may depend on the [Hausdorff distance](https://en.wikipedia.org/wiki/Hausdorff_distance#Definition) between $B$ and $C$ or on some "measure" of the symmetric difference of the sets $B$ and $C$ or on some combination thereof.


Then the distance of the set $A$ from uniformity can be defined by the formula
$$D(A):=\sum\_{k=1}^\infty\frac1{L^k}\sum\_{j=1}^{4^k}\sum\_{m=1}^{4^k}
\frac{D\_k(A\_{k,j},A\_{k,m})}{1+D\_k(A\_{k,j},A\_{k,m})},$$
where $L$ is a real number $>16$ (to ensure the convergence of the series). Then $D(A)$ will be small if, for "most" levels $k$ of "zooming", "most" of the intersections of the set $A$ with all the "$k$-level" small squares $S\_{k,j}$ "look similar" to one another.
(Of course, $D(A)$ will depend on the choices of $L$ and the dissimilarity "measures" $D\_k$.)


For instance, for any $L$ and any $D\_k$'s we have $D(S)=0$ -- of course, the unit square $S$ is at distance $0$ from uniformity (in itself).


As another example, for the uniform grid $G\_n$ (defined in the [previous answer](https://mathoverflow.net/a/449757/36721)) with $n=2^K$ for a natural $K$, any real $L>16$, and any $D\_k$'s we have
$$D(G\_n)\le \sum\_{k=K+1}^\infty\frac1{L^k}\,16^k
=Cn^{-p}\to0$$
as $n=2^K\to\infty$, where $C:=\dfrac{16}{L-16}$ and $p:=\log\_2\dfrac L{16}$.
So, we see that $G\_n$ is close to uniformity for large $n$, even though the Hausdorff dimension of $G\_n$ is $0$ for all $n$ (in big contrast with the Hausdorff dimension of $S$, which is $2$). Thus, again we see that the Hausdorff dimension can hardly have anything to do with the idea of uniformity.


