Please see the below link for the complete description. I already have an answer shown in the link, based on many Excel simulations ($n=4$ to $100$, $x_i$ generated by RAND() function of Excel). I want to know if the answer $\frac{1}{n^2}\left(1+\frac{1}{\pi}\right)$ has a theoretical basis. If no, how to derive as a function of $n$? Thanks.


(Added by David Roberts) The file says: $$ E\left[\left(\frac{x_1}{\sum_{i=1}^n x_i}\right)^2\right] = \frac{1}{n^2}\left(1+\frac{1}{\pi} \right) $$ where $x_i \sim U(0,1)$.

  • 3
    $\begingroup$ I removed an irrelevant tag. As this question stands, it's not really a good fit for this site. Partly because it isn't self-contained (this is a StackExchange thing, not MO per se) and the Google Drive link will eventually rot. But secondly, if the question were cleaned up and made self-contained, it might be better at stats.stackechange.com $\endgroup$ – David Roberts Aug 5 at 12:40
  • $\begingroup$ Please note that this is a very challenging problem, and MO may be a better place for this. I am not sure how to write equations thats why the google drive, but that link will remain forever. $\endgroup$ – Murali Aug 5 at 13:23
  • 2
    $\begingroup$ Just because it is challenging, doesn't mean that a statistics-specific forum is not a better place to ask this. I have edited the question to be self-contained and include your hypothesised formula. $\endgroup$ – David Roberts Aug 5 at 13:41
  • $\begingroup$ Thanks David, how do I write equations like you did? Is there a tool? $\endgroup$ – Murali Aug 5 at 13:46
  • $\begingroup$ how do you explain $n=1$? Is this meant to be asymptotic? $\endgroup$ – lcv Aug 5 at 14:49

Your conjecture is obviously false for $n=1$, and I think it is false for any $n$. Using the Irwin-Hall formula, one can write an explicit but very complicated expression for the expectation in question, and that expression will not involve $\pi$.

Also, the conjecture is false for all large enough $n$. More specifically, letting $$ m_n:=Er_n^2,\quad r_n:=\frac{nx_1}{\sum_{i=1}^n x_i}=\frac{x_1}{\bar x_n},\quad \bar x_n:=\frac1n\,\sum_{i=1}^n x_i, $$ we have $$ \lim\inf_n n^2 E\Big(\frac{x_1}{\sum_{i=1}^n x_i}\Big)^2=\lim\inf_n m_n\ge\frac43>1+\frac1\pi. \tag{1} $$ Indeed, by the strong law of large numbers, $\bar x_n\to Ex_1=\frac12$ almost surely (a.s.) and hence $r_n\to2x_1$ a.s. Also, $Ex_1^2=\frac13$. So, by the Fatou lemma, $$\lim\inf_n m_n=\lim\inf_n Er_n^2\ge E(2x_1)^2=4Ex_1^2=4/3, $$ so that the first inequality in (1) follows.

Working a bit harder, we can show that actually $m_n\to\frac43$, that is, $$ E\Big(\frac{x_1}{\sum_{i=1}^n x_i}\Big)^2\sim\frac4{3n^2}. \tag{2} $$ Indeed, by Hoeffding's inequality for sums of independent bounded random variables, we have $P(\bar x_n<1/4)\le e^{-n/8}$. Also, obviously $0\le r_n\le n$. So,
$$Er_n^21_{\bar x_n<1/4}\le n^2P(\bar x_n<1/4)\le n^2e^{-n/8}\to0. $$ On the other hand, $r_n^21_{\bar x_n\ge1/4}\le1/(1/4)^2<\infty$ and $r_n^21_{\bar x_n\ge1/4}\to4x_1^2$ a.s., again by the strong law of large numbers. So, by dominated convergence, $$Er_n^21_{\bar x_n\ge1/4}\to4Ex_1^2=\frac43. $$ Thus, $$m_n=Er_n^2=Er_n^21_{\bar x_n<1/4}+Er_n^21_{\bar x_n\ge1/4}\to0+\frac43=\frac43, $$ as claimed. That is, we have (2).

  • $\begingroup$ I tried for n=4, 10, 18, 100. My conjecture is true. As an example, please see the calculation for n=4 in the Excel file in the below link. $\endgroup$ – Murali Aug 5 at 17:30
  • 1
    $\begingroup$ For $n=4$, an exact integration gives $\frac{1}{2} - 22 \ln(2) + \frac{27}{2} \ln(3)$. This is not the same as $\frac{1}{16} \left(1 + \frac{1}{\pi}\right)$. $\endgroup$ – Robert Israel Aug 5 at 18:31
  • 2
    $\begingroup$ Excel is definitely not the appropriate tool for such simulations. You can use almost any programming language. For n = 4 I got the following values after 7 seconds with the following simple program in python: import numpy as np from math import log x = np.random.rand(100000000) y = np.random.rand(100000000) u = np.random.rand(100000000) v = np.random.rand(100000000) s = x+y+u+v values = (x/s)**2 print(values.mean()) print(0.5-22*log(2)+27/2*log(3)) 0.08202720113495676 0.08202792470068587 In particular this confirms the Robert Israel value. $\endgroup$ – Dieter Kadelka Aug 5 at 21:10
  • 1
    $\begingroup$ @Murali: Excel certainly does not generate random numbers. What it does is produce a deterministic sequence of pseudorandom numbers, which hopefully approximates some properties of truly random numbers -- which latter cannot actually be obtained by any physical processes, because (say) a sequence of iid random variables is pure abstraction. The proper way to deal with such abstractions is by means of mathematical proof. In this, simulations may be useful only as suggestions for a proof. $\endgroup$ – Iosif Pinelis Aug 7 at 11:22
  • 1
    $\begingroup$ Previous comment continued: Also, even if you had a realization of a sequence of truly random numbers, still, because of random fluctuations, you would not be able to reach the kind of conclusion you desire here by any calculations involving any finite subsequence of such random numbers. $\endgroup$ – Iosif Pinelis Aug 7 at 11:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.