# Is it possible for a multinomial sample to be a single number?

I'm reading the Latent Dirichlet Allocation paper trying to understand it. However I got stuck at the very first part! When they sampled from a multinomial distribution and considered the result to be a single number! My understanding if the multinomial distribution is to return a vector where the number of its elements are the same as the number of probability vector parameter plugged into the multinomial.

I'm not sure if I misunderstood the notation.

Here is the link to the paper $\text{(page$4$)}$: http://www.cs.princeton.edu/~blei/papers/BleiNgJordan2003.pdf

$\mathbf 3$. Latent Dirichlet allocation

Latent Dirichlet allocation (LDA) is a generative probabilistic model of a corpus. The basic idea is that documents are represented as random mixtures over latent topics, where each topic is characterized by a distribution over words.$^1$
$\quad$LDA assume the following generative process for each document $\mathbf w$ in a corpus $D$:

1. Choose $N\sim\operatorname{Poisson}(\xi)$.

2. Choose $\theta\sim\operatorname{Dir}(\alpha).$

3. For each of the $N$ words $w_n$:

• $\text a.$ Choose a topic $z_n\sim\operatorname{Multinomial}(\theta)$.
• $\text b.$ Choose a word $w_n$ from $p(w_n|z_n,\beta)$, a multinomial probability conditioned on the topic $z_n$.

That said, from what I can tell from the paper, "words" and "topics" are vectors, not scalars. A "word" consists of a $(0,1)$-valued vector. The length of the vector is the size of the set of all words. While it is not explicitly described in the paper, a "topic" is implied to be a vector, whose length is the same as that for words. I think a topic can be regarded as a collection of words; i.e., it is a vector for which more than one position can be equal to $1$ (unlike a word, for which exactly one position is $1$ and the others are all $0$).