We consider a general balanced urn. For all real $u$ and $v$, we set $P_{0}(u,v) = u^{a_{0}} v^{b_{0}}$ and $P_{n}(u,v) = \sum_{\omega \in \Omega_{n}} u^{b(\omega)} v^{n(\omega)}$. We denote by $g_{n}$ the generating function of $X_{n}$ (the number of white balls after $n$ draws). Justify the equalities $$\begin{aligned}
& g_{n}(t) = \frac{1}{\operatorname{card}(\Omega_{n})} P_{n}(t, 1) \\
& E(X_{n}) = \frac{1}{\operatorname{card}(\Omega_{n})} \frac{\partial P_{n}}{\partial u}(1,1)
\end{aligned}$$
We consider a general balanced urn. For all real $u$ and $v$, we set $P_{0}(u,v) = u^{a_{0}} v^{b_{0}}$ and $P_{n}(u,v) = \sum_{\omega \in \Omega_{n}} u^{b(\omega)} v^{n(\omega)}$. We denote by $g_{n}$ the generating function of $X_{n}$ (the number of white balls after $n$ draws).
Justify the equalities
$$\begin{aligned}
& g_{n}(t) = \frac{1}{\operatorname{card}(\Omega_{n})} P_{n}(t, 1) \\
& E(X_{n}) = \frac{1}{\operatorname{card}(\Omega_{n})} \frac{\partial P_{n}}{\partial u}(1,1)
\end{aligned}$$