# Correct notation for the probability of a discrete random variable

Assume a random variable $X$ for a coin toss experiment. The sample space (i.e. possible outcomes) is in this case $\Omega = \{ \text{heads}, \text{tails}\}$.

The randon variable $X$ is a function that maps events (a particular outcome) $\omega$, which in this case is not measurable, to a measurable space, like so:

$X(\omega )={\begin{cases}1,&{\text{if}}\ \ \omega ={\text{heads}},\\0,&{\text{if}}\ \ \omega ={\text{tails}}.\end{cases}}$

If I want to talk about the probability of $X$ taking certain value, I know I can write as follows (please correct me if I'm wrong, this is relatively new to me). For example, lets talk about the probability of tossing a head $\{\omega :X(\omega )=1\}$:

• $P(X(\text{heads}))$, edit after comments: this one is also wrong
• $P(X=1)$
• $P(\text{heads})$, although this no longer talks about the random variable.

But, is it correct to write any of the following?:

• $P(X=\text{heads})$
• $P(x=\text{heads})$, where small $x$ is a particular realization of $X$.

Edit 2017.05.25

I am looking for a more convenient notation that enables the reader to immediately see we are talking about "heads", as "1" by itself does not carry this meaning.

• Thank you Björn for correcting the missing \text{} – andresgongora May 25 '17 at 11:05
• $X$ is real-valued quantity while $\omega=\text{head}$ is a possible outcome/event. So both should not be equivalent. – Mythomorphic May 25 '17 at 11:17
• The only meaningful expression from the above 5 is $P(X=1)$; $P(heads)$ is unrelated to r.v., others incorrect. – kludg May 25 '17 at 11:23
• The only correct expression so far is $P(X=1)$, which stands for $P(\{\omega\in\Omega\mid X(\omega)=1\})$. One could also use $P(\{\mathrm{heads}\})$. – Did May 25 '17 at 11:34
• $\{heads\}$ is an event, that is a subset of the sample space, $heads$ is a sample, that is an element of the sample space. A subset consisting of a single element and the element are mathematically different objects. Strictly speaking, the probabilities apply to subsets, so $P(\{heads\})$ is strictly correct, but $P(heads)$ is also used as a shorthand notation. – kludg May 25 '17 at 12:35

$\mathsf P(X=1)$ is acceptable notation for $\mathsf P(\{\omega\in\Omega: X(\omega)=1\})$, the probability for the event that $1$ is the value of the $X$ function for the outcome.   Because we are very lazy and would rather not write the whole thing out every time, we except the shorthand representation of the event.

Technically we could write it as $\mathsf P(X^{-1}\{1\})$ , though more often we'll write this as $\mathsf P_X(1)$ or $p_{\lower{0.5ex}X}(1)$ ; a probability mass function.

This is, of course, equal to $\mathsf P(\{\text{heads}\})$, or $\mathsf P(\text{heads})$.

$$X^{-1}\{1\} ~{:=~ \{\omega\in\Omega: X(\omega)=1\} \\[2ex]=~ \{\text{heads}\}}$$

It is not at all correct to write $\mathsf P(X=\text{heads})$ or $\mathsf P(X(\text{heads}))$.   $X=\text{heads}$ is an invalid type comparison.   $X(\text{heads})$ equals $1$, which is not an outcome of the probability space.

• Thank you. Then, is there any way to talk about the $P(\text{heads})$ in the context of the associated r.v.? Would it even make sense to try to do so? – andresgongora May 25 '17 at 12:07
• @andresgongora As explained above $\{\text{heads}\}=\{\omega\in\Omega\mid X(\omega)=1\}$ so that $P(\{\text{heads}\})=P(\{X=1\})$ or abbreviated $P(\text{heads})=P(X=1)$. – drhab May 25 '17 at 15:08