Compounding binomial with arbitrary ([0,1]) valued random variable.


          Let $Z$ be a random variable which takes values in the interval [0,1] with continuous density function $f_Z$. Now we have a coin with probability for heads equal to $Z$. Let $X_n$ be the number of heads when flipping the coin $n$ times. Now consider the function
        
           $$f_n(x)=\begin{cases}
                      0, & x <0   \\
                      0, & x\ge 1 \\     
                   (n+1)\operatorname{P}(X_n=d),& x\in \Big[\frac{d}{n+1}, \frac{d+1}{n+1}\Big)\ \text{for some }d\in \{0,1,\ldots,n\}
             \end{cases}$$
          It turns out that $f_n$ converges to $f_Z$ in some sense. We will prove now pointwise convergence.
      
         Proof. Fix $x\in(0,1)$ and we should prove that $f_n(x)\to f_Z(x)$ as $n$ tends to infinity (from now on all our considerations will be for the intervarl $[0,1]$). For a fixed $n$ $x \in \Big[\frac{\left \lfloor{(n+1)x}\right \rfloor }{n+1}, \frac{\left \lfloor{(n+1)x}\right \rfloor+1}{n+1}\Big)$, hence $f_n(x)=(n+1)\operatorname{P}(X_n=\left \lfloor{(n+1)x}\right \rfloor)$. Denote for simplicity $n_x=\left \lfloor{(n+1)x}\right \rfloor$. Then $$f_n(x)=\int_{0}^{1}(n+1)\binom{n}{n_x}s^{n_x}(1-s)^{n-n_x}f_Z(s)\mathrm{d}s$$
          Now denote $$g_n(s)=(n+1)\binom{n}{n_x}s^{n_x}(1-s)^{n-n_x}$$
          This function is nonnegative with zeros at $0$ and $1$. Moreover $g_n(s)$ has only one critical point in the interval $(0,1)$ and it is $\frac{n_x}{n}$. That is the maximum since $g_n(0)=g_n(1)=0$ and $g_n(s)\ge 0$.
        
          We will prove the following
        
          $\textbf{Lemma}$ $$\forall \delta>0,\ \forall \varepsilon>0,\ \exists n_0: \forall n\ge n_0 \ \ (|s-x|>\delta \Rightarrow g_n(s)<\varepsilon)(*).$$
          Essentially this means that for big enough $n$ the function $g_n$ is very small on almost all of the interval $[0,1]$ (a subinterval in which it is big is centered at $x$). We could assume $\delta<x$ (if we prove this for $\delta'$ then it follows for all $\delta>\delta'$).
        
         Proof. Fix $\delta<x$ and $\varepsilon$. We are looking for $n_0$ such that $(*)$ holds. First of all it should be that large that if $n\ge n_0$ then $$\Bigg|\frac{n_x}{n}-x\Bigg|<\frac{\delta}{2}$$ Now we will find $n_0$ such that for $n\ge n_0$ we have $g_n(x-\delta)<\varepsilon$ and $g_n(x+\delta)<\varepsilon$. This will be enough to show that $g_n(s)<\varepsilon$ for $|s-x|>\delta$ since the maximum $\frac{n_x}{n}$ lies within the interval $(x-\delta,x+\delta)$ (as guaranteed above) so the function is increasing on $[0,x-\delta]$ and decreasing on $[x+\delta,1]$.
          What we will prove is that $$\lim_{n\to\infty}g_n(x-\delta)=0$$ and from here comes our $n_0$ (the case of $g_n(x+\delta)$ is analogous).
        
          We will use the squeeze lemma. The function is nonnegative. Now we will use approximations to obtain inequalities on the other side.
        
          Let us introduce some notation: for functions $a(n)$ and $b(n)$ defined on the natural numbers and taking positive real values, we will say that $a(n)<<_n b(n)$ if $\exists C>0,
          \exists n': \forall n\ge n'\ a(n)<Cb(n)$. Notice that if $$ \lim_{n\to \infty} \frac{a(n)}{b(n)}=c>0$$ then $a(n)<<_n b(n)$
         Start with the Stirling's approximation for the binomial coefficient to obtain $$g_n(x-\delta)<<_n(n+1)\frac{n^n}{n_x^{n_x}(n-n_x)^{n-n_x}}(x-\delta)^{n_x}(1-x+\delta)^{n-n_x}\ \ \ \ \ (1)$$
        Next examine $$\frac{(nx)^{n_x}}{n_x^{n_x}}=\left(\frac{\left \lfloor{(n+1)x}\right \rfloor+\{(n+1)x\}-x}{\left \lfloor{(n+1)x}\right \rfloor}\right)^{\left \lfloor{(n+1)x}\right \rfloor}=\left(1+\frac{\alpha_n}{\left \lfloor{(n+1)x}\right \rfloor}\right)^{\left \lfloor{(n+1)x}\right \rfloor}$$ where $|\alpha_n|\le 1$ so that the last expression is not greater than $e<3$. Thus $$\frac{n^{n_x}}{n_x^{n_x}}<\frac{3}{x^{n_x}}\ \ \ \ \ (2)$$
          Similarly
          \begin{equation} \label{eq1}
          \begin{split}
           & \frac{(n-nx)^{n-n_x}}{(n-n_x)^{n-n_x}}=\left(\frac{n-\left \lfloor{(n+1)x}\right \rfloor-\{(n+1)x\}+x}{n-\left \lfloor{(n+1)x}\right \rfloor}\right)^{n-\left \lfloor{(n+1)x}\right \rfloor} \\
           & = \left(1-\frac{\alpha_n}{n-\left \lfloor{(n+1)x}\right \rfloor}\right)^{n-\left \lfloor{(n+1)x}\right \rfloor}
          \end{split}
          \end{equation}
           where $\alpha_n$ is as before so $$\frac{n^{n-n_x}}{(n-n_x)^{n-n_x}}<\frac{3}{(1-x)^{n-n_x}}\ \ \ \ \ (3)$$
         Plugging $(2)$ and $(3)$ into $(1)$ we get
                                       \begin{equation} \label{eq2}
                                       \begin{split}
                                         g_n(x-\delta) & <<_n (n+1)\frac{1}{x^{n_x}(1-x)^{n-n_x}}(x-\delta)^{n_x}(1-x+\delta)^{n-n_x}\\ &=(n+1)\left(1-\frac{\delta}{x}\right)^{n_x}\left(1+\frac{\delta}{1-x}\right)^{n-n_x}\\
                                        &<<_n (n+1)\left(1-\frac{\delta}{x}\right)^{nx+x-1}\left(1+\frac{\delta}{1-x}\right)^{n-(nx+x-1)}\\
                                         &=(n+1)\left(\left(1-\frac{\delta}{x}\right)^{x}\left(1+\frac{\delta}{1-x}\right)^{1-x}\right)^{n}\left(1-\frac{\delta}{x}\right)^{x-1}\left(1+\frac{\delta}{1-x}\right)^{1-x}\ \ \ \ \ (4)
                                         \end{split}
                                          \end{equation}  
 Denote $$h(t)=\left(1-\frac{t}{x}\right)^{x}\left(1+\frac{t}{1-x}\right)^{1-x}$$
           Differentiating we see that $$h'(t)=\frac{t\left(1-\frac{t}{x}\right)^{x}\left(1+\frac{t}{1-x}\right)^{-x}}{(t-x)(1-x)}<0$$
          for $0<t<x$ and $h'(t)=0$ for $t=0$. Thus $h(t)$ is decreasing on $[0,x)$ so $1=h(0)>h(t)$ for $t>0$. This means that $h(\delta)<1$. So from $(4)$ $$g_n(x-\delta)<<_n (n+1) h(\delta)^n\left(1-\frac{\delta}{x}\right)^{x-1}\left(1+\frac{\delta}{1-x}\right)^{1-x} \xrightarrow[n \to \infty ]{} 0$$
             The lemma is done.
       
         With this lemma in hand the rest of the proof is not difficult. Fix $\gamma>0$ and we would like to find $n_0: \forall n\ge n_0$
       $$D_n:=\Bigg|\int_{0}^{1}(n+1)\binom{n}{n_x}s^{n_x}(1-s)^{n-n_x}f_Z(s)\mathrm{d}s-f_Z(x)\Bigg|<\gamma $$
       Rewrite the latter in terms of $g_n$ - $$D_n=\Bigg|\int_{0}^{1}g_n(s)f_Z(s)\mathrm{d}s-f_Z(x)\Bigg|$$
       Now using the fact that $\int_{0}^{1}g_n(s)\mathrm{d}s=1$ and the triangle inequality we obtain $$D_n\le  \int_{0}^{1}g_n(s)|f_Z(s)-f_Z(x)|\mathrm{d}s\ \ \ \ (5)$$
       Since $f_Z$ is continuous, $\exists M:\forall s\in[0,1] \ |f_Z(s)-f_Z(x)|<M $. Moreover $\exists \delta'>0:\  |s-x|<\delta' \Rightarrow |f_Z(s)-f_Z(x)|<\frac{\gamma}{2}$. And now we apply the lemma with $\varepsilon=\frac{\gamma}{2M}$ and $\delta=\delta'$ to find $n_0$. Let us check that this choice of $n_0$ indeed works. Denote $I^{\star}=[0,1]\setminus((0,x-\delta)\cup(x+\delta,1))$. Choose $n\ge n_0$. Consider the integral in $(5)$.
       Partition it with respect to $I^{\star}$
          \begin{equation} \label{eq3}
       \begin{split}
                                               & \int_{0}^{1}g_n(s)|f_Z(s)-f_Z(x)|\mathrm{d}s =\int_{I^{\star}}g_n(s)|f_Z(s)-f_Z(x)|\mathrm{d}s+\\ &\int_{x-\delta}^{x+\delta}g_n(s)|f_Z(s)-f_Z(x)|\mathrm{d}s
                                                \end{split}
                                                 \end{equation}
     For the first summand we get $$\int_{I^{\star}}g_n(s)|f_Z(s)-f_Z(x)|\mathrm{d}s< (1-2\delta)\varepsilon M<\frac{\gamma}{2M}M=\frac{\gamma}{2}$$    since in $I^{\star}$ $g_n(s)<\varepsilon$
     For the second summand apply mean value theorem for definite integrals $$\int_{x-\delta}^{x+\delta}g_n(s)|f_Z(s)-f_Z(x)|\mathrm{d}=|f_Z(\xi)-f_Z(x)|\int_{x-\delta}^{x+\delta}g_n(s)\mathrm{d}s$$ where $\xi\in[x-\delta,x+\delta]$. And according to the choice of $\delta$ $|f_Z(s)-f_Z(x)|<\frac{\gamma}{2}$ in that interval. On the other hand $$\int_{x-\delta}^{x+\delta}g_n(s)\mathrm{d}s<\int_{0}^{1}g_n(s)\mathrm{d}s=1$$ Thus the second summand is also less than $\frac{\gamma}{2}$. Hence $D_n<\gamma$.

         Comment.

          In essence we prove that if we define Borel measure on $[0,1]$ as $$\mu_{n,x}([0,u])=\int_{0}^{u}(n+1)\binom{n}{\left \lfloor{(n+1)x}\right \rfloor}s^{\left \lfloor{(n+1)x}\right \rfloor}(1-s)^{n-\left \lfloor{(n+1)x}\right \rfloor}\mathrm{d}s$$
          then $\mu_{n,x}\xrightarrow[n \to \infty ]{weakly} \delta_x$, the Dirac measure at the point $x$.
          Defining similar type of measures on $\mathbb{R}^n$, using the same proof we see that they converge towards the Dirac measure at a point in $\mathbb{R}^{n}$.
         
          Regarding the original problem. $f_n$ could be viewed as a density function of a random variable which is in some sense obtained from "norming" $X_n$. Thus, not being absolutely formal, we conclude that $X_n$ converges in distribution to $Z$.
        
          Several questions about possible expansion are immediately visible. Most notably in the sense $\text{weak}\to \text{strong}$ convergence.
          Regarding functions is it true that $$g_n(x)=\int_{0}^{1}f(s)\mathrm{d}\mu_{n,x}$$
          converges uniformly to $f$?
          Regarding measures is it true that $\mu_{n,x}$ converges to $\delta_x$ strongly?
          We proved convergences in the weak sense.
         
          Another possible path of generalization is relaxing the conditions imposed on $f$.

System of power sums in complex numbers

Given $n$ complex numbers $z_1,z_2,\ldots,z_n$ such that $$z_1^k+z_2^k+\cdots +z_n^k=0$$ for all $k\in\mathbb{N}$. Prove that $z_1=z_2=\cdots=z_n=0$.

Solution: Lets call the sum of $k$-th powers $S_k$. Since all $S_k$-s are homogeneous polynomials we know that for any $\lambda\in\mathbb{C}$ the numbers $\lambda z_1,\lambda z_2,\ldots ,\lambda z_n$ will also fulfill these equations and call the corresponding polynomials $S_k(\lambda)$. Choose $\lambda'$, such that $|\lambda' z_i|<1$ for all $i=1,2,\ldots,n$. Now for $\lambda: \ |\lambda|\le |\lambda'|$ examine $$f(\lambda;z_i)=\sum_{k=1}^{\infty}\frac{(\lambda z_i)^k}{k}$$ This is a series for logarithm, so $$S:=\sum_{i=1}^{n}f(\lambda;z_i)=-\sum_{i=1}^{n}\log(1-\lambda z_i)=-\log((1- \lambda z_1)\cdots(1- \lambda z_n))$$
On the other hand $$S=\sum_{i=1}^{n}\sum_{k=1}^{\infty}\frac{(\lambda z_i)^k}{k}=\sum_{k=1}^{\infty}\frac{S_k(\lambda)}{k}=0$$
Thus we have $\log((1-\lambda z_1)\cdots(1-\lambda z_n))=0$ hence $$g(\lambda):=(1-\lambda z_1)\cdots(1-\lambda z_n)=1$$ for all $\lambda$ within a small disc around zero. This means that all coefficients of $g$ apart from the constant term are $0$. And these coefficients are exactly the elementary symmetric polynomials (in reverse order) of $z_1,z_2,\ldots,z_n$. So all of them are zeros - $z_1=z_2=\cdots=z_n=0$.

solved добавяме най-малката ненулева цифра

Дадена е редица, на която първият член е $1$, а всеки следващ се получава като към предишния се добави най-малката му ненулева цифра. Да се определи колко цифри има числото на позиция $9\cdot 1000^{1000}$

solved

Let $$x*y=\frac{x + y}{1 + xy}$$

Evaluate $$(\cdots(2*3)*4)*\cdots*2018)$$

A solution with polynomials is not difficult to find.
Insightful solution with hyperbolic functions also available, thans to Zamkovoy, Bozhilov.
Нека $X$ и $Y$ са независими стандартно нормално разпределени случайни величини. Да се пресметне $\text{E}(X|X>Y)$
Решение. Да означим с $F$ и $f$ функциите съответно на разпределение и на плътност на стандартното нормално разпределение (съответно на величините $X$ и $Y$). Нека $Z=X|_{X>Y}$. Така търсим $\text{E}(Z)$. За целта да пресметнем функцията на разпределение $F_Z$ и функцията на плътност $f_Z$. $F_Z(z)=\text{P}(Z<z)=\operatorname{P}(X<z|X>Y)=\frac{\text{P}(X<z \bigcap X>Y)}{P(X>Y)}$. Заради симетрия $\text{P}(X>Y)=\text{P}(Y>X)\Rightarrow \text{P}(X>Y)=\frac{1}{2}$. Ще пресметнем
$\text{P}(X<z \bigcap X>Y)$ чрез формулата за пълна вероятност. Зaбелязваме, че
$$\text{P}(X<z \bigcap X>Y|X=s)=\begin{cases} 0, & s>z \\ \text{P}(Y<s), & s\le z \end{cases}$$ Тогава
$$\text{P}(X<z \bigcap X>Y)=\int_{-\infty}^{\infty}\text{P}(X<z \bigcap X>Y|X=s)f(s)\mathrm{d}s=\int_{-\infty}^{z}F(s)f(s)\mathrm{d}s$$ Така $$F_Z(z)=2\int_{-\infty}^{z}F(s)f(s)\mathrm{d}s$$
За функцията на плътност получаваме $f_Z(z)=2F(z)f(z)$.
Така трябва да пресметнем $$I=\int_{-\infty}^{\infty}zf_Z(z)\mathrm{d}z=2\int_{-\infty}^{\infty}zF(z)f(z)\mathrm{d}z=2\int_{-\infty}^{\infty}zf(z)\int_{-\infty}^{z}f(s)\mathrm{d}s\mathrm{d}z=\\=2\int_{-\infty}^{\infty}\int_{-\infty}^{z}zf(z)f(s)\mathrm{d}s\mathrm{d}z$$
Сега сменяме реда на интегриране $$I/2=\int_{-\infty}^{\infty}\int_{-\infty}^{z}zf(z)f(s)\mathrm{d}s\mathrm{d}z=\int_{-\infty}^{\infty}f(s)\int_{s}^{\infty}zf(z)\mathrm{d}z\mathrm{d}s$$
За вътрешния интеграл намираме
$$\int_{s}^{\infty}zf(z)\mathrm{d}z=\frac{1}{\sqrt{2\pi}}\int_{s}^{\infty}zе^{-\frac{z^2}{2}}\mathrm{d}z=\frac{1}{\sqrt{2\pi}}\int_{s}^{\infty}е^{-\frac{z^2}{2}}\mathrm{d}\frac{z^2}{2}=\frac{1}{\sqrt{2\pi}}\left(-e^{-\frac{z^2}{2}}\right)\Bigg|_{z=s}^{\infty}=f(s)$$
Тогава $$I=2\int_{-\infty}^{\infty}f(s)^2\mathrm{d}s=\frac{1}{\pi}\int_{-\infty}^{\infty}e^{-z^2}\mathrm{d}z=\frac{1}{\sqrt{\pi}}$$

Property of join

 Let $X$ be path-connected and $Y$ be arbitrary topological space. Then the join $X*Y$ is simply connected.   $\textbf{Proof}.$ We use Van K...