# Sum of random number of random variables

Consider a sequence of independent and identically distributed random variables $X_1, X_2, \ldots$ such that $$\mathbb P(X_i\geqslant k)=\prod_{\ell=1}^{k-2}\frac{n-\ell}n \ \textrm{ for every } 2\leqslant k\leqslant n+1.$$

Consider also $$Z= \sum_{i=1}^Y X_i ,$$

where $Y$ follows a geometric distribution with success probability $1/n$.

What is the mean and variance of $Z$ and is it possible to calculate its full distribution? I am particularly interested in what happens for large $n$.

-

2
If $Y,X_1,X_2,\ldots$ are independent, then $E(Z)$ is just equal to $E(Y)E(X)$. Otherwise, you need to specify how $Y,X_1,X_2,\ldots$ are related to each other. – user1551 Dec 29 '12 at 8:39
Thanks. I should have added variance explicitly and not have it hidden in the full distribution part. Fixed. – user54551 Dec 29 '12 at 9:20
But you haven't answer the key question: are $Y,X_1,X_2,\ldots$ independent? – user1551 Dec 29 '12 at 9:22
Sorry. Yes they are. – user54551 Dec 29 '12 at 9:25
I have edited that bit of information into your question. See if I understand you correctly. If not, feel free to roll back. – user1551 Dec 29 '12 at 9:35

## 1 Answer

To elaborate on @user1551 comment, under independence, you could use the law of iterated expectations to derive what you need. First, the conditional expectation of $Z$ on fixing $Y=y$ is \begin{eqnarray*} E \left[ Z|Y = y \right] & = & E \left[ \sum_{i = 1}^y X_i \right]\\ & = & yE \left[ X_i \right] \end{eqnarray*} This allows to compute $E[Z]$ \begin{eqnarray*} E \left[ Z \right] & = & E_Y \left[ E \left[ Z|Y = y \right] \right]\\ & = & E_Y \left[ yE \left[ X_i \right] \right]\\ & = & E \left[ Y \right] E \left[ X_i \right] \end{eqnarray*}

For the variance of $Z$, you could exploit formulas for conditional variances (such as here).

You could apply a similar argument in order to derive the cumulative distribution of $Z$. \begin{eqnarray*} \Pr \left[ Z \leqslant z \right] & = & E_Y \left[ \Pr \left[ Z \leqslant z|y \right] \right] \end{eqnarray*}

-

@lip1 Sorry, there were two terms missing from the formula. – Learner Jan 1 at 2:26
{"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 15, "mathjax_display_tex": 2, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "github"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "english_confidence": 0.8348373174667358, "perplexity_flag": "middle"}