ArticleslgStudy

mathematics

Chinese restaurant process

Chinese restaurant process is a mathematics topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Chinese restaurant process rather than just read about it. In short: In probability theory, the Chinese restaurant process is a discrete-time stochastic process, analogous to seating customers at tables in a restaurant. Imagine a restaurant with an infinite number of circular tables, each with infinite capacity.

Key takeaways

  • Chinese restaurant process belongs to mathematics; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Chinese restaurant process to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Chinese restaurant process from memory before moving on to harder problems.

Reference excerpt

In probability theory, the Chinese restaurant process is a discrete-time stochastic process, analogous to seating customers at tables in a restaurant. Imagine a restaurant with an infinite number of circular tables, each with infinite capacity. Customer 1 sits at the first table. The next customer either sits at the same table as customer 1, or the next table. This continues, with each customer choosing to either sit at an occupied table with a probability proportional to the number of customers already there (i.e., they are more likely to sit at a table with many customers than few), or an unoccupied table. At time n, the n customers have been partitioned among m ≤ n tables (or blocks of the partition). The results of this process are exchangeable, meaning the order in which the customers sit does not affect the probability of the final distribution. This property greatly simplifies a number of problems in population genetics, linguistic analysis, and image recognition. The restaurant analogy first appeared in a 1985 write-up by David Aldous, where it was attributed to Jim Pitman (who additionally credits Lester Dubins). An equivalent partition process was published a year earlier by Fred Hoppe, using an "urn scheme" akin to Pólya's urn. In comparison with Hoppe's urn model, the Chinese restaurant process has the advantage that it naturally lends itself to describing random permutations via their cycle structure, in addition to describing random partitions.

Formal definition For any positive integer n, let 𝒫n denote the set of all partitions of the set {1,2,3,...,n}≜[n]. The Chinese restaurant process takes values in the infinite product ∏n≥1𝒫n. The value of the process at time n is a partition Bn of the set [n], whose probability distribution is determined as follows. At time n=1, the trivial partition B1={{1}} is obtained (with probability one). At time n+1 the element "n+1" is either:

added to one of the blocks of the partition Bn, where each block is chosen with probability |b|/(n+1) where |b| is the size of the block (i.e. number of elements), or added to the partition Bn as a new singleton block, with probability 1/(n+1). The random partition so generated has some special properties. It is exchangeable in the sense that relabeling {1,...,n} does not change the distribution of the partition, and it is consistent in the sense that the law of the partition of [n−1] obtained by removing the element n from the random partition Bn is the same as the law of the random partition Bn−1. The probability assigned to any particular partition (ignoring the order in which customers sit around any particular table) is

Pr⁡(Bn=B)=∏b∈B(|b|−1)!n!,B∈𝒫n where b is a block in the partition B and |b| is the size of b. The definition can be generalized by introducing a parameter θ>0 which modifies the probability of the new customer sitting at a new table to θn+θ and correspondingly modifies the probability of them sitting at a table of size |b| to |b|n+θ. The vanilla process introduced above can be recovered by setting θ=1. Intuitively, θ can be interpreted as the effective number of customers sitting at the first empty table.

Alternative definition An equivalent, but subtly different way to define the Chinese restaurant process, is to let new customers choose companions rather than tables. Customer n+1 chooses to sit at the same table as any one of the n seated customers with probability 1n+θ, or chooses to sit at a new, unoccupied table with probability θn+θ. Notice that in this formulation, the customer chooses a table without having to count table occupancies---we don't need |b|.

Distribution of the number of tables

The Chinese restaurant table distribution (CRT) is the probability distribution on the number of tables in the Chinese restaurant process. It can be understood as the sum of n independent Bernoulli random variables, each with a different parameter:

K=∑i=1nbibi∼Bernoulli⁡(θi−1+θ) The probability mass function of K is given by

f(k)=Γ(θ)Γ(n+θ)|s(n,k)|θk,k=1,…,n, where s denotes Stirling numbers of the first kind.

Two-parameter generalization This construction can be generalized to a model with two parameters, θ & α, commonly called the strength (or concentration) and discount parameters respectively. At time n+1, the next customer to arrive finds |B| occupied tables and decides to sit at an empty table with probability

θ+|B|αn+θ, or at an occupied table b of size |b| with probability

|b|−αn+θ. In order for the construction to define a valid probability measure it is necessary to suppose that either α<0 and θ=−Lα for some L∈{1,2,,...}; or that 0≤α<1 and θ>−α. Under this model the probability assigned to any particular partition B of [n], can be expressed in the general case (for any values of θ,α that satisfy the above-mentioned constraints) in terms of the Pochhammer k-symbol, as

Pr⁡(Bn=B∣θ,α)=(θ+α)|B|−1,α(θ+1)n−1,1∏b∈B(1−α)|b|−1,1 where, the Pochhammer k-symbol is defined as follows: by convention, (a)0,k=1, and for m>0

(a)m,k=∏i=0m−1(a+ik)={amif k=0,km(ak)m‾if k>0,|k|m(a|k|)m_if k<0 where xm‾=∏i=0m−1(x+i) is the rising factorial and xm_=∏i=0m−1(x−i) is the falling factorial. It is worth noting that for the parameter setting where α<0 and θ=−Lα, then (θ+α)|B|−1,α=(|α|(L−1))|B|−1,α, which evaluates to zero whenever |B|>L, so that L is an upper bound on the number of blocks in the partition; see the subsection on the Dirichlet-categorical model below for more details. For the case when θ>0 and 0<α<1, the partition probability can be rewritten in terms of the Gamma function as

Pr⁡(Bn=B∣θ,α)=Γ(θ)Γ(θ+n)α|B|Γ(θ/α+|B|)Γ(θ/α)∏b∈BΓ(|b|−α)Γ(1−α). In the one-parameter case, where α is zero, and θ>0 this simplifies to

Pr⁡(Bn=B∣θ)=Γ(θ)θ|B|Γ(θ+n)∏b∈BΓ(|b|). Or, when θ is zero, and 0<α<1

Pr⁡(Bn=B∣α)=α|B|−1Γ(|B|)Γ(n)∏b∈BΓ(|b|−α)Γ(1−α). As before, the probability assigned to any particular partition depends only on the block sizes, so as before the random partition is exchangeable in the sense described above. The consistency property still holds, as before, by construction. If α=0, the probability distribution of the random partition of the integer n thus generated is the Ewens distribution with parameter θ, used in population genetics and the unified neutral theory of biodiversity.

Derivation Here is one way to derive this partition probability. Let Ci be the random block into which the number i is added, for i=1,2,3,.... Then

… excerpt ends here. Continue reading the full article.

Worked examples

Example 1 — a first encounter with Chinese restaurant process

Start with the simplest possible case. Write down what Chinese restaurant process claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In mathematics, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Chinese restaurant process before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Chinese restaurant process ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Chinese restaurant process

In research
Chinese restaurant process appears in mathematics research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Chinese restaurant process in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Chinese restaurant process is common in secondary-school and first-year university syllabi. It links to neighbouring topics Nonparametric Bayesian statistics, Stochastic processes, so understanding it makes those chapters shorter.
In everyday life
Look for Chinese restaurant process outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “Chinese restaurant process” →

How to study Chinese restaurant process in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Chinese restaurant process means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Chinese restaurant process out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Chinese restaurant process in simple terms?

In probability theory, the Chinese restaurant process is a discrete-time stochastic process, analogous to seating customers at tables in a restaurant. Imagine a restaurant with an infinite number of circular tables, each with infinite capacity.

Why does Chinese restaurant process matter?

Because it connects several mathematics ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Chinese restaurant process?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Chinese restaurant process.

Tags

  • Nonparametric Bayesian statistics
  • Stochastic processes

Keep exploring