# Probability of two ways of picking an item from a set in a set of sets.

There are so many questions on probability that there's a low probability of me finding a duplicate in the list, if there even is one.

And I can't figure out a good title, so feel free to edit!

Situation: There is a set of sets, and their sizes are different.  For example, a library is a set of books, and each book is a set of pages, but the number of pages varies. Here are two ways to pick a page at random:

• Construct a set of all pages, i.e., of tuples containing all possible (book,page), and then a random pick from there.
• Randomly pick a book, then randomly pick one of its pages.

Does every page in the library have the same probability of being chosen in both scenarios? Or does the second give pages in shorter books a greater probability? (Intuitively, the latter seems likely to me, but intuition is often wrong.)

• It seems contradictory that you say "the number of pages is the same" but then speculate that "shorter books have greater probability". If the number of pages is the same, aren't all books of equal length? Or am I misinterpreting? – spaceisdarkgreen Feb 1 '18 at 4:24
• I answered anyway, pretending you never said 'the number of pages is the same' since other than that your intuition seemed clear (and correct). Let me know if I assumed wrong. – spaceisdarkgreen Feb 1 '18 at 4:30
• Sorry, sloppy typing. Fixed. – WGroleau Feb 1 '18 at 5:35

Think of a simple example where there is one book with two pages and one book with one page. Call pages $a$ and $b$ the pages of the book with two pages and $c$ the page in the book with one page. If you randomly pick a book and then a page then your probability of ending up with $c$ is $1/2,$ whereas if you do it the first way the probability of getting page $c$ must be $1/3.$
Say there are $n$ books with pages $\{k_1, k_2, \cdots, k_n\}$ then probability that a particular page is picked when we have all pages laid out is $$\frac1{\sum k_i}$$ And if you pick the book first and then the page the probablity is $$\frac1n\cdot\frac1{k_i}$$ So we can't really say if either would be greater consider the example of 2 books with $k_1=1$ and $k_2=2$. Page in first book has greater chance to be picked if we do second method and page in book 2 has greater chance to be picked if we use the first method. So which is better depends on number of pages in the book and the total number of pages in all books.