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).

Must I instead write

$$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.

  • 5
    $\begingroup$ No, $P(A)$ has sense only if $A$ is an event. For r.v., you must write $P\{A\in \mathcal A\}$ $\endgroup$
    – Surb
    Jul 14, 2018 at 15:15
  • 1
    $\begingroup$ Actually, as $X$ is already the random variable, $P(X)$ is hardly a shorthand for a random variable $\endgroup$ Jul 14, 2018 at 15:16
  • 1
    $\begingroup$ If you defined a function $p(x)$ like $p(x)=P(X=x)$ then $p(X)$ would be meaningful. $\endgroup$
    – zoli
    Jul 15, 2018 at 6:06
  • $\begingroup$ 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. $\endgroup$
    – Kevin Li
    Jul 26, 2018 at 15:12
  • $\begingroup$ @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. $\endgroup$ Apr 2, 2019 at 23:38

1 Answer 1


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

The expansions can get cumbersome, so reducing clutter is quite useful.   It becomes easier to follow the logic, and reducing typesetting reduces typographical erorrs.

So long as it is clear what the abbreviation represents, you may use it.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .