Interpretation of event indicator function and conditional expectation

conditional-expectationexpected valuegeometric-probabilityprobability

Let's have a unit square with a line $ y = a, a \in [0,1] $ the value does not matter, it just spans the entire square. I am generating a disc of radius $ r $ random coordinates $ (x,y) $ in this square. The probability $ P(A) $ of the event $ A $ "the line intersect the disc" is $$ P(A) = 2r / 1 = 2r $$ Then let $ C $ denote the random variable equal to the length of the intersecting chord. The length of a chord given its distance to the center $ d $ is $$ l = 2 \sqrt{r^2 – d^2} $$
Let R denote the value
$$ R = \frac{1}{2r} \int_{y-r}^{y+r} 2 \sqrt{r^2 – d^2} dd $$
[y-r, y+r] is the interval in which the chord is not null. And the integral is actually equal to the disc area $ \pi r^2 $. My intuition (and some numerical experiments) tells me that $ R $ is the conditional expectation of the length of the chord if the line actually intersects the disc. So either $ E(C | A) $ or $ E(C | 1_A) $. And this is where I have a difficulty. If we look at the law of total expectation in this case we have

$$ E(C) = E(C | A) P(A) + E(C | \neg A) (1-P(A)) $$

and as $ E(C | \neg A) = 0$, we have

$$ E(C) = E(C | A) P(A) $$

but similarly with the indicator function $1_A$
$$ E(C) = E(C | 1_A = 1) P(1_A = 1) $$

But if we look at the development in the third answer of this post Expected Value of the product of an indicator R.V. and continuous R.V. , we see that $$ E(C \mid 1_A=1) = \frac{1}{P(1_A=1)}E(C \mid A)$$ which seems to create a contradiction with the two total expectations.

I am sure I am misinterpreting something, could someone indicate me what ? Maybe the qualitative difference between $ E(C \mid 1_A=1) $ and $ E(C \mid A) $ and how it maps to my intuition for R.

Best Answer

I am sure I am misinterpreting something, could someone indicate me what ?

No, your confusion is because that answer has some errors.

Firstly $A$ is neither an event nor a random variable, so you cannot condition on it alone.  It is the domain for $Y$ where $X=1$.  (So the events $X=1$ and $Y\in A$ are identical).

Secondly, the integration over the domain of $A$ is not a conditional expectation.

$$\int_A y~f_Y(y)~\mathrm d y=\mathsf E(Y;Y\in A) = \mathsf E(Y\mathbf 1_{Y\in A})$$


In short, that answer should be showing that: $$\mathsf E(Y\mid X=1)=\mathsf E(Y~\mathbf 1_{X=1})/\mathsf P(X=1)$$

Related Question