$\mathbf{u}=(u_{1},\dots,u_{d})$ with $||\mathbf{u}||=1$ it holds that

$\sum_{i,j=1}^{d}u_{i}u_{j}(V_{n})_{i,j}\rightarrow\sum_{i,j=1}^{d}u_{i}u_{j}U_{i,j},$

$\mathbb{P}$-a.s. Notice that

$\displaystyle\sum_{i,j=1}^{d}u_{i}u_{j}(V_{n})_{i,j}$
$\displaystyle=\sum_{i,j=1}^{d}u_{i}u_{j}\frac{1}{n}\sum_{k=1}^{n}k^{2}\Delta_{t_{i},k}\Delta_{t_{j}.k}$
$\displaystyle=\frac{1}{n}\sum_{k=1}^{n}k^{2}\left(\sum_{i=1}^{d}u_{t_{i}}\Delta_{t_{i},k}\right)^{2}$
$\displaystyle=\frac{1}{n}\sum_{k=1}^{n}Z_{k},$

with $Z_{k}$ defined as in the proof of Proposition 2.4. Since we are working
under the assumptions of Proposition 2.4, we can employ all the findings in
its proof. In particular, we know that $(E(Z_{k}\mid\mathcal{G}_{k-1}))$
converges $\mathbb{P}$-a.s to $\sum_{i,j=1}^{d}u_{i}u_{j}U_{i,j}$, and
$\sum_{k=1}^{\infty}E(Z_{k}^{2})/k^{2}<+\infty$. By Theorem 7.2 (a) with
$a_{k}=1$ and $b_{k}=k$, we obtain that $\frac{1}{n}\sum_{k=1}^{n}Z_{k}$
converges $\mathbb{P}$-a.s. to $\sum_{i,j=1}^{d}u_{i}u_{j}U_{i,j}$, which
complets the proof. ∎

###  7.3 Proofs for Section 3

###### Proof of Theorem 3.1.

Consider a countable class of convergence determining sets $A$ such that
$P_{0}(\partial A)=0$. For every $A$ in the class, $\tilde{P}(\partial A)=0$,
$\mathbb{P}-a.s.$ Thus,

$T(\hat{F}_{n})\rightarrow T(\tilde{F}),\quad P_{n}(A\mid
T(\hat{F}_{n}))\rightarrow\tilde{F}(A)$ (7.1)

hold for every $A$ in the class, with probability one. Fix $A$. Since
$(P_{n}(A\mid t))_{n}$ are continuous in $t$, uniformly with respect to $t$
and $n$, then for every $\epsilon>0$ there exists $\delta=\delta(A)$ such that
$|P_{n}(A\mid t)-P_{n}(A\mid t^{\prime})|<\epsilon$ for every $n$, whenever
$t,t^{\prime}\in\mathbb{T}$ satisfy $|t-t^{\prime}|<\delta$. Let $\omega$ and
$\omega^{\prime}$ be such that (7.1) hold for $\omega$ and $\omega^{\prime}$,
and $T(\tilde{F})(\omega)=T(\tilde{F})(\omega^{\prime}).$ Then, for $n$ large
enough $|T(\hat{F}_{n})(\omega)-T(\hat{F}_{n})(\omega^{\prime})|<\delta$,
which implies that, for $n$ sufficiently large $|P_{n}(A\mid
T(\hat{F}_{n}))(\omega)-P_{n}(A\mid
T(\hat{F}_{n}))(\omega^{\prime})|<\epsilon$. In turn, this implies that
$|\tilde{F}(A)(\omega)-\tilde{F}(A)(\omega^{\prime})|<\epsilon$. Since this is
true for every $\epsilon$, then
$\tilde{F}(A)(\omega)=\tilde{F}(A)(\omega^{\prime})$. Since the class of sets
$A$ is countable, then there exists a set $N\in\mathcal{F}$ with
$\mathbb{P}(N)=0$, such that
$\tilde{F}(\cdot)(\omega)=\tilde{F}(\cdot)(\omega^{\prime})$ for every
$\omega,\omega^{\prime}\in N^{c}$ satisfying
$T(\tilde{F})(\omega)=T(\tilde{F})(\omega^{\prime})$. It follows that there
exists a function $F$ such that $\tilde{F}(\cdot)(\omega)=F(\cdot\mid
T(\tilde{F}))(\omega)$ for every $\omega\in N^{c}$. For every $A$ and
$\omega\in N^{c}$, the function $F(A\mid t)(\omega)$ is uniformly continuous
with respect to $t$, since $(P_{n}(A\mid t))(\omega)$ are continuous in $t$,
uniformly with respect to $t$ and $n$. Moreover, $F$ can be extended
arbitrarily outside the set $T(\tilde{F})(N^{c})$. The measurability of $F$
can be proved by classical arguments, exploiting the continuity of $t$.
Moreover, $\tilde{F}=F(T(\tilde{F}))$ holds with probability one. ∎

###### Proof of Proposition 3.3.

For any $k\geq 1$ and any partition $(A_{1},\ldots,A_{k})$, we have from [130]
that there exists $(\alpha_{A_{1}},\ldots,\alpha_{A_{k}})$ such that

$\displaystyle\mathbb{P}(X_{n+1}\in A_{j}\mid x_{1:n})=\mathbb{P}(X_{n+1}\in
A_{j}\mid n_{A_{j}})$
$\displaystyle=\frac{\alpha_{A_{j}}+n(A_{j})}{\alpha_{A_{1},\ldots,A_{k}}+n}$

where $\alpha_{A_{1},\ldots,A_{k}}=\sum_{i=1}^{k}\alpha_{A_{i}}$ and the first
equality uses the postulate (3.4). Moreover,
$(\tilde{F}(A_{1},\ldots,\tilde{F}(A_{k}))\sim
Dirichlet(\alpha_{A_{1}},\ldots,\alpha_{A_{k}})$. Any set $A$ can be
interpreted as an element of a finite partition, and, by the properties of the
Dirichlet distribution, $\alpha_{A}$ does not depend on the partition. In
particular, $\alpha_{0}:=\alpha_{A_{1},\dots,A_{k}}$ does not depend on
$A_{1},\dots,A_{k}$. By the assumption of exchangeability, we have that
$E(\tilde{F}(A))=\mathbb{P}(X_{1}\in A)=F_{0}(A)$ for every $A$. On the other
hand, by the properties of the Dirichlet distribution,
$E(\tilde{F}(A))=\alpha_{A}/\alpha_{0}$, for any $A$. Hence
$\alpha_{A}=\alpha_{0}F_{0}(A)$, which implies that, for every partition
$(A_{1},\dots,A_{k})$, $(\tilde{F}(A_{1},\ldots,\tilde{F}(A_{k}))\sim
Dirichlet(\alpha_{0}F_{0}(A_{1}),\dots,\alpha_{0}F_{0}(A_{k}))$. Since all the
finite dimensional distributions of $\tilde{F}$ coincide with the ones of a
Dirichlet process with parameter $\alpha_{0}F_{0}$, then $\tilde{F}\sim
DP(\alpha_{0}F_{0})$. ∎

###  7.4 Proofs for Section 4

###### Proof of Theorem 4.2.

First we prove that the conditions (i) and (ii) are necessary for partial
exchangeability. Partial exchangeability implies that, for every $n\geq 2$,
$k\leq M$ finite, $(A_{t,i})_{1\leq i\leq k,1\leq t\leq n+1}$ and permutation
${\sigma}_{i}$ of $\\{1,\dots,n\\}$ ($i=1,\dots,k$)

$\displaystyle\mathbb{P}(\cap_{i\leq k,t\leq n+1}(X_{t,i}\in A_{t,i}))$
$\displaystyle=\mathbb{P}(\cap_{i\leq k,t\leq n}(X_{t,i}\in
A_{{\sigma}_{i}^{-1}(t),i})\cap\cap_{i\leq k}(X_{n+1,i}\in A_{n+1,i})).$

Hence,

$\displaystyle\int_{\times_{t\leq n,i\leq
k}A_{t,i}}\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\mathbb{P}(X_{n+1,1:k}\in\text{\Large$\times$}_{i\leq
k}A_{n+1,i}\mid x_{1:n,1:k})$ $\displaystyle\quad\quad\mathbb{P}(\cap_{t\leq
n,i\leq k}(X_{t,i}\in dx_{t,i}))$ $\displaystyle=\int_{\times_{t\leq n,i\leq
k}A_{{\sigma}_{i}^{-1}(t),i}}\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\mathbb{P}(X_{n+1,1:k}\in\text{\Large$\times$}_{i\leq
k}A_{n+1,i}\mid x_{1:n,1:k})$ $\displaystyle\quad\quad\mathbb{P}(\cap_{t\leq
n,i\leq k}(X_{t,i}\in dx_{t,i}))$ $\displaystyle=\int_{\times_{t\leq n,i\leq
k}A_{t,i}}\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\mathbb{P}(X_{n+1,1:k}\in\text{\Large$\times$}_{i\leq
k}A_{n+1,i}\mid x_{{\sigma}_{i}(t),i},t\leq n,i\leq k)$
$\displaystyle\quad\quad\quad\mathbb{P}(\cap_{t\leq n,i\leq k}(X_{t,i}\in
dx_{{\sigma}_{i}(t),i}))$ $\displaystyle=\int_{\times_{t\leq n,i\leq
k}A_{t,i}}\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\mathbb{P}(X_{n+1,1:k}\in\text{\Large$\times$}_{i\leq
k}A_{n+1,i}\mid x_{{\sigma}_{i}(t),i},i\leq k,t\leq n)$
$\displaystyle\quad\quad\quad\mathbb{P}(\cap_{t\leq n,i\leq k}(X_{t,i}\in
dx_{t,i})).$

This proves (i).
Let us now prove (ii). By partial exchangeability, we can write, for every $n$
and $A_{t,i}$, $A_{i}$ and $B_{i}$ ($i=1,\dots,k,t=1,\dots,n$), and
$j=1,\dots,k$,

$\displaystyle\mathbb{P}\Bigl{(}\cap_{t\leq n,i\leq k}(X_{t,i}\in
A_{t,i})\cap\cap_{i=1}^{k}(X_{n+1,i}\in A_{i})$
$\displaystyle\qquad\quad\quad\quad\cap\cap_{i\leq k}(X_{n+2,i}\in
B_{i}\Bigr{)}$ $\displaystyle=\mathbb{P}\Bigl{(}\cap_{t\leq n,i\leq
k}(X_{t,i}\in A_{t,i})\cap\cap_{i\leq k,i\neq j}(X_{n+1,i}\in A_{i})$
$\displaystyle\quad\quad\quad\quad\cap\cap_{i\leq k,i\neq j}(X_{n+2,i}\in
B_{i})$ $\displaystyle\quad\quad\quad\quad\cap(X_{n+1,j}\in
B_{j})\cap(X_{n+1,j}\in A_{j})\Bigr{)}$

Hence,

$\displaystyle\int_{\times_{t\leq n,i\leq k}A_{t,i}\times\times_{i\leq k,i\neq
j}A_{i}\times
B_{i}}\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\mathbb{P}(\cap_{t\leq
n,i\leq k}(X_{t,i}\in dx_{t,i}))$
$\displaystyle\quad\quad\quad\quad\int_{A_{j}}\mathbb{P}(X_{n+1,j}\in
dx_{n+1,j}\mid x_{1:n,1:k})$
$\displaystyle\quad\quad\quad\quad\quad\quad\mathbb{P}(X_{n+2,j}\in B_{j}\mid
x_{1:n+1,1:k})$ $\displaystyle\int_{\times_{t\leq n,i\leq
k}A_{t,i}\times\times_{i\leq k,i\neq j}A_{i}\times
B_{i}}\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\mathbb{P}(\cap_{t\leq
n,i\leq k}(X_{t,i}\in dx_{t,i}))$
$\displaystyle\quad\quad\quad\quad\int_{B_{j}}\mathbb{P}(X_{n+1,j}\in
dx_{n+1,j}\mid x_{1:n,1:k})$
$\displaystyle\quad\quad\quad\quad\quad\quad\mathbb{P}(X_{n+2}\in A_{j}\mid
x_{1:n+1,1:k}).$

Since the equality holds for every $(A_{t,i})_{1\leq t\leq n,1\leq i\leq k}$,
then (ii) holds.

We now prove that the conditions (i)-(ii) are sufficient for partial
exchangeability. Since permutations can be obtained as combinations of
permutations of adjacent elements, then it is sufficient to show that for
every $j=1,\dots,k$, $n\geq 2$, $s=1,\dots,n-1$, and $(A_{t,i})_{1\leq t\leq
n,1\leq i\leq k}$

$\displaystyle\mathbb{P}(\cap_{i=1}^{k}\cap_{t=1}^{n}(X_{t,i}\in
A_{t,i}))=\mathbb{P}(\cap_{i=1}^{k}\cap_{t=1}^{n}(X_{t,i}\in
A_{{\sigma}_{i}(t),i})),$

where ${\sigma}_{i}$ is the identity for $i\neq j$ and ${\sigma}_{j}$
interchanges $s$ and $s+1$. For $s=n-1$ the property is a direct consequence
of (ii). For $s<n-1$, we can write that

$\displaystyle\mathbb{P}(\cap_{t\leq n,i\leq k}(X_{t,i}\in
A_{{\sigma}_{i}(t),i}))$ $\displaystyle=\int_{\times_{t\leq s-1,i\leq
k}A_{t,i}}\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\mathbb{P}(\cap_{t\leq
s-1,i\leq k}(X_{t,i}\in dx_{t,i}))$
$\displaystyle\quad\quad\int_{\times_{i\leq
k}A_{{\sigma}_{i}(s),i}}\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\mathbb{P}(X_{s,1:k}\in
dx_{s,1:k}\mid x_{1:s-1,1:k})$ $\displaystyle\quad\quad\int_{\times_{i\leq
k}A_{{\sigma}_{i}(s+1),i}}\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\mathbb{P}(X_{s+1,1:k}\in
dx_{s+1,1:k}\mid x_{1:s,1:k})$ $\displaystyle\int_{\times_{s+2\leq t\leq
n,i\leq k}A_{t,i}}\prod_{t=s+1}^{n-1}\mathbb{P}(X_{t+1,1:k}\in
dx_{t+1,1:k}\mid x_{1:t,1:k})$ $\displaystyle=\int_{\times_{t\leq s-1,i\leq
k}A_{t,i}}\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\mathbb{P}(\cap_{t\leq
s-1,i\leq k}(X_{t,i}\in dx_{t,i}))$
$\displaystyle\quad\quad\int_{\times_{i\leq
k}A_{s,i}}\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\mathbb{P}(X_{s,1:k}\in
dx_{s,1:k}\mid x_{1:s-1,1:k})$ $\displaystyle\int_{\times_{i\leq
k}A_{s+1,i}}\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\mathbb{P}(X_{s+1,1:k}\in
dx_{s+1,1:k}\mid x_{1:s,1:k})$ $\displaystyle\int_{\times_{s+2\leq t\leq
n,i\leq k}A_{t,i}}\prod_{t=s+1}^{n-1}\mathbb{P}(X_{t+1,1:k}\in
dx_{t+1,1:k}\mid x_{1:t,1:k})$ $\displaystyle=\mathbb{P}(\cap_{t\leq n,i\leq
k}(X_{t,i}\in A_{t,i})),$

where the second equality comes from (ii) and the symmetry of the predictive
distributions with respect to past observations. This concludes the proof. ∎

###  7.5 Proofs for Section 5

###### Proof of Proposition 5.1.

Without loss of generality, we can assume that the support of $P_{X}$ is
contained in $[0,1]^{d}$. Let $a$ be a fixed $d$-dimensional vector satisfying
$\|a\|=1$. First, we prove that $a^{T}\beta_{n}$ is square integrable, for
every $n\geq 0$. Indeed, $a^{T}\beta_{0}$ is square integrable and, denoting
by $M=\max_{x,\beta}||\nabla_{\beta}g(x,\beta)||$, we can write that

$\displaystyle E((a^{T}\beta_{n})^{2})$
$\displaystyle=E(a^{T}(\beta_{n-1}+\frac{1}{n}\nabla_{\beta_{n-1}}g(X_{n},\beta_{n-1})(Y_{n}-g(X_{n},\beta_{n-1})))^{2})$
$\displaystyle\leq 4E((a^{T}\beta_{n-1})^{2})+\frac{4M^{2}}{n^{2}}<+\infty.$

We next prove that $(a^{T}\beta_{n})_{n\geq 0}$ is a martingale with respect
to the filtration $(\mathcal{G}_{n})_{n\geq 0}$, with
$\mathcal{G}_{0}=\sigma(\beta_{0},X_{1})$, and
$\mathcal{G}_{n}=\sigma(X_{1:n},Y_{1:n},\beta_{0})$ for $n\geq 1$. Since
$E(Y_{n}-g(X_{n},\beta_{n-1}))\mid\mathcal{G}_{n-1},X_{n})=0$, then

$\displaystyle E(a^{T}\beta_{n}-a^{T}\beta_{n-1}\mid\mathcal{G}_{n-1})$
$\displaystyle=E(E(a^{T}\beta_{n}-a^{T}\beta_{n-1}\mid\mathcal{G}_{n-1},X_{n})\mathcal{G}_{n-1})$
$\displaystyle=\frac{1}{n}E(a^{T}\nabla_{\beta_{n-1}}g(X_{n},\beta_{n-1})$
$\displaystyle\quad\quad
E(Y_{n}-g(X_{n},\beta_{n-1}))\mid\mathcal{G}_{n-1},X_{n})\mid\mathcal{G}_{n-1})=0.$

Next, we show that $(a^{T}\beta_{n})_{n\geq 0}$ is uniformly integrable. We
can write that

$\displaystyle E((a^{T}\beta_{n})^{2})$
$\displaystyle=E(a^{T}(\beta_{n-1}+\frac{1}{n}\nabla_{\beta_{n-1}}g(X_{n},\beta_{n-1})(Y_{n}-g(X_{n},\beta_{n-1})))^{2})$
$\displaystyle=E((a^{T}\beta_{n-1})^{2})$
$\displaystyle+\frac{1}{n^{2}}E((a^{T}\nabla_{\beta_{n-1}}g(X_{n},\beta_{n-1})^{2}(Y_{n}-g(X_{n},\beta_{n-1}))^{2}),$

with $Y_{n}$, $g(X_{n},\beta_{n-1})$ and
$\nabla_{\beta_{n-1}}g(X_{n},\beta_{n-1})$ bounded. Thus,

$\sup_{n}E((a^{T}\beta_{n})^{2})<+\infty.$

It follows that $(a^{T}\beta_{n})_{n\geq 0}$ is a uniformly integrable
martingale, and, therefore it converges almost surely and in $L^{1}$ to a
limit random variable. Since the limit is linear in $a$, then there exists
$\tilde{\beta}$ such that $\beta_{n}$ converges to $\tilde{\beta}$ almost
surely and in $L^{1}$. Moreover
$E(\tilde{\beta}\mid\mathcal{G}_{n})=\beta_{n}$.

Next, we study the asymptotic behaviour of the sequence of predictive
distributions of $(X_{n},Y_{n})_{n\geq 1}$. Let $A$ be such that
$P_{X}(\partial A)=0$ almost surely. By Theorem 2 in [19],

$\displaystyle\mathbb{P}(X_{n+1}\in A,Y_{n+1}=1\mid
X_{1:n},Y_{1:n},\beta_{0})$ $\displaystyle\quad=E(\mathbf{1}_{A}(X_{n+1})$
$\displaystyle\mathbb{P}(Y_{n+1}=1\mid X_{1:n+1},Y_{1:n},\beta_{0})\mid
X_{1:n},Y_{1:n},\beta_{0})$
$\displaystyle\quad=E(\mathbf{1}_{A}(X_{n+1})g(X_{n+1},\beta_{n})\mid
X_{1:n},Y_{1:n},\beta_{0})$ $\displaystyle\quad\stackrel{{\scriptstyle
a.s.}}{{\rightarrow}}\int_{A}g(x,\tilde{\beta})P_{X}(dx).$

By Lemma 8.2 in [2], the sequence $(X_{n},Y_{n})_{n\geq 1}$ is asymptotically
exchangeable, and the directing random measure of the asymptotically
equivalent, exchangeable sequence is

$\displaystyle\tilde{P}_{X,Y}(dx,dy)$
$\displaystyle=(g(x,\tilde{\beta})\delta_{1}(dy)+(1-g(x,\tilde{\beta}))\delta_{0}(dy))P_{X}(dx).$

∎

###### Proof of Proposition 5.2.

The proof is based on Theorem 2.2 in [28] and Lemma 4.1 in [29] (see Theorem
7.1 and Theorem 7.2). Let $a$ be a fixed $d$-dimensional vector satisfying
$\|a\|=1$. The sequence $(a^{T}\beta_{n})_{n\geq 1}$ is a martingale,
converging in $L^{1}$ to $a^{T}\tilde{\beta}$. To prove that the assumption
(a) of Theorem 7.1 holds, we can write

$\displaystyle\sup_{n}\sqrt{n}|a^{T}\beta_{n}-a^{T}\beta_{n-1}|$
$\displaystyle\leq\sup_{n}\frac{|(Y_{n}-g(X_{n},\beta_{n-1}))a^{T}\nabla_{\beta_{n-1}}g(X_{n},\beta_{n-1})|}{\sqrt{n}},$

which is integrable, since the r.v.’s
$((Y_{n}-g(X_{n},\beta_{n-1}))\nabla_{\beta_{n-1}}g(X_{n},\beta_{n-1}))$ are
uniformly bounded. To prove that condition (b) of Theorem 7.1 holds, we will
apply Theorem 7.2 (b), with $a_{n}=1$ and $b_{n}=n$. Let
$Z_{n}=n^{2}(a^{T}\beta_{n}-a^{T}\beta_{n-1})^{2}$, for $n\geq 1$. Then,

$\displaystyle E(Z_{n}\mid X_{1:n},Y_{1:n},\beta_{0})$
$\displaystyle=E((Y_{n+1}-g(X_{n+1},\beta_{n}))^{2}$
$\displaystyle\quad\quad(a^{T}\nabla_{\beta_{n}}g(X_{n+1},\beta_{n}))^{2}\mid
X_{1:n},Y_{1:n},\beta_{1:n})$
$\displaystyle=E((a^{T}\nabla_{\beta_{n}}g(X_{n+1},\beta_{n}))^{2}$
$\displaystyle E((Y_{n+1}-g(X_{n+1},\beta_{n}))^{2}\mid
X_{1:n+1},Y_{1:n},\beta_{1:n1})$ $\displaystyle\quad\quad\mid
X_{1:n},Y_{1:n},\beta_{1:n})$
$\displaystyle=E((a^{T}\nabla_{\beta_{n}}g(X_{n+1},\beta_{n}))^{2}$
$\displaystyle\quad g(X_{n+1},\beta_{n})(1-g(X_{n+1},\beta_{n})))\mid
X_{1:n},Y_{1:n},\beta_{1:n})$ $\displaystyle\stackrel{{\scriptstyle
a.s.}}{{\rightarrow}}\int(g(x,\tilde{\beta})(1-g(x,\tilde{\beta}))(a^{T}\nabla_{\tilde{\beta}}g(x,\tilde{\beta}))^{2}P_{X}(dx)$
$\displaystyle=a^{T}\int(g(x,\tilde{\beta})(1-g(x,\tilde{\beta}))$
$\displaystyle\quad\quad\nabla_{\tilde{\beta}}g(x,\tilde{\beta}))\nabla_{\tilde{\beta}}g(x,\tilde{\beta}))^{T}P_{X}(dx)\;a.$

By Theorem 7.2 (b),

$n\sum_{k\geq n}(a^{T}\beta_{k}-a^{T}\beta_{k-1})^{2}\stackrel{{\scriptstyle
a.s.}}{{\rightarrow}}a^{T}Ua,$

with

$\displaystyle U=\int(g(x,\tilde{\beta})(1-g(x,\tilde{\beta}))$
$\displaystyle\quad\quad\nabla_{\tilde{\beta}}g(x,\tilde{\beta}))\nabla_{\tilde{\beta}}g(x,\tilde{\beta}))^{T}P_{X}(dx).$

It follows from Theorem 7.1 that

$E\left(e^{it\sqrt{n}(a^{T}\tilde{\beta}-a^{T}\beta_{n+1})}\mid
X_{1:n},Y_{1:n},\beta_{0}\right)\stackrel{{\scriptstyle
a.s.}}{{\rightarrow}}e^{-\frac{1}{2}t^{T}a^{T}Uat}.$

Since this is true for every unitary vector $a$, then, for every $s$,

$E\left(e^{is^{T}\sqrt{n}(\tilde{\beta}-\beta_{n+1})}\mid
X_{1:n},Y_{1:n},\beta_{0}\right)\stackrel{{\scriptstyle
a.s.}}{{\rightarrow}}\exp({-\frac{1}{2}s^{T}Us}),$

which concludes the proof. ∎

###### Proof of of Proposition 5.3.

Let $a$ be a $d$-dimensional vector satisfying $\|a\|=1$. We first prove that
$a^{T}U_{n}a$ converges to $a^{T}Ua$, $\mathbb{P}$-a.s. We can write that

$\displaystyle\frac{1}{n}\sum_{k=1}^{n}k^{2}a^{T}(\beta_{k}-\beta_{k-1})(\beta_{k}-\beta_{k-1})^{T}a$
$\displaystyle=\frac{1}{n}\sum_{k=1}^{n}k^{2}(a^{T}\beta_{k}-a^{T}\beta_{k-1})^{2}$
$\displaystyle=\frac{1}{n}\sum_{k=1}^{n}k^{2}E((a^{T}\beta_{k}-a^{T}\beta_{k-1})^{2}\mid\mathcal{G}_{k-1})$
$\displaystyle+\frac{1}{n}\sum_{k=1}^{n}k^{2}\\{(a^{T}\beta_{k}-a^{T}\beta_{k-1})^{2}$
$\displaystyle\quad-E((a^{T}\beta_{k}-a^{T}\beta_{k-1})^{2}\mid\mathcal{G}_{k-1})\\}.$

For the first term, we can write that

$\displaystyle\frac{1}{n}\sum_{k=1}^{n}k^{2}E((a^{T}\beta_{k}-a^{T}\beta_{k-1})^{2}\mid\mathcal{G}_{k-1})$
$\displaystyle=\frac{1}{n}\sum_{k=1}^{n}E((Y_{k}-g(X_{k},\beta_{k-1}))^{2}$
$\displaystyle\quad\quad\quad(a^{T}\nabla_{\beta_{k-1}}g(X_{k},\beta_{k-1}))^{2}\mid\mathcal{G}_{k-1}).$

From the proof of Proposition 5.2, we deduce that

$\displaystyle
E((Y_{k}-g(X_{k},\beta_{k-1})^{2}(a^{T}\nabla_{\beta_{k-1}}g(X_{k},\beta_{k-1}))^{2}\mid\mathcal{G}_{k-1})$
$\displaystyle\stackrel{{\scriptstyle
a.s.}}{{\rightarrow}}\int(g(x,\tilde{\beta})(1-g(x,\tilde{\beta}))(a^{T}\nabla_{\tilde{\beta}}g(x,\tilde{\beta}))^{2}P_{X}(dx),$

as $k\rightarrow\infty$. Hence

$\displaystyle\frac{1}{n}\sum_{k=1}^{n}k^{2}E((a^{T}\beta_{k}-a^{T}\beta_{k-1})^{2}\mid\mathcal{G}_{k-1})$
$\displaystyle\stackrel{{\scriptstyle
a.s.}}{{\rightarrow}}\int(g(x,\tilde{\beta})(1-g(x,\tilde{\beta}))(a^{T}\nabla_{\tilde{\beta}}g(x,\tilde{\beta}))^{2}P_{X}(dx)$
$\displaystyle=a^{T}Ua.$

Let us now prove that

$\displaystyle\frac{1}{n}\sum_{k=1}^{n}k^{2}\Bigl{(}(a^{T}\beta_{k}-a^{T}\beta_{k-1})^{2}$
$\displaystyle\quad-E((a^{T}\beta_{k}-a^{T}\beta_{k-1})^{2}\mid\mathcal{G}_{k-1})\Bigr{)}\stackrel{{\scriptstyle
a.s.}}{{\rightarrow}}0.$

At this aim we can invoke the martingale law of large numbers ([70], Theorem
2.18), that requests to show that

$\displaystyle\sum_{k=1}^{\infty}\frac{1}{k^{2}}E\Bigl{(}k^{2}\bigl{(}(a^{T}\beta_{k}-a^{T}\beta_{k-1})^{2}$
$\displaystyle\quad\quad\quad-E((a^{T}\beta_{k}-a^{T}\beta_{k-1})^{2})\bigr{)}^{2}\mid\mathcal{G}_{k-1}\Bigr{)}<+\infty.$

We can write that

$\displaystyle\sum_{k=1}^{\infty}\frac{1}{k^{2}}E\Bigl{(}k^{2}\bigl{(}(a^{T}\beta_{k}-a^{T}\beta_{k-1})^{2}$
$\displaystyle\quad\quad\quad-E((a^{T}\beta_{k}-a^{T}\beta_{k-1})^{2})\bigr{)}^{2}\mid\mathcal{G}_{k-1}\Bigr{)}$
$\displaystyle\quad\leq\sum_{k=1}^{\infty}k^{2}E\Bigl{(}(a^{T}\beta_{k}-a^{T}\beta_{k-1})^{4}\mid\mathcal{G}_{k-1}\Bigr{)}$
$\displaystyle\quad\leq\sum_{k=1}^{\infty}\frac{1}{k^{2}}E\Bigl{(}(Y_{k}-g(X_{k},\beta_{k-1}))^{4}$
$\displaystyle\quad\quad(a^{T}\nabla_{\beta_{k-1}}g(X_{k},\beta_{k-1}))^{4}\mid\mathcal{G}_{k-1}\Bigr{)}<+\infty,$

where the last inequality holds true since the terms
$(Y_{k}-g(X_{k},\beta_{k-1})a^{T}\nabla_{\beta_{k-1}}g(X_{k},\beta_{k-1})$ are
uniformly bounded. We can conclude that $a^{T}U_{n}a$ converges almost surely
to $a^{T}Ua$. Since this is true for every unitary vector $a$, then $U_{n}$
converges almost surely to $U$, as $n\rightarrow\infty$. From Proposition 5.2,
we know that, for $\omega$ in a set with probability one,

$\displaystyle E(\exp({is^{T}\sqrt{n}(\tilde{\beta}-\beta_{n})})\mid
X_{1:n},Y_{1:n},\beta_{0})(\omega)$
$\displaystyle\rightarrow\exp({-\frac{1}{2}s^{T}U(\omega)s}),$

and the convergence is uniform with respect to $s$ on compact sets. If
$\omega$ is such that $U_{n}(\omega)$ converges to $U(\omega)$, then

$\displaystyle E$
$\displaystyle(\exp({i(s^{T}U_{n}^{-1/2})\sqrt{n}(\tilde{\beta}-\beta_{n})})\mid
X_{1:n},Y_{1:n},\beta_{0})(\omega)$
$\displaystyle\rightarrow\exp\left(-\frac{1}{2}s^{T}U(\omega)^{-1/2}U(\omega)U^{-1/2}(\omega)s\right)$
$\displaystyle=\exp({-\frac{1}{2}s^{T}s}).$

This concludes the proof. ∎

Acknowledgements This work is supported by the European Union - Next
Generation EU Funds, PRIN 2022 (2022CLTYP4).

## References

  * [1] [author] Aldous, David J.D. J. (1981). Representations for partially exchangeable arrays of random variables. J. Multivar. Anal. 11 581-598.
  * [2] [author] Aldous, D. J.D. J. (1985). Exchangeability and related topics. École d’Été de Probabilités de Saint-Flour XIII 1983 1117 1-198.
  * [3] [author] Aletti, GiacomoG., Crimaldi, IreneI. and Ghiglietti, AndreaA. (2023). Interacting innovation processes. Nature, Scientific Reports 13\.
  * [4] [author] Antoniak, C. E.C. E. (1974). Mixtures of Dirichlet processes with applications to Bayesian nonparametric problems. Ann. Statist. 2 1152–1174.
  * [5] [author] Augenblick, NedN. and Rabin, MatthewM. (2021). Belief Movement, Uncertainty Reduction, and Rational Updating. The Quarterly Journal of Economics 136 933–985.
  * [6] [author] Bacallado, SergioS. (2011). Bayesian analysis of variable-order, reversible Markov chains. Ann. Statist. 39 838–864.
  * [7] [author] Bacallado, S.S., Battiston, M.M., Favaro, S.S. and Trippa, L.L. (2017). Sufficientness Postulates for Gibbs-Type Priors and Hierarchical Generalizations. Statist. Sci. 32 487-500.
  * [8] [author] Bacallado, SergioS., Favaro, StefanoS., Power, SamuelS. and Trippa, LorenzoL. (2022). Perfect Sampling of the Posterior in the Hierarchical Pitman–Yor Process. Bayesian Analysis 17 685–709.
  * [9] [author] Beal, M. J.M. J., Ghahramani, Z.Z. and Rasmussen, C. E.C. E. (2002). The infinite Hidden Markov Model. In Machine Learning 239–245. MIT Press.
  * [10] [author] Bernardo, J. M.J. M. and Smith, A. F. M.A. F. M. (1994). Bayesian Theory. Wiley, Chichester, England.
  * [11] [author] Berti, PatriziaP., Crimaldi, IreneI., Pratelli, LucaL. and Rigo, PietroP. (2009). Rate of convergence of predictive distributions for dependent data. Bernoulli 15 1351–1367.
  * [12] [author] Berti, PatriziaP., Dreassi, EmanuelaE., Leisen, FabrizioF., Pratelli, LucaL. and Rigo, PietroP. (2023). A Probabilistic View on Predictive Constructions for Bayesian Learning. Statist. Sci., Advance Publication 1-15.
  * [13] [author] Berti, P.P., Dreassi, E.E., Leisen, F.F., Pratelli, L.L. and Rigo, P.P. (2023). Kernel based Dirichlet sequences. Bernoulli 29 1321–1342.
  * [14] [author] Berti, PatriziaP., Dreassi, EmanuelaE., Leisen, FabrizioF., Rigo, PietroP. and Pratelli, LucaL. (2023). Bayesian predictive inference without a prior. Statist. Sinica 33 2405–2429.
  * [15] [author] Berti, P.P., Pratelli, L.L. and Rigo, P.P. (2004). Limit theorems for a class of identically distributed random variables. Ann. Probab. 32 2029-2052.
  * [16] [author] Berti, PatriziaP., Pratelli, LucaL. and Rigo, PietroP. (2012). Limit theorems for empirical processes based on dependent data. Electron. J. Probab. 17 1 – 18.
  * [17] [author] Berti, PatriziaP., Pratelli, LucaL. and Rigo, PietroP. (2013). Exchangeable sequences driven by an absolutely continuous random measure. Ann. Probab. 41 2090–2102.
  * [18] [author] Berti, PatriziaP. and Rigo, PietroP. (1997). A Glivenko-Cantelli theorem for exchangeable random variables. Stat. Probab. Lett. 32 385-391.
  * [19] [author] Blackwell, D.D. and Dubins, L.L. (1962). Merging of opinions with increasing information. Ann. Math. Statist. 33 882-886.
  * [20] [author] Blackwell, D.D. and MacQueen, J. B.J. B. (1973). Ferguson distributions via Pólya urn schemes. Ann. Statist. 1 353-355.
  * [21] [author] Breiman, L.L. (2001). Statistical Modeling: The Two Cultures (with discussion). Statist. Sci. 16 199-231.
  * [22] [author] Camerlenghi, FedericoF., Lijoi, AntonioA., Orbanz, PeterP. and Prünster, IgorI. (2019). Distribution theory for hierarchical processes. Ann. Statist. 47 67–92.
  * [23] [author] Catalano, MartaM., Sole, Claudio DelC. D., Lijoi, AntonioA. and Prünster, IgorI. (2023). A Unified Approach to Hierarchical Random Measures. Sankhya A.
  * [24] [author] Cifarelli, D. M.D. M. and Regazzini, E.E. (1978). Problemi statistici non parametrici in condizioni di scambiabilitá parziale. Impiego di medie associative. Quaderni dell’Istituto di Matematica Finanziaria.
  * [25] [author] Cifarelli, D. M.D. M. and Regazzini, E.E. (1996). De Finetti’s contribution to probability and statistics. Statist. Sci. 11 253 – 282.
  * [26] [author] Clarke, Bertrand S.B. S. and Clarke, Jennifer L.J. L. (2018). Predictive Statistics: Analysis and Inference beyond Models. Cambridge University Press.
  * [27] [author] Coppersmith, D.D. and Diaconis, PersiP. Random walk with reinforcement.
  * [28] [author] Crimaldi, I.I. (2009). An almost sure conditional convergence result and an application to a generalized Pólya urn. Int. Math. Forum 4 1139-1156.
  * [29] [author] Crimaldi, I.I., Dai Pra, P.P. and G., Minelli I.M. I. (2016). Fluctuations theorems for syncronization of interacting Pólya urns. Stoch. Process. Appl. 126 930-947.
  * [30] [author] Dawid, A. P.A. P. (1984). Present Position and Potential Developments: Some Personal Views: Statistical Theory: The Prequential Approach. J R Stat Soc Series A 147 278–292.
  * [31] [author] De Blasi, P.P., Favaro, S.S., Lijoi, A.A., Mena, R. H.R. H., Prünster, I.I. and Ruggiero, M.M. (2015). Are Gibbs-type priors the most natural beneralization of the Dirichlet Process? IEEE Trans Pattern Anal Mach Intell. 37 212–229.
  * [32] [author] de Finetti, BrunoB. (1931). Sul significato soggettivo della probabilità. Fundamenta Mathematicae 17 298-329.
  * [33] [author] de Finetti, B.B. (1937). La prévision, ses lois logiques, ses sources subjectives. Annales de l’Institut Henri Poincaré 7 1-68.
  * [34] [author] de Finetti, B.B. (1937). Sur la condition de “equivalence partielle”. In Colloque consacré á la théorie des probabilités, Université de Genéve, 12-16 octobre, 1937 5–18. Hermann et C.ie, Paris, l938-39, Actual. sci. industr. 730, vol. VI [English translation: On the Condition of Partial Exchangeability, in Studies in Inductive Logic and Probability, vol.2 (1980) p.193-205].
  * [35] [author] de Finetti, BrunoB. (1959). La probabilità e la statistica nei rapporti con l’induzione secondo i diversi punti di vista. In Centro Internazionale Matematico estivo (CIME), Induzione e Statistica 1–115. Cremones [English translation in B. de Finetti (1972) Probability, Induction and Statistics. Wiley, New York, 147–227.].
  * [36] [author] de Finetti, B.B. (1970). Teoria delle Probabilitá. Einaudi, Turin Italy, Turin, Italy.
  * [37] [author] DeGroot, M. H.M. H. and Fienberg, S. E.S. E. (1982). The comparison and evaluation of forecasters. The Statistician 32 12-22.
  * [38] [author] Diaconis, PersiP. (1988). Recent progress on de Finetti’s notions of exchangeability. In Bayesian Statistics 3 (J. M.J. M. Bernardo, M. H.M. H. DeGroot, D. V.D. V. Lindley and A. F. MA. F. M. Smith, eds.). Oxford University Press, Oxford, Oxford, UK.
  * [39] [author] Diaconis, P.P. and Freedman, D.D. (1980). de Finetti theorem for Markov chains. Ann. Probab. 8 115–130.
  * [40] [author] Diaconis, PersiP. and Freedman, DavidD. (1981). On the statistics of vision: The Julesz conjecture. Journal of Mathematical Psychology 24 112–138.
  * [41] [author] Diaconis, PersiP. and Freedman, DavidD. (1984). Partial exchangeability and sufficiency. In Statistics: Applications and New Directions. Proceedings of the Indian Statistical Institute Golden Jubilee International Conference, Calcutta, 1981 (J. K.J. K. Ghosh and J.J. Roy, eds.) 205–274.
  * [42] [author] Diaconis, P.P. and Freedman, D.D. (1990). On the Uniform Consistency of Bayes Estimates for Multinomial Probabilities. Ann. Statist. 18 1317-1327.
  * [43] [author] Diaconis, PersiP. and Janson, SvanteS. (2008). Graphs limits and exchaneable random graphs. Rendiconti di Matematica, Serie VII 28 33–61.
  * [44] [author] Diaconis, P.P. and Rolles, S. W. W.S. W. W. (2006). Bayesian analysis for reversible Markov chains. Ann. Statist. 34 1270–1292.
  * [45] [author] Diaconis, PersiP. and Ylvisaker, DonaldD. (1979). Conjugate Priors for Exponential Families. Ann. Statist. 7 269–281.
  * [46] [author] Doksum, KjellK. (1974). Tailfree and Neutral Random Probabilities and Their Posterior Distributions. Ann. Probab. 2 183-201.
  * [47] [author] Dolera, EmanueleE. and Regazzini, EugenioE. (2019). Uniform rates of the Glivenko–Cantelli convergence and their use in approximating Bayesian inferences. Bernoulli 25 2982 – 3015.
  * [48] [author] Doob, J. L.J. L. (1949). Application of the theory of martingales. Le Calcul de Probabilités et ses Applications, Colloques Internationaux du Centre National de la Recherche Scientifique 23-27.
  * [49] [author] Dubins, L. E.L. E. and Savage, L. J.L. J. (1965). How to Gamble if You Must. Inequalities for Stochastic Processes. McGraw-Hill, New York.
  * [50] [author] Eggenberger, F.F. and Pólya, G.G. (1923). Über die Statistik verketteter Vorgänge. Z. Angew. Math. Mech. (Appl. Math. Mech.) 3 279–289.
  * [51] [author] Ewens, W. J.W. J. (1972). The sampling theory of selectively neutral alleles. Theoretical Population Biology 3 87–112.
  * [52] [author] Fasano, AugustoA. and Petrone, SoniaS. (2022). The predictive distribution in exchangeable random graph: a possible approach. Manuscript.
  * [53] [author] Fong, E.E., Holmes, C.C. and Walker, S. G.S. G. Martingale Posterior Distributions. J. R. Stat. Soc. Series B Stat. Methodol., to appear.
  * [54] [author] Fortini, SandraS., Ladelli, LuciaL., Petris, GiovanniG. and Regazzini, EugenioE. (2002). On mixtures of distributions of Markov chains. Stoch. Process. Appl. 100 147-165.
  * [55] [author] Fortini, S.S., Ladelli, L.L. and Regazzini, E.E. (2000). Exchangeability, predictive distributions and parametric models. Sankya, Series A 62 86–109.
  * [56] [author] Fortini, S.S. and Petrone, S.S. (2012). Predictive construction of priors in Bayesian nonparametrics. Braz. J. Probab. Stat. 26 423-449.
  * [57] [author] Fortini, SandraS. and Petrone, SoniaS. (2012). Hierarchical reinforced urn processes. Statistics & Probability Letters 82 1521-1529.
  * [58] [author] Fortini, SandraS. and Petrone, SoniaS. (2016). Predictive Distribution (de Finetti’s View) In Wiley StatsRef: Statistics Reference Online 1-9. John Wiley & Sons, Ltd.
  * [59] [author] Fortini, SandraS. and Petrone, SoniaS. (2017). Predictive characterization of mixtures of Markov chains. Bernoulli 23 1538 – 1565.
  * [60] [author] Fortini, S.S. and Petrone, S.S. (2020). Quasi-Bayes properties of a procedure for sequential learning in mixture models. J. R. Stat. Soc. Series B Stat. Methodol. 82 1087-1114.
  * [61] [author] Fortini, SandraS. and Petrone, SoniaS. (2023). Prediction-based uncertainty quantification for exchangeable sequences. Phil. Trans. R. Soc. A 381:20220142.
  * [62] [author] Fortini, S.S., Petrone, S.S. and Sariev, H.H. (2021). Predictive constructions based on measure-valued Pólya urn processes. Mathematics 9 2845\.
  * [63] [author] Fortini, S.S., Petrone, S.S. and Sporysheva, P.P. (2018). On a notion of partially conditionally identically distributed sequences. Stoch. Process. Appl. 128 819–846.
  * [64] [author] Geisser, SeymourS. (1993). Predictive Inference. Chapman and Hall/CRC, London, UK.
  * [65] [author] Goldstein, MichaelM. (1999). Bayes Linear Analysis. In Encyclopedia of Statistical Sciences., (S.S. Kotz, C. B.C. B. Read and D. L.D. L. Banks, eds.) 3 29-34. Wiley, New York.
  * [66] [author] Good, Irving JohnI. J. (1965). The Estimation Of Probabilities An Essay on Modern Bayesian Methods. Research Monographs No. 30, The M.I.T. Press.
  * [67] [author] Good, I. J.I. J. (1967). A Bayesian Significance Test for Multinomial Distributions. J. R. Stat. Soc. Series B Stat. Methodol. 29 399–431. (with discussion).
  * [68] [author] Griffiths, T. L.T. L. and Ghahramani, Z.Z. (2005). Infinite latent feature models and the Indian Buffet Process. In Advances in Neural Information Processing Systems (NIPS) 475–482.
  * [69] [author] Hahn, P. R.P. R., Martin, R.R. and Walker, S. G.S. G. (2018). On recursive Bayesian predictive distributions. J.Amer.Statist.Assoc. 113 1085–1093.
  * [70] [author] Hall, P.P. and Heyde, C. C.C. C. (1980). Martingale Limit Theory and its Application. Academic Press, New York.
  * [71] [author] Holmes, Chris C.C. C. and Walker, Stephen G.S. G. (2023). Statistical inference with exchangeability and martingales. Philosophical Transactions of the Royal Society A 381 1-17.
  * [72] [author] Hoover, D. N.D. N. (1979). Relations on probability spaces and arrays of random variables. Technical Report, Institute of Advanced Study, Princeton.
  * [73] [author] Hoppe, F. M.F. M. (1984). Pólya-like urns and the Ewens’ sampling formula. J. Math. Biol. 20 91-94.
  * [74] [author] Hoppe, F. M.F. M. (1987). The sampling theory of neutral alleles and an urn model in population genetics. J Math Biol. 25 123-159.
  * [75] [author] Johnson, W. E.W. E. (1932). Probability: The Deductive and Inductive Problems. Mind 41 409–423.
  * [76] [author] Kallenberg, O.O. (1988). Spreading and predictable sampling in exchangeable sequences and processes. Ann. Probab. 16 508-534.
  * [77] [author] Kallenberg, O.O. (1999). Multivariate sampling and the estimation problem for exchangeable arrays. J. Theoret. Probab. 12 859–883.
  * [78] [author] Kallenberg, O.O. (2005). Probabilistic Symmetries and Invariance Principles. Springer, New York.
  * [79] [author] Kalman, R. E.R. E. (1960). A New Approach to Linear Filtering and Prediction Problems. Journal of Basic Engineering 82 35-45.
  * [80] [author] Kingman, J. F. C.J. F. C. (1978). Uses of exchangeability. Ann. Probab. 183–197.
  * [81] [author] Kingman, J. F. C.J. F. C. (1980). The Mathematics of Genetic Diversity. SIAM, Philadelphia.
  * [82] [author] Kingman, J. F. C.J. F. C. (1978). The representation of partition structures. J. London Math. Soc. 2 374–380.
  * [83] [author] Lauritzen, S. L.S. L. (1984). Extreme point models in statistics (with discussion). Scand. J. Stat. 11 65–91.
  * [84] [author] Lauritzen, Steffen L.S. L. (1988). Extremal Families and Systems of Sufficient Statistics. Lecture Notes in Statistics 49. Springer, New York.
  * [85] [author] Lo, Albert Y.A. Y. (1988). A Bayesian Bootstrap for a Finite Population. Ann. Statist. 16 1684–1695.
  * [86] [author] Lovász, L.L. (2013). Large Networks and Graph Limits. American Mathematical Society.
  * [87] [author] Lovász, L.L. and Szegedy, B.B. (2006). Limits of dense graph sequences. J. Combin. Theory Ser. B 96 933–957.
  * [88] [author] MacEachern, S. N.S. N. (1999). Dependent nonparametric processes. In In ASA Proceedings of the Section on Bayesian Statistical Science 50–55.
  * [89] [author] MacEachern, S. N.S. N. (2000). Dependent Dirichlet processes Technical Report, Department of Statistics, The Ohio State University.
  * [90] [author] Moya, BlakeB. and Walker, Stephen G.S. G. (2023). Martingale Posterior Distributions for Time Series Models. Statist. Sci., Advance Publication 1-15.
  * [91] [author] Muliere, P.P., Secchi, P.P. and Walker, S. G.S. G. (2000). Urn schemes and reinforced random walks. Stochastic Processes and their Applications 88 59–78.
  * [92] [author] Muliere, PietroP. and Walker, StephenS. (1998). Extending the Family of Bayesian Bootstraps and Exchangeable Urn Schemes. J. R. Stat. Soc. Series B Stat. Methodol. 60 175–182.
  * [93] [author] Newton, M. A.M. A. (2002). On a nonparametric recursive estimator of the mixing distribution. Sanky$\bar{a}$ 64 306–322.
  * [94] [author] Newton, M. A.M. A., Quintana, F. A.F. A. and Zhang, Y.Y. (1998). Nonparametric Bayes methods using predictive updating In Practical Nonparametric and Semiparametric Bayesian Statistics 45–61. Springer, New York.
  * [95] [author] Newton, M. A.M. A. and Zhang, Y.Y. (1999). A recursive algorithm for nonparametric analysis with missing data. Biometrika 86 15–26.
  * [96] [author] Orbanz, PeterP. and Roy, Daniel M.D. M. (2015). Bayesian Models of Graphs, Arrays and Other Exchangeable Random Structures. IEEE Transactions of Pattern Analysis and Machine Intelligence 37 437–461.
  * [97] [author] Orbanz, PeterP. and Szegedy, BalazsB. (2016). Borel liftings of graph limits. Electron. Commun. Probab. 21 1-4.
  * [98] [author] Parmigiani, GiovanniG. and Inoue, LurdesL. (2009). Decision Theory: Principles and Approaches. John Wiley & Sons,Chichester, UK.
  * [99] [author] Pemantle, R.R. (2007). A survey on random processes with reinforcement. Probab. Surv. 4 1-79.
  * [100] [author] Petrone, SoniaS. (1999). Random Bernstein Polynomials. Scand. J. Stat. 26 373–393.
  * [101] [author] Petrone, SoniaS. and Veronese, PieroP. (2010). Feller operators and mixture priors in Bayesian nonparametrics. Statist. Sinica 20 379–404.
  * [102] [author] Pitman, JimJ. (1995). Exchangeable and partially exchangeable random partitions. Probab. Theory Related Fields 102 145–158.
  * [103] [author] Pitman, J.J. (1996). Some developments of the Blackwell-MacQueen urn scheme. In LNM, 30 245-267. IMS, Hayward, CA.
  * [104] [author] Pitman, JimJ. (2002). Combinatorial Stochastic Processes. Ecole d’Eté de Probabilités de Saint-Flour, Lecture Notes in Mathematics XXXII. Springer-Verlag.
  * [105] [author] Pólya, G.G. (1931). Sur quelques points de la théorie des probabilités. Ann. Inst. H. Poincaré 1 117–161.
  * [106] [author] Quintana, FernandoF., Müller, PeterP., Jara, AlejandroA. and MacEachern, S. V.S. V. (2022). The dependent Dirichlet process and related models. Statist. Sci. 37 24–41.
  * [107] [author] Ramsey, F. P.F. P. (1926). Truth and Probability. In Philosophy of Probability: Contemporary Readings. Routledge.
  * [108] [author] Robbins, HerbertH. and Monro, SuttonS. (1951). A Stochastic Approximation Method. Ann. Math. Stat. 22 400 – 407.
  * [109] [author] Ryll-Nardzewski, C.C. (1957). On stationary sequences of random variables and the de Finetti’s equivalence. Colloquium Mathematicae 4 149-156.
  * [110] [author] Sariev, HristoH., Fortini, SandraS. and Petrone, SoniaS. (2023). Infinite-color randomly reinforced urns with dominant colors. Bernoulli 29 132 – 152.
  * [111] [author] Sariev, HristoH. and Savov, MladenM. (2023). Sufficientness postulates for measure-valued Pólya urn sequences. arXiv preprint arXiv: 2308.08317+.
  * [112] [author] Sariev, HristoH. and Savov, MladenM. (2023). Characterization of exchangeable measure-valued Pólya urn sequences. arXiv preprint arXiv: 2305.10083.
  * [113] [author] Savage, L. J.L. J. (1954). The Foundations of Statistics. Wiley, New York.
  * [114] [author] Schervish, M. J.M. J. (1995). Theory of Statistics. Springer-Verlag, New York.
  * [115] [author] Shmueli, G.G. (2010). To Explain or to Predict? Statist. Sci. 25 289-310.
  * [116] [author] Smale, SteveS. and Yao, YuanY. (2006). Online Learning Algorithms. Foundations of Computational Mathematics 6 145-170.
  * [117] [author] Smith, A. F. M.A. F. M. and Makov, U. E.U. E. (1978). A Quasi-Bayes Sequential Procedure for Mixtures. J. R. Stat. Soc. Series B Stat. Methodol. 40 106–112.
  * [118] [author] Teh, Y. W.Y. W. (2006). A hierarchical Bayesian language model based on Pitman–Yor processes. In Proceedings of the International Conference on Computational Linguistics 985-992.
  * [119] [author] Teh, Y. W.Y. W., Jordan, M. I.M. I., Beal, M. J.M. J. and Blei, D. M.D. M. (2006). Hierarchical Dirichlet processes. Journal of the American Statistical Association 101 1566–1581.
  * [120] [author] Teh, Yee WhyeY. W. and Jordan, Michael I.M. I. (2010). Hierarchical Bayesian nonparametric models with applications. In Bayesian Nonparametrics (Nils L.N. L. Hjort, Christopher C.C. C. Holmes, PeterP. Muller and Stephen G.S. G. Walker, eds.) 158–207. Cambridge University Press.
  * [121] [author] Thibaux, R.R. and Jordan, M. I.M. I. (2007). Hierarchical Beta Processes and the Indian Buffet Process. In AISTATS Proceedings, 564–571.
  * [122] [author] Tian, QinglongQ., Nordman, Daniel J.D. J. and Meeker, William Q.W. Q. (2022). Methods to Compute Prediction Intervals: A Review and New Results. Statist. Sci. 37 580–597.
  * [123] [author] von Plato, JanJ. (1982). The Generalization of de Finetti’s Representation Theorem to Stationary Probabilities. In Philosophy of Science Association: Proceedings of the Biennial Meeting of the Philosophy of Science 137-144. The University of Chicago Press.
  * [124] [author] Wade, S. K.S. K., Mongelluzzo, S.S. and Petrone, S.S. (2011). An enriched conjugate prior for Bayesian nonparametric inference. Bayesian Analysis 6 359–499.
  * [125] [author] Wade, SaraS., Walker, Stephen G.S. G. and Petrone, SoniaS. (2014). A Predictive Study of Dirichlet Process Mixture Models for Curve Fitting. Scand. J. Stat. 41 580–605.
  * [126] [author] Walker, S.S. and Muliere, P.P. (1997). Beta-Stacy processes and a generalization of the Pólya-urn scheme. Ann. Stat. 25 1762–1780.
  * [127] [author] Walker, S.S. and Muliere, P.P. (1999). A characterization of a neutral to the right prior via an extension of Johnson’s sufficientness postulate. Ann. Statist. 27 415–781.
  * [128] [author] Williams, P. M.P. M. (1976). Indeterminate Probabilities In Formal Methods in the Methodology of Empirical Sciences: Proceedings of the Conference for Formal Methods in the Methodology of Empirical Sciences, Warsaw, June 17–21, 1974 229–246. Springer Netherlands, Dordrecht.
  * [129] [author] Yiu, AndrewA., Fong, EdwinE., Walker, StephenS. and Holmes, ChrisC. (2022). Causal predictive inference and target trial emulation. arXiv preprint arXiv: 2207.12479.
  * [130] [author] Zabell, S. L.S. L. (1982). W. E. Johnson’s ”Sufficientness” Postulate. Ann. Stat. 10 1090–1099.
  * [131] [author] Zabell, S. L.S. L. (1995). Characterizing Markov exchangeable sequences. Journal of Theoretical Probability 8 175–178.
  * [132] [author] Zabell, S. L.S. L. (1997). The continuum of inductive methods revisited In The cosmos of science: essays in exploration. Earman, J. and Norton, J.D. Eds. Universty of Pittsburgh Press.
  * [133] [author] Zabell, S. L.S. L. (2005). Symmetry and Its Discontents: Essays on the History of Inductive Probability. Cambridge Univ. Press, New York.
  * [134] [author] Zaman, A.A. (1984). Urn Models for Markov Exchangeability. Ann.Probab. 12 223–229.


# Closed Loop Testing of Microphonics Algorithms Using a Cavity Emulator
††thanks: The authors of this work grant the arXiv.org and LLRF Workshop’s
International Organizing Committee a non-exclusive and irrevocable license to
distribute the article, and certify that they have the right to grant this
license.††thanks:  Work supported by Fermi Research Alliance LLC. Under DE-
AC02-07CH11359 with U.S. DOE.

S. Raman<EMAIL_ADDRESS>P. Varghese  B. Chase  S. Ahmed  C. Fulz  P. Hanlet
D. Klepec
Fermi National Accelerator Laboratory (FNAL)  Batavia  IL 60510  USA

###### Abstract

An analog crystal filter based cavity emulator is modified with reverse biased
varactor diodes to provide a tuning range of around 160 Hz. The piezo drive
voltage of the resonance controller is used to detune the cavity through the
bias voltage. A signal conditioning and summing circuit allows the
introduction of microphonics disturbance from a signal source or using real
microphonics data from cavity testing. This setup is used in closed loop with
a cavity controller and resonance controller to study the effectiveness of
resonance control algorithms suitable for superconducting cavities.

##  1 INTRODUCTION

Low-level Radio Frequency (LLRF) systems are a critical subsystem of particle
accelerators providing precision control of RF cavity field amplitude and
phase. Cavity emulators provide a means of testing LLRF control hardware and
firmware operation without waiting for the RF systems to being installed,
which happens in the later stages of a project. An analog cavity emulator
based on a crystal filter was developed for testing the various RF systems of
the Fermilab PIP-II superconducting linac project[1,3]. This design is
modified to make the crystal filter resonant frequency tunable by using
reverse biased varactor diodes. The resulting narrow tuning range of about 160
Hz makes it suitable to study the effects of microphonics disturbances on the
cavity resonant frequency as well as the closed loop feedback algorithms to
suppress these disturbances. Detuning data from cavity operation can be played
through an arbitrary waveform generator to provide the microphonics
disturbance input and check how the various modes are suppressed by the
feedback algorithms.

A voltage summing circuit for the tuning bias allows multiple disturbance
sources to be included along with the resonance controller output to provide
the feedback correction. Modifications were also made to the previous design
to allow the emulator to be used for all three RF frequencies of the PIP-II
linac, 162.5 MHz, 325 MHz and 650 MHz. The emulator design and preliminary
measurements are presented in this paper.

Figure 1: Crystal Filter with Varactor Diodes Figure 2: Varactor Bias
Summation Circuit

##  2 Cavity Emulator Design

The crystal filter circuit section with the varactor diodes is shown in Fig.
1. The bias input is provided from the output of a signal summing circuit
shown in Fig. 2. The inputs of the summing circuit are weighted in the
proportion shown in Table 1. The negative scale factor for the piezo input is
for feedback control. The output bias voltage can be expressed in terms of its
inputs as

$V_{BIAS}=V_{Micro}+6.25V_{LFD}-V_{Piezo}$ (1)

Table 1: Simulator Inputs Input | Range(V) | Scaling
---|---|---
Microphonics | 0 - 5 | 1
LFD | 0 - 5 | 6.25
Piezo | 0 - 30 | -1

The full schematic of the cavity emulator is shown in Fig.3.

Figure 3: Cavity Emulator Schematic

The piezo input can reach a maximum of 100V which is seen as a maximum input
of 10V due to the voltage divider by a factor of ten at the piezo input. The
gain in the summing stage is also 10 which provides an effective loop gain of
one without using power supplies greater than 30V. For any piezo input greater
than 30V the output circuit will saturate. The numbers chosen here for the
relative gains are not intended to provide any quantitative measure of the
microphonics and LFD effects, but rather to provide a qualitative and relative
effectiveness of various control schemes to suppress the amplitude of the
resonances in the cavity detuning spectrum.

The cavity emulator resonant frequency detuning range with the full bias
voltage of 30V is about 160 Hz as shown in Fig. 4. The detuning as a function
of bias voltage is non-linear as seen in Fig. 6.

Figure 4: Cavity emulator detuning range Figure 5: Cavity Emulator

##  3 Emulator Testing

A full LLRF hardware setup was assembled to test the emulator in closed loop.
A schematic of the test setup is shown in Fig. 8. The hardware in the loop
consists of a LLRF controller, a Resonance controller, a master oscillator for
the RF, clock and LO frequency generation, up and down converters for the RF
and the cavity emulator. A picture of the setup is shown in Fig. 9.

###  3.1 Open loop testing

A 20 Hz sinewave test waveform representing the cavity detuning was sent from
a signal generator to the microphonics input and the resultant detuning is
displayed in the Labview interface for the LLRF controller.The detuning data
from the LLRF controller is transmitted over the fiber conection to the
resonance controller. The non-linearity of the cavity detuning with bias
voltage can be seen in the distorted waveform seen for the cavity detuning in
Fig.7.

Figure 6: Detuning vs. Bias Voltage Figure 7: Open Loop Test Figure 8: Test
Setup Figure 9: Cavity Emulator test configuration with LLRF system Figure 10:
Detuning with feedback disabled Figure 11: Detuning with feedback enabled
Figure 12: Tuner Controls Settings

###  3.2 Closed Loop Testing with Resonance Controller

The LLRF controller computes the cavity detuning from the cavity and forward
power signals from the cavity emulator. The detuning data is transmitted over
a fiber channel to the resonance contoller. The processing of the detune data
in the resonance controller is shown in Fig. 13. The piezo tuner drive is
connected to the piezo input of the cavity emulator.

Figure 13: Detuning Feedback Controller

The microphonics disturbance input can be driven by a signal generator driving
the frequencies of interest. Cavity microphonics detuning data can be used to
drive an arbitrary waveform generator to provide a disturbance input. The
control loop in the resonace controller consists mainly of an integrator with
a bandwidth of about 1.5 Hz that compensates for slow drifts in the cavity
resonant frequency. A filter bank with filters at different frequencies of
interest with tunable gain and phase can be used to target specific
microphonics and mechanical resonances of interest.

In order to test the slow drift integrator in the loop, a 1 Hz sinewave input
was used to drive the disturbance input. The cavity detuning with the feedback
off shows the effect of the disturbance as seen in Fig. 11. When feedback is
enabled the integrator can be seen to reduce the detuning frequency excursions
as shown in Fig.12.

The piezo voltage range input to the cavity emulator is 0-30V whereas the
piezo drive output of the resonance controller is in the 0-100V with a
differential drive of +/- 50 V. Since the summing circuit piezo input is
single ended, this range is reduced to 0-50V. In order to keep the feedback
loop from saturating the drive has to be less than 30 V. The microphonic
disturbance input of a 1 Hz, 1Vpp sinusoidal input was given a DC offset of
0.5V. This resulted in a detuning range of about 40 Hz as seen in Fig. 11.
Keeping the piezo drive bias at 20V provided sufficient headroom for the
feedback loop to regulate without saturation as can be seen in Fig.12 which
shows the piezo waveforms with feedback enabled. The frequency of 1 Hz was
chosen for the disturbance because the feedback loop which consists of an
integrator has a bandwidth in that range. When tuner loops with greater
bandwidth are used, the circuit should be able to work in the full range of
microphonics frequencies. The detuning measurement used a frequency PLL in the
LLRF controller run in the cavity frequency tracking mode with a direct
readout of the offset frequency from the nominal frequency. This approach was
used to have better control of the test environment focusing on demonstrating
the viability of this design. Detuning computed from cavity waveforms in GDR
mode should work equally well. Microphonics data taken with real cavities can
be scaled appropriately and driven by an arbitrary waveform generator to drive
the disturbance input which will enable the tuner feedback algorithms to be
evaluated for their effectiveness in suppressing the microphonics disturbances
with real cavities.

##  4 Summary

A crystal oscillator based analog cavity emulator was modified with reverse
biased varactor diodes to have a tunable resonant frequency range of about 160
Hz. The resonant frequency shift with bias voltage is used to emulate the
effects of external microphonic disturbances or Lorentz force detuning. An
analog summing circuit configuration with two inputs for disturbances and a
third input for the correction voltage from the piezo controller was used to
provide a suitable test bed to check the operation of piezo tuner closed loop
operation in a feedback configuration. The emulator was tested with a complete
LLRF system using a signal generator to provide a microphonics disturbance.
The piezo feedback loop was then turned on and the tuner was shown to
significantly reduce the amplitude of the detuning oscillation. The use of a
tunable crystal oscillator to effectively emulate the impact of microphonic
and other disturbances increases its utility in testing LLRF systems in the
absence of superconducting cavities or cryomodules. This allows various
features of the LLRF system to be tested before cold cavities are available.

## References

  * [1] S. Ahmed, B. Chase, P. Varghese, S. Begum, “SRF Cavity Emulator for PIP-II LLRF Lab and Field Testing”, LLRF2022, Brugg-Windisch, Switzerland, October 2022.
  * [2] Feng Qiu, “Real-time cavity simulator-based low-level radio-frequency test bench and applications for accelerators”, Phys. Rev. Accel. Beams 21, 032003, March 2018
  * [3] C.W. Pond, D. Kemper, ”How to Specify Crystal Filters”, Piezo-Electric Devices and Exhibition Conference, 1992
  * [4] Paul R. Gray, Peter Baer Galvin, ”Analysis and Design of Analog Integrated Circuits”, John Wiley and Sons Inc., New York, New York, USA, 2001