I'm studying the formal definition a Dirichlet process: $${if } X \sim \operatorname{DP}(H,\alpha)$$ $$\text{then }(X(B_1),\dots,X(B_n)) \sim \operatorname{Dir}(\alpha H(B_1),\dots, \alpha H(B_n))$$
where $$B_1,...,B_n \text{ are the partitions of a measurable set S} $$
What does $X(B_n)$ mean? Could you provide me an example?
I can't really see what does notation represents. Hitherto I have always seen random variables such $X$ "on their own" and the notation $X(B_n)$ really confuses me.
In the article you have quoted it says : a Dirichlet process is a probability distribution whose range is itself a set of probability distributions. For each sample point $\omega$, $X(\omega)$ is not a number but a probability measure. $X(B)$ is defined by $X(B)(\omega)=X(\omega) (B)$, the measure of $B$ under $X(\omega)$. For example, you can have something like $X(\omega) (B)=\int_B \phi(\omega,t) dt$. If you fix $B$ you have an ordinary random variable and if you fix $\omega$ you get a measure $\mu$ defined by $\mu (B)=\int_B \phi(\omega,t) dt$.
An example: let $\{W_t\}$ be standard Brownian motion. Define $X(\omega) ([a,b))=W_b(\omega)-W_a (\omega)$. You can extend this to $X(\omega) (A)$ when $A$ is a finite union of half closed intervals. Using some standard techniques you can extend this to $X(\omega) (A)$ for any Borel set $A$. It is customary to write $X(A)(\omega)$ for $X(\omega) (A)$.