Solving problem when the probability given itself is a random variable Two scientists are conducting an experiement each, exactly once. Inducator X denotes the success of the experiment of the first scientist and Y is the same indicator for the other. The probability of a success is Z , where Z is a continous random variable distributed uniformly in [0,1]. 1.Find probability that X=1. 2. Are X and Y independent? Having a hard time with this one, thanks in advance!
 A: As said in comment we can find $\mathsf P(X=1)=\mathsf P(Y=1)$ by means of:$$\mathsf P(X=1)=\mathsf EX=\mathsf E[\mathsf E[X\mid Z]]=\mathsf EZ=0.5$$
Likewise we can find $\mathsf P(X=1\wedge Y=1)$ by means of: $$\mathsf P(X=1\wedge Y=1)=\mathsf EXY=\mathsf E[\mathsf E[XY\mid Z]]=\mathsf EZ^2=\int^1_0z^2dz=\frac13$$
So that: $$\mathsf P(X=1\wedge Y=1)=\frac13\neq\frac14=\frac12\frac12=\mathsf P(X=1)\mathsf P(Y=1)$$showing that $X$ and $Y$ are not independent.

For further explanation of equality $\mathsf EX=\mathsf E[\mathsf E[X\mid Z]]$ have a look here.
A: Suppose you have infinitely many coins, with the coin bias (i.e. probability of Heads) uniformly distributed on $[0,1]$. Two scientists randomly choose a coin; the first scientist tosses the coin, and then the second scientist tosses the same coin. Random variable $X$ is equal to $1$ if the first scientist got Heads, $0$ otherwise. Random variable $Y$ is like $X$, only for the second toss (by the second scientist, it does not really matter that the scientist is different).
Now it is getting clear that $X$ and $Y$ are dependent (because the same coin is tossed twice), and $P(X=1)$ is indeed $0.5$:
$$P(X=1)=\int_0^1zdz=\frac{1}{2}$$
