# Can Random Variables be written $P(X)$ instead of $P(X=x)$ as a shorthand?

Recently I asked a question and used the shorthand $P(A)$ for a random variable $A$ to quickly reason about conditional probabilities. However, I was informed that this must be written $P(A=a)$ for random variables and the notational shorthand does not make sense, and is only for events. Is this true?

In particular, I am interested in Bayesian Networks and want to write a factorisation such as $$P(A,B,C) = P(A)P(B\mid A)P(C\mid A,B) = P(A)P(B)P(C\mid A,B)$$ to say that the structure of the Bayesian Network is a graph with two root nodes corresponding to $A$ and $B$ which are not dependent on any other random variable and a third node corresponding to $C$ which is dependent on $A$ and $B$ (represented by directed edges).

$$P(A=a,B=b,C=c) = P(A=a)P(B=b\mid A=a)P(C=c\mid A=a,B=b) = P(A=a)P(B=b)P(C=c\mid A=a,B=b)$$

to be mathematically coherent? Would I need to say this is for each $a,b,c$?

Edit: An example I am particularly interested in is on page 3 of this document, or equivalently the wikipedia entry for the chain rule of probability. Is it valid to write the chain rule of probability like this?

Edit: I am particularly confused as so much of the literature of Bayesian Networks seems to use this shorthand, such as this, this, this, this, this, and this.

• No, $P(A)$ has sense only if $A$ is an event. For r.v., you must write $P\{A\in \mathcal A\}$
– Surb
Jul 14, 2018 at 15:15
• Actually, as $X$ is already the random variable, $P(X)$ is hardly a shorthand for a random variable Jul 14, 2018 at 15:16
• If you defined a function $p(x)$ like $p(x)=P(X=x)$ then $p(X)$ would be meaningful.
– zoli
Jul 15, 2018 at 6:06
• Strictly speaking that wouldn't be the case, since your syntax would imply that $p(X) = P(X = X) = 1$ with probability 1. But I agree with the spirit of your statement, which is to be precise and unambiguous. Jul 26, 2018 at 15:12
• @KevinLi How does one reconcile the triviality of $p(X)= P(X=X)=1$ and in the context of computing entropy when one may take $p(x)=P(X=x)$ and compute the average $-\mathbb{E}(\log p(X))$ which puts to use zoli's comment? The expectation is $\sum_i \log(p(x_i)) P(X=x_i)$ and clearly is not the trivial sum of $\sum_i \log(1)\cdot 1=0$. When we consider functions of random variables, PMFs and PDFs are not off-limits as choices for obtaining a new RV $Y=g(X)$ but they must be viewed as mere functions when doing so. Well, I think. Apr 2, 2019 at 23:38

Well, technically, no, $$P(A)$$ is not the same thing as $$P(A=a)$$.   However, however, it is convenient to use a shorthand notation.