I have been struggling with this problem for quite some time but I am not sure how to proceed.
So I am given a sampling algorithm : We would like to uniformly sample points on a line between A and B. Start with sampling $x,y$ from $U([0,1])$ (a uniform distribution),then the point $P = \frac{xA + yB}{x+y}$.
For the sake of simplicity I let A=0 and B=1 and generated some results in R to see if the points are uniformly sampled, but they are not. So I would like to understand why this sampling algorithm does not yield uniform samples.
Some Work I have done: I tried looking into some prior questions but I could not find a match. I think finding the cdf and showing its not a straight line (like the one for uniform distribution) would suffice to show that the algorithm does not yield uniform sampling, however I am struggling to find such CDF. Any help would be appreciated.
Without loss of generality $A=0$ and $B=1$. We have to verify that $Q=X/(X+Y)$ is not uniform. To this end, we compute $\Pr(X<Yr|Y=y)=1$ if $yr>1$ and $\Pr(X<Yr|Y=y)=yr$ if $yr<1$ which implies $\Pr(X<Yr)=\int_0^1yrdy=\frac{r}{2}$ if $r<1$ and $\Pr(X<Yr)=\int_{1/r}^1dy+\int_0^{1/r}yrdy=1-\frac{1}{2r}$ if $r>1.$
This leads for $0<q<1$ to $F(q)=\Pr(X/(X+Y)<q)=\Pr(X/Y\leq q/(1-q) )$ which is
$F(q)=\frac{q}{2(1-q)}$ and $F'(q)=\frac{1}{2(1-q)^2}$ if $0<q<1/2$,
and also $F(q)=\frac{2q-1}{q}$ and $F'(q)=\frac{1}{2q^2}$ if $1/2<q<1.$