Is a data size in a binomial distribution random variable? Supposing that there is a binomial distribution ${\rm Bin}(m|N, \mu)$, I think usually $N$ and $\mu$ are parameters and not random variables (or events), thus the notation here ${\rm Bin}(m|N, \mu)$ seems somewhat misleading.
Here, the binomial distribution ${\rm Bin}(m|N, \mu)$ is
\begin{align*}
{\rm Bin}(m|N, \mu) = \begin{pmatrix} N \\ m\end{pmatrix} \mu^m (1 - \mu)^{N-m}
\end{align*}
in the PRML notation.
My Question:
However, is this notation really misleading? If not, what is the definition of $p(N)$ here?
If we would like to consider the Bayesian inference, we often introduce a beta distributions ${\rm Beta}(\mu | a, b)$ as the conjugate prior distribution of the parameter $\mu$.
Then, the PRML eq. (2.17) says that the posterior distribution of $p$ is given by
\begin{align*}
 p(\mu|m, N, a, b) \propto {\rm Bin}(m|N, \mu) {\rm Beta}(\mu | a, b)
\end{align*}
via the Bayes' theorem and I would like to show it explicitly. The $\propto$ means that if we ignore all factors independent of $\mu$ we obtain this expression.
To show this, at first I assumed $m$ and $a, b$ are conditionally independent given $\mu$ and $N$.Thus
\begin{align*}
p(m|N, \mu) = p(m|N, \mu, a, b) &=  \frac{p(m, N, \mu, a, b)}{p(N, \mu, a, b)} = \frac{p(m, N|\mu, a, b) p(\mu | a, b) p(a, b)}{p(N|\mu) p(\mu | a, b)} \\
&= \frac{p(m, N|\mu, a, b)p(a, b)}{p(N|\mu)}.
\end{align*}
Then we get
\begin{align*}
 p(m|N, \mu) p(\mu | a, b) &= \frac{p(m, N|\mu, a, b)p(a, b)}{p(N | \mu)} \frac{p(\mu, a, b)}{p(a, b)} \\
&= \frac{p(\mu, m, N, a, b)}{p(N|\mu)}\\
&= \frac{p(\mu|m, N, a, b)p(m, N, a, b)}{p(N|\mu)}.
\end{align*}
Obviously, the factor $p(N|\mu)^{-1}$ appears and contradicts the above statement.
Therefore I believe that $N$ (and hyperparameters $a, b$) are parameters, not random variables and thus we don't have to consider probabilities like $p(N)$ or $p(N|\mu)$.
Am I right in my thinking? If so, it would be even more appreciated if you could show the correct normalized expression with parameters separated.

*

*One can well think of situations in which $N$ is random, even with a frequentist interpretation (there may be a sequence of experiments with different $N$ that can be interpreted as varying randomly). For example, a service center may be interested in what percentage of calls they receive is about a certain product. They may collect data from one or several hours over the day. Number of calls in an hour $N$ can be modelled by a Poisson distribution, and the percentage of interest can then be estimated conditionally, but note that the distribution of $N$ may have impact on the sampling distribution of the estimator and, in advance, on data collection planning.


*The use of the term "parameter" doesn't necessarily imply that a quantity is not random (quite obviously not in Bayesian analysis, but neither necessarily in a frequentist approach, where in some situations parameters can be randomly drawn, see above).


*Of course, in the most standard frequentist analyses, parameters are in fact fixed and nonrandom, and many frequentists then would think that writing down distributions using "|"   as if they were conditional on something random is misleading and wrong (unless of course you either do a Bayesian analysis or there is a frequentist mechanism behind the parameter). Personally I think to some extent this is a matter of taste. I see why people think it's wrong, however in many places it can smoothly be used without leading to any trouble. If you want, it offers a hand to the Bayesian who may want to model the parameters as random even if the frequentist thinks they are not.


*Even if you do a Bayesian analysis, in fact you could treat the $N$ as fixed if there is no uncertainty about it (I expect this to happen in the majority of situations, but not in all of them). In other situations (see above) there may be uncertainty about it, and then obviously the $p(N)$ has to be defined expressing this uncertainty appropriately. For example it could be a Poisson in the situation 1 above, potentially with a hyperprior on top for the $\lambda$ parameter of the Poisson. In any case there is no fixed choice for this, it depends on the situation and how uncertainty there plays out.
