Iv'e seen the use of both upper case and lower case letters for probability functions (e.g. $P$ vs $p$ or $Q$ vs $q$). I used to think these refer to discrete vs. continuous distributions, receptively. But then sometimes it seems that the distinction is between actual probabilities of events, (i.e. the actual scalar value of $P(A)$ or $P(X=x)$) and the functional associated with a random variable (like $p(X)$)
Is there a convention of using upper and lower case letter functions? If so, what is it?