Math 2.0

Probability theory and stochastic processes Special processes Example

Chinese restaurant process

Example

Fix a parameter θ>0\theta > 0. Customers 1,2,3,…1, 2, 3, \ldots enter a restaurant with infinitely many tables, one at a time. Customer 11 sits at a new table. Suppose nn customers are seated, and the occupied tables hold n1,…,nkn_1, \ldots, n_k customers, so n1+⋯+nk=nn_1 + \cdots + n_k = n. Then customer n+1n + 1 sits at the jj-th occupied table with probability nj/(n+θ)n_j / (n + \theta), and at a new table with probability θ/(n+θ)\theta / (n + \theta). These probabilities are nonnegative and sum to (n+θ)/(n+θ)=1(n + \theta)/(n + \theta) = 1. The seating of the first nn customers gives a random partition Πn\Pi_n of {1,…,n}\set{1, \ldots, n}, whose blocks are the tables.

Multiplying the seating probabilities gives, for each partition π\pi of {1,…,n}\set{1, \ldots, n} with kk blocks of sizes n1,…,nkn_1, \ldots, n_k, P(Πn=π)=θk Γ(θ)Γ(θ+n)∏j=1k(nj−1)!,P(\Pi_n = \pi) = \frac{\theta^k \, \Gamma(\theta)}{\Gamma(\theta + n)} \prod_{j=1}^{k} (n_j - 1)!, where Γ\Gamma is the gamma function. To check this, note that the denominators θ,θ+1,…,θ+n−1\theta, \theta + 1, \ldots, \theta + n - 1 multiply to Γ(θ+n)/Γ(θ)\Gamma(\theta + n)/\Gamma(\theta). Each table contributes the factor θ\theta when it is opened, and then the factors 1,2,…,nj−11, 2, \ldots, n_j - 1 from the later customers who join it. The right side depends only on the block sizes, so the law of Πn\Pi_n is invariant under permutations of {1,…,n}\set{1, \ldots, n}. In this sense the random partition is exchangeable.

For n=2n = 2, customers 11 and 22 share a table with probability 1/(1+θ)1/(1 + \theta). The number KnK_n of occupied tables after nn customers has mean E[Kn]=∑i=0n−1θθ+i,E[K_n] = \sum_{i=0}^{n-1} \frac{\theta}{\theta + i}, which grows like θlog⁡n\theta \log n.

Remarks

Let GG follow a Dirichlet process with concentration θ\theta and a base measure without atoms. Given GG, draw X1,X2,…X_1, X_2, \ldots independently from GG, and group the indices ii by equal values XiX_i. The resulting random partition has the law of the Chinese restaurant process with parameter θ\theta. This is why the process is used to sample from Dirichlet process mixture models.

Further reading

  1. Web https://en.wikipedia.org/wiki/Chinese_restaurant_process
About this page
Tag2SEF8QTYQF
URIm2://2SEF8QTYQF
Kindexample
WritingW0 stub
MSC60G09, 60C05, 62G05
IllustratesDirichlet process, Exchangeable random variables
Same as
Changed2 November 2026

Markdown · JSON · Edit on GitHub

What this page needs for W1

  • an inventory row: the row of the inventory that the node accounts for (0 of 1)
  • a source with a locator (0 of 1)

The writing levels say how complete the text of a page is. They do not measure its truth.

What links here

No page links to this page yet.