First thanks for any help editing my text.
If a random variable $X$ has a geometric distribution with parameter $P$ where $P$ itself is a random variable and uniformly distributed from $0$ to $1-1/n$, I want to find $E[X]$.
I first learned that $E[X|P] = 1/P$, using the expectation of the geometric distribution.
But when it comes to $E[X]=E[E[X|P]]$, I tried integration and it seems to be
(integral from $0$ to $(n-1)/n$) , $(1/p)$ * $(n/(n-1))$ $dp$
but isn't the value infinite?