# Correct notation for the probability of an event in entropy

I am looking at the formula of entropy on Wikipedia, where $$P(X)$$ is a probability mass function.

$$$$H(X) = -\sum_{i=1}^{n}P(x_i)log_bP(x_i)$$$$

I got curious why they use capital $$P$$ here because I am used to seeing lower case $$p$$ for the probability of a specific event. So why is $$P$$ used instead of $$p$$? On the page of probability mass function they use other notations too

$$$$p_X(x_i)=P(X=x_i)$$$$

but both of those notations are different from $$P(x_i)$$. Perhaps this is nit-picking but I feel that there is not a lot of leeway when using formulas correctly.

So is the notation in the entropy formula incorrect, or is it another valid alternative? If so, is $$p(x_i)$$ also correct?

• A convention that I ocassionally see (and use myself) is to use upper case P(x) for probabilities and lower case p(x) for densities. Jan 25, 2021 at 15:25

In the entropy page, the formula uses lowercase $$x_i$$ (not uppercase). And, in the beginning of the article it says
Given a discrete random variable X, with possible outcomes $$x_{1},...,x_{n}$$, which occur with probability $${\displaystyle \mathrm {P} (x_{1}),...,\mathrm {P} (x_{n})}$$, the entropy of X is formally defined as:
so, within the context, it is consistent. Instead of writing $$P(X=x_i)$$, it abuses notation and uses $$P(x_i)$$, but first defines it as such.
• You are right, changed the $X$ to $x$. Could you say something about $p(x_i)$? Is that also valid in this context, or does it lack information? I assume it is not as precise as $P(X=x_i)$ because it is not obvious that $x_i$ is an event from the set of $X$? Jan 25, 2021 at 11:35
• If not defined in the context, $p(x_i)$ is ambiguous. For example, the wikipedia article uses $p(x_i,y_j)$ but also defines it just afterwards (see conditional entropy formula). In "efficiency" section, it uses $p(x_i)$ but doesn't define it. it maybe the case that the authors of these sections were different. Jan 25, 2021 at 11:46