Here is a puzzle from textbook : 40 Puzzles and Problems in Probability and Mathematical Statistics
Peter draws n = 100 independent realizations of a continuous rv and ranks them in increasing order from 1 to 100. Subsequently, Paula draws a single value from the same population and inserts this value into the rank order created earlier by Peter. For example, if her value is such that 50 of Peter’s draws are smaller and 50 are larger, then the rank associated with her draw would be 51 — that is, overall, her value would be the 51st in increasing order. Or, if her value is smaller than all 100 of Peter’s, then the rank 1 would be associated with it.
Derive for general n the probability that Paula’s value will occupy rank k, where 1 ≤ k ≤ n + 1.
My solution is as follows : If Paula's value is x, then
Pr(Rank = k| value = x) = $^nC_{(k-1)}[CDF(x)]^{k-1}[1-CDF(x)]^{n-k+1}$
Therefore,
Pr(Rank=k) = $\int$Pr(Rank = k| value = x) $PDF(x) dx$
Pr(Rank=k) = $\int ^nC_{(k-1)}[CDF(x)]^{k-1}[1-CDF(x)]^{n-k+1}PDF(x) dx$
Pr(Rank=k) = $\int_0^1 ~ ^nC_{(k-1)}[C]^{k-1}[1-C]^{n-k+1} dC$
Pr(Rank=k) = $^nC_{(k-1)} B(k,n-k+2)$
Pr(Rank=k) = $^nC_{(k-1)} \frac{(k-1)! (n-k+1)!}{ (n+1)!}$
Pr(Rank=k) = $\frac{n!}{(k-1)! (n-k+1)!} \frac{(k-1)! (n-k+1)!}{ (n+1)!}$
Pr(Rank=k) = $\frac{1}{ n+1}$
Is the logic correct?