4

I came across a problem in a quant interview which read:
Suppose you continually randomly sample nested intervals from $[0,1]$, halving the size each time. That is, the next interval is $[x,x+0.5]$, where $x∼U(0,0.5),$ and so on. What is the pdf of the point this converges to?

It can be easily calculate that the expection of $X$ is $1/2$ and the Variance is $1/36$. Actually there exists a question about the variance and my approach is exactly the same as below.

My Approach:

We model the problem as a sum of distinct uniform random variables such that the random variables are $U_1 \sim U(0,1/2)$ , $U_2 \sim U(0,1/4)$, $U_3 \sim U(0,1/8)$ ,...., $U_n \sim U(0,1/(2^n))$. Now the point of convergence will be $X= \lim _{i=1} ^{\infty}U_i $

My attempts:

  • I want to compute the pdf directly through integration and evaluate its limiting behavior, but its tough to tackle with the bounds because of different range among the $U_i$s. $f_{L_N}(x) = \int_0^{\frac{1}{2^1}} \int_0^{\frac{1}{2^2}} \cdots \int_0^{\frac{1}{2^N}} \prod_{n=1}^N 2^n \, \delta\left( x - \sum_{n=1}^N y_n \right) \, dy_1 \, dy_2 \, \cdots \, dy_N.$

  • From the initial description we can also know the distribution is symmetric about $1/2$.

  • There may be some correspondence between this question and another?

  • I have tried the moment generating function, characteristic function and so on without progress. Characteristic functions of $U_i$ is $\phi_{X_n}(t) = 2^n \cdot \frac{1}{it} \left(e^{it / 2^n} - 1\right)$, in order to get the pdf we need to compute $f_L(x) = \frac{1}{2\pi} \int_{-\infty}^\infty e^{-itx} \prod_{n=1}^\infty \frac{2^n}{t} \left[\sin\left(\frac{t}{2^n}\right) + i\left(1 - \cos\left(\frac{t}{2^n}\right)\right)\right] \, dt. $

But how can I get the concrete distribution of $X$? I have searched over the Internet and only found that the sum of $n$ $U_i \sim [0,1]$ becomes Irwin-Hall distribution.

Mittens
  • 46,352
  • 2
    The question seems to be $X_i \sim U[0,2^{-i}]$ independently and asking for the distribution of $\sum\limits_1^\infty X_i$. What have you tried? – Henry Jan 14 '25 at 16:07
  • 1
    @Henry I added some details of my attempts above. I have no idea how to compute those two expressions. – Sillybear Jan 14 '25 at 16:21
  • 1
    I have seen this before at https://math.stackexchange.com/questions/4744218/what-is-the-standard-deviation-of-the-distribution where I showed a simulated density. P.S. Dester commented that it was a bump function with $f'(t) = 4 f(2t)$ (so not an analytic function) with its moment generating function described at https://math.stackexchange.com/questions/4745021/closed-form-for-prod-n-1-infty-frace-fracx2n-1-fracx2n – Henry Jan 14 '25 at 17:06
  • I can't believe this friendly-looking question leading to such difficulty. Thanks for your comments!@Henry – Sillybear Jan 14 '25 at 17:27
  • @Sillybear at which firm was this asked ? – Gabriel Romon Jan 14 '25 at 20:38
  • Why wouldn't you compute the moment-generating function? (or characteristic one) – van der Wolf Jan 14 '25 at 21:46
  • @vanderWolf I tried and failed and I don't think this can be calculated. – Sillybear Jan 15 '25 at 09:49

3 Answers3

4

The cumulative distribution function is the Fabius function, which looks like this (from Wikipedia). There are a lot of other questions here related to the Fabius function.

CDF

This CDF is determined by the functional differential equation $$F'(x) =2F(2x)$$ for $0 \le x \le \frac12$ with $F(0)=0, F(1)=1$, and the distribution is symmetric about $x=\frac12$ so you also have $F(x)+F(1-x)=1$ and $F'(x)=F'(1-x)$, and $F'(x)+F'(\frac12-x)=2$ so it is then easy to adapt the CDF to give the probability density function: just add the reflection of the curve and adjust the scales.

pdf

This closes matches an empirical density I found in an answer to a related question.

Unfortunately, $F(x)$ is not an analytic function and none of this makes the calculation of the CDF or density any easier. Despite this, $F(x)$ takes rational values when $x$ is a dyadic rational, and in particular $F(1)={1}$, $F(\frac1{2}) =\frac{1}{2}$, $F(\frac1{4}) =\frac{5}{72}$, $F(\frac1{8}) =\frac{1}{288}$, $F(\frac1{16}) =\frac{143}{2073600}$, $F(\frac1{32}) =\frac{19}{33177600}$, $F(\frac1{64}) =\frac{1153}{561842749440}$, $F(\frac1{128}) =\frac{583}{179789679820800}$ as shown in OEIS A272755 and A272757.

Mittens
  • 46,352
Henry
  • 169,616
2

As the OP suggested, if $(X_n:n\in\mathbb{N})$ is an i.i.d sequence of uniform distributes random variables in $[0,1]$ then $X=\sum^\infty_{n=1}2^{-n}X_n$ converges and $X$ has distribution $\mu_X$ supported on $[0,1]$. The Fourier transform of the law of $X$ is given by \begin{align} \widehat{\mu_X}(t)&=\int e^{itx}\,\mu_X(dx)=\prod^\infty_{n=1}2^n\frac{e^{2^{-n}i t}-1}{it}\\ &=\prod^\infty_{n=1}2^ne^{2^{-(n+1)}it}\frac{e^{2^{-(n+1)}it}-e^{-2^{-(n+1)}it}}{it}=\Big(\prod^\infty_{n=1}\frac{\sin(2^{-n-1}t)}{2^{-n-1}t}\Big)e^{it/2} \end{align}

Notice that $\widehat{\mu}$ can be extended to $\mathbb{C}$ as an entire function (being the limit of a product of entire functions that converge uniformly in compact sets). As a consequence, $$G(t)=e^{-2it}\widehat{\mu_X}(4 t)=\prod^\infty_{n=0}\frac{\sin(2^{-n} t)}{2^{-n} t},\tag{1}\label{one}$$ also entire, is the characteristic function of the series $Y:=2X-1=\sum^\infty_{n=1}2^{-n}(2X_n-1)$ the law of which is symmetric around $0$ and supported on $[-1,1]$. The symmetry of $G$ makes the analysis a little easier.

It turns out (see Arias de Reina, J., An infinitely differentiable function with compact support: Definition and properties, arXiv) that $G$ is rapidly decreasing, i.e., $G$ is a Schwartz function (the space of Schwartz functions is denoted by $\mathcal{S}$). Consequently, $$g(y)=\int_\mathbb{R} e^{2\pi tyi}G(-2\pi t)\,dt$$ is also a Schwartz function and its Fourier transform is $(\mathcal{F}g)(t)=G(-2\pi t)$. More importantly, $g$ is supported on $[-1,1]$. All this shows that $Y$ has a law $\mu_Y$ which is absolutely continuous with respect the Lebesgue measure $\lambda$ and that $\frac{d\mu_Y}{d\lambda}(y)=g(y)$. Therefore, the law $\mu_X$ of $X$ has a density in $\mathcal{D}=\mathcal{C}^\infty_{00}(\mathbb{R})$ that is supported in $[0,1]$. In Arias de Reina (idem) it is shown that $\operatorname{supp}(g)=[-1,1]$, $g(t)>0$ on $(-1,1)$, $g(0)=1$ and $$g'(t)=2(g(2t+1)-g(2t-1))$$


Moments of $X$:

Since $G(-2\pi t)=(\mathcal{F}g)(t)=\int e^{-2\pi iyt} g(y)\,dy$, identity \eqref{one} gives $$(\mathcal{F} g)(t)=\frac{\sin\pi t}{\pi t}(\mathcal{F} g)(t/2)\tag{2}\label{two}$$ Since $G$ is entire and symmetric, the Taylor expansion of $\mathcal{F}g$ about $0$ is of the form $$(\mathcal{F} g)(t)=\sum^\infty_{n=0}(-1)^n\frac{c_n}{(2n)!}(2\pi t)^{2n}$$ From \eqref{two} we have that $$(2n+1)2^{2n}c_n=\sum^n_{k=0}\binom{2n+1}{2k}c_k\tag{3}\label{three}$$ Notice that $c_0=1$. From this, it is possible to find $c_1$ (in fact all $c_k$ recursively). This yields the moments of $Y$ for $$(\mathcal{F} g)(t)=\int e^{2\pi ity}\,\mu_Y(dy)=\sum^\infty_{k=0}\frac{\mathbb{E}[Y^k]}{k!} (2\pi it)^k=\sum^\infty_{n=0}(-1)^n\frac{\mathbb{E}[Y^{2n}]}{(2n)!}(2\pi t)^{2n}$$ and so, $c_n=\mathbb{E}[Y^{2n}]$ for all $n\in\mathbb{Z}_+$.

Using $Y=2X-1$ one can then find moments of $X$. For example, with $n=1$ in \eqref{three}, $12c_1=c_0+3c_1$ and so, $c_1=\frac{1}{9}=\mathbb{E}[Y^2]$. Therefore, $\operatorname{Var}[X]=\frac14\mathbb{E}[Y^2]=\frac1{36}$ as mentioned by the OP.

Mittens
  • 46,352
1

Sara Billey and I called the independent sum of $U[0, 2^{-n}]$'s an example of a "generalized uniform sum distribution" in this paper (published in Combinatorial Theory). See Definition 3.10 and the discussion in Section 3 generally. For instance, the finite case has a large but explicit PDF formula; see Lemma 3.6. The cumulants are nice (e.g. mean and variance), but little else is recognizable.

Our interest was limit laws--if you have a sequence of such distributions and standardize them, what can you converge to (weakly)? It turns out if you add a normal distribution summand (we called that more general family DUSTPAN distributions) the family is then closed under standardized weak limits.