Cambridge Admissions Exam Statistics 1999 


My work:
Since $f$ is the pdf we must have $\int_{0}^{1} Ax\,\mathrm dx=1 \implies A=2$.  Let $Y$ be the number of currants in my portion. We have $Y\sim B(4,x)$. For the expectation
$$E(Y)=4x,$$
however I don't know how to continue. I had a thought of using the expectation for $x$ in this, however, I can't statistically justify it.
For the second part, we require
$$P\left(X\geq\frac{1}{2}\mid Y=4\right)=\frac{P\left(X\geq\frac{1}{2},Y=4\right)}{P(Y=4)}.$$
I am completely stuck on how to approach this. I checked the student room for solutions but they seem to disagree with themselves and with other solutions on other websites. If anybody could help me in understanding this problem, and the technique required for it I would be really thankful.
 A: I do not agree with the previous solution.
The conditional probability is a binomial
$$(Y|X=x)\sim B(4;x)$$
with $E(Y|X=x)=4x$ thus the expectation of Y is
$$E(Y)=E(E(Y|X))=E(4X)=4E(X)=4\cdot\frac{2}{3}=\frac{8}{3}$$
With standard reasoning the joint distribution of $(X,Y)$ is
$$f_{XY}(x,y)=f_X(x)f_{Y|X}(y|x)=2\binom{4}{y}x^{y+1}(1-x)^{4-y}$$
Integrating (easy, using Beta distribution) you get the marginal Y
$$f_Y(y)=\int_0^1 f(x,y)dx=\frac{y+1}{15}$$
where $y=0,1,2,3,4,$
you can check that $E(Y)=\frac{8}{3}$ as calculated before in a different way.
Now having $f(x,y)$ and $f(y)$ you can calculate the conditional probability they request. It results to me
$$P(X\geq 0.5|Y=4)=\frac{\int_{1/2}^{1}2x^5dx}{\frac{5}{15}}=\frac{63}{64}$$
A: I agree with @tommik.
Since $E(X)=\int_0^12x^2dx=\tfrac23$, the answer to (i) is $\tfrac234=\tfrac83$.
For (ii) let $Y$ denote the number of currants in the portion so $Y|X=x\sim B(4,\,x)$, and $P(Y=4|X=x)=x^4$. Since $P(X\le\tfrac12)=\int_0^{1/2}2xdx=\tfrac14$, the restriction $X>\tfrac12$ has PDF $\tfrac83x$. Hence$$P(X>\tfrac12|Y=4)=\frac{P(Y=4|X>\tfrac12)P(X>\tfrac12)}{P(Y=4)}=\frac{\int_{1/2}^1\tfrac34x^4\tfrac83xdx}{\int_0^12x^5dx}=\frac{[x^6]_{1/2}^1}{[x^6]_0^1}=\frac{63}{64}.$$This slow code agrees to within experimental error, finding $632$ of $640$ random cases with $Y=4$ satisfy $X>\tfrac12$.
A: Simulated version for ten million cakes, agreeing with Answers of @tommik (+1) and @J.G. (+1). This simulation should be adequate for three
decimal places of accuracy.
The original proportion $p \sim \mathsf{Beta}(2,1).$
Notice that its mean is $2/3.$
set.seed(2021)
p = rbeta(10^7, 2, 1)
summary(p)
     Min.   1st Qu.    Median      Mean   3rd Qu.      Max. 
0.0000918 0.4999540 0.7072202 0.6667052 0.8659839 0.9999999 

Then the number of currents in my portion is $Y \sim \mathsf{Binom}(4, p),$ averaging $8/3.$
 y = rbinom(10^7, 4, p)
 mean(y)
[1] 2.666702  # aprx 8/3
8/3
[1] 2.666667

Finally, conditional on getting all four currents, the
probability that my portion was more than half is
consistent with $63/64:$
p.4 = p[y == 4]
mean(p.4 > .5)
[1] 0.9843074  # aprx 63/64
63/64
[1] 0.984375

A: The probability that a currant is in proportion x is x.  Probability all 4 are in that portion is x^4.  Integral of this is x^5/5.
So the integral with limits 0.5 to 1 is the probability of getting all 4 if the proportion is greater than 0.5 which is 1/5 - 1/160 = 31/160.  The probability of getting all 4 no matter what proportion was taken is the same integral from 0 to 1 = 1/5.  It's a conditional probability question (not using the Ax distribution).  The answer is then 31/160 divided by 1/5 = 31/32.
