-1
$\begingroup$

Part 1

I wish to show that:

$$E(X)=E[(X|Y=y1)*Pr(Y=y1)+(X|Y=y2)*Pr(Y=y2)]$$

where the random variable Y can take 2 possible values.

As many comments and answers have suggested, this may be technically confusing and ill posed, so as an extension I am posting the motivation for writing something like this:

Suppose I want to calculate $E(S(T))$ Where $S(T)$ represents the stock price at time T. However, it so happens that $T$ is also a random variable, so I want to be able to write this as:

$$E[S(T1)*1(T=T1)+S(T2)*1(T=T2)]$$

Note that $S(T1)$ and $S(T2)$ are still random and are stock prices in the future.

$\endgroup$
9
  • $\begingroup$ Thank you. Edited, to the extent it makes sense to me :) $\endgroup$
    – Arshdeep
    Commented Jul 3, 2020 at 21:38
  • $\begingroup$ There is only one whole expectation on the RHS. I've tried to clarify the idea of what I'm meaning to do in the 2nd part of the post which I just wrote. $\endgroup$
    – Arshdeep
    Commented Jul 3, 2020 at 21:44
  • 1
    $\begingroup$ Yikes... why did the post change so much since you first wrote it? Makes it hard to understand where you're confused and makes the answers seem completely unrelated to what you're asking :(... In the future, make a separate post asking that new question, and I'd honestly suggest you revert back before others start answering this new question/it gets flagged. $\endgroup$
    – doubled
    Commented Jul 3, 2020 at 21:48
  • $\begingroup$ I am familiar with the law of total expectation. Actually, if the latter part of the question makes sense, let me just get rid of the first part. You're right, on the other comment, my statistics knowledge is quite informal. $\endgroup$
    – Arshdeep
    Commented Jul 3, 2020 at 21:49
  • 1
    $\begingroup$ Sorry about that, I suppose I am not clear on what I'm asking and my concepts are regrettably hollow. I will in the future make a separate post, thank you for your comment. The question now reflects exactly what I wish to know, FWIW. $\endgroup$
    – Arshdeep
    Commented Jul 3, 2020 at 21:51

2 Answers 2

1
$\begingroup$

I think I disagree with @gunes answer: $X|Y=y$ can be notation used to denote the random variable $X$ conditional on $Y=y$, and although it may not necessarily exist, it does in certain scenarios and has accordingly been used as notation (see notation in the example of the wiki page for conditional continuous distributions).

To answer your question, I will assume that $Y$ is a discrete RV, so that $\mathbb{1}[Y=y]$ makes sense (else it has measure zero and $X|Y=y$ may not be defined or may not make sense). Then $W=\mathbb{1}[Y=y]$ is the rv that is $1$ with probability $p = P(Y=y)$, and $0$ with probability $1-p$.

Independence is defined as $f_{X,Y} = f_Xf_Y$ assuming densities exist (let's assume so). In our case, let $Z = (X|Y=y)$. Then $$f_{Z,W}(z,w) = P(W=w|Z=z)f_{Z}(z) = f_{W}f_{Z} \iff P(W=w|Z=z) = f_W(w)$$

Recalling our notation, we have

$$P(W=w|Z=z) = P(\mathbb{1}[Y=y] = w | (X|Y=y))$$

If $w=1$, we have $P(Y=y | X|Y=y)$. Then clearly if $X=Y$, we have that $$P(Y=y|Y|Y=y) = P(Y=y|Y=y) = 1 \neq P(Y=y) = P(W=1) = p$$

so no, they are not independent, and you can come up with other examples where this also fails.

EDIT

Given your massive edits, I believe you are asking about the property that for an event $B$, $E[Y|B] = E[Y\mathbb{1}[B]]/P(B)$. Suppose that $T$ is either year 1 or year 2 respectively. Then

$$E[S] = E[S*\mathbb{1}[T = 1]] + E[S*\mathbb{1}[T = 2]]$$

It's unclear what $S(T)$ means, hence why we typically don't use that notation with random variables, and precisely introduce random variables defined as conditional on others, ie S|T. If you want to assume that $T$ only affects $S$ through some function $S(t)$, then you can do what you wrote in your question.

$\endgroup$
4
  • $\begingroup$ Given $Y=y$, $X$ has a density, but this doesn't mean that we can define a RV $Z=X|Y=y$ Similar confusions are discussed in the following posts: math.stackexchange.com/questions/612468/… math.stackexchange.com/questions/711890/… $\endgroup$
    – gunes
    Commented Jul 3, 2020 at 22:11
  • $\begingroup$ I made sure to state that I'm taking $Y$ to be discrete but will further emphasize at start of my post! The second comment of the post linked in the above comment explains it nicely: "If {Y=y} doesn't have measure zero and can therefore be re-scaled into a probability space, you're just talking about the restriction of X to that space, which is a random variable whose density is the conditional density." $\endgroup$
    – doubled
    Commented Jul 3, 2020 at 22:14
  • $\begingroup$ Did you mean to write $E[S]=E[S1[T=1]]+E[S2[T=2]]$? $\endgroup$
    – Arshdeep
    Commented Jul 3, 2020 at 22:24
  • $\begingroup$ @ArshdeepSinghDuggal no I meant that, but added a * sign to make clear what we are doing. I left $S$ as is... depending on $S$, you could write $S(T_1)$ and $S(T_2)$ but you can't remove the indicator function. $\endgroup$
    – doubled
    Commented Jul 4, 2020 at 17:13
1
$\begingroup$

X|Y=y is the random variable X when conditioned on the realization of Y=y.

$X|Y=y$ is a notation used inside expressions such as probability, expected value, variance etc. It is not a random variable.

My intuition very strongly agrees, whether Y is y or not should have nothing to do with what I draw from X when I condition on Y=y. However I am not able to formalize it.

When you condition on $Y=y$, you sample from $p_{X|Y}(x|y)$, so you already acknowledged that $Y=y$.

$\endgroup$
2
  • $\begingroup$ 1. That's a bit confusing, because what you're saying is not a random variable has a distribution attached to it - then what is the conditional distribution supposed to represent? 2. I will edit my question to reflect this fact. $\endgroup$
    – Arshdeep
    Commented Jul 3, 2020 at 21:23
  • $\begingroup$ Just edited the question. Is this better defined? $\endgroup$
    – Arshdeep
    Commented Jul 3, 2020 at 21:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.