This question has arisen from a previous post: Statistical problem: how many books of different widths fit it into a self of a limited certain width?
Let's assume that there are $N$ types of books, and that books of type $i$ have some probability $p_i$ of being selected, and that books of type $i$ have some width $w_i$.
It is clear that if one starts to pick books randomly and store them in the shelf, the number of books fitting in the shelf (M) is a random variable. Moreover, we assume books with replacement: a book of the same width is available again to be picked and stored into the shelf in the next trial.
But, now, I am interested on the random variable which results from the weighted sum of heights of the books stored in the shelf, $H=\sum_{i=1}^M l_i \cdot h_i$, knowing that the height of each stored book $h_i$ is a function of the distance to where the shelf starts.
What have I tried (or at least thought):
- The distance of the nth book stored in the shelf to the first book is given by $w_n=\sum_{i=1}^{n-1} w_i$, which seems to be a random walk process.
- As said before, $H=\sum_{i=1}^N l_i \cdot h_i=\sum_{i=1}^M l_i \cdot h_i(w_i)$. Would it be useful somehow to do: $H=(\sum_{i=1}^M l_i) \cdot \sum_{i=1}^M \frac{l_i}{\sum_{i=1}^M l_i}h_i(w_i)=\sum_{i=1}^M l_i E[h_i]$?
- Assuming that the answer to the previous question is yes (or possibly), can one then compute the following? \begin{equation} E[H]=\sum_{M} prob(M) \cdot E[h_i] \end{equation} for all possible values of $M$, and $prob$ means probability.
- Can one assume, under some conditions, that $H$ is normal distribution (by the central limit), being necessary only to calculate its mean and variance values?