Deriving trapezoid rule from conditional expectation of Brownian motion I have read here and in P. Diaconis' paper Bayesian Numerical Analysis that, in particular,
$$\mathbb{E}\left(\int_0^1 B_t dt | B_{t_0}, B_{t_1}, \dotsc, B_{t_{n-1}}, B_{t_n}\right)$$
yields the trapezoid rule for approximating the integral $\int_0^1 B_t dt$. I am trying to explicitly compute this to end up with the trapezoid sum $\frac{h}{2}[B_0+2B_{t_1}+\dotsc 2B_{t_{n-1}} +B_{t_n}]$. So, I have the following
Question:
How do we show the conditional expectation above equals the trapezoid scheme?
Thoughts:
I have looked into numerous references on Bayesian numerical analysis and I can only find mentions of this (presumably basic) fact but no explicit computations or derivations of it. Am I missing something obvious? I know how to show things like $B_t$ is a martingale, and $B_t^2-t$ is a martingale, and things of that nature involving simple conditional expectations but I am not quite sure how to handle conditional expectations of functionals of Brownian motion conditional on the sample path's values at various points.
In a random variable setting, we might estimate a function $h(\theta)$ of a parameter $\theta$ by
\begin{align}
\mathbb{E}(h(\theta)|X) &= \int h(\theta) p(\theta|x)d\theta\\
&= \int h(\theta) \frac{p(x|\theta) p(\theta)}{p_X(x)}d\theta,
\end{align}
using Bayes' theorem, where $p(\theta)$ is the prior distribution of $\theta$, $p(x|\theta)$ is the likelihood function of the data $x$ given $\theta$, etc.
But in the case above, the data is $y_i:=B_{t_i}$ and the parameter is the sample path $B$, so we cannot deal with PDFs directly, since our prior is essentially the Wiener measure $\gamma$ on $C[0,1]$ with $f(0)=0$, so I am not sure but then the posterior measure ought to be something like
$$\beta(A|\vec{y}) \propto L(\vec{y}| A) \gamma(A),$$
for $A\subset \mathscr{B}(C_0[0,1])$ where $C_0[0,1]$ is space of continuous functions on $[0,1]$ with $f(0)=0$. But I have no idea how write down the likelihood function $L(\vec{y}|A)$ for observations $\vec{y}$ given a collection of sample paths $A$. Is this on the right track or is this nonsense? Thanks in advance for any comments, clarifications, or corrections.
 A: Using the Markov property of BM, we have
$$\begin{align}
\mathbb{E}\left(\int_0^1 B_t dt | B_{t_0}, B_{t_1}, \dotsc, B_{t_{n-1}}, B_{t_n}\right)  &= \sum_{i=1}^n \mathbb{E}\left(\int_{t_{i-1}}^{t_i} B_t dt | B_{t_0}, B_{t_1}, \dotsc, B_{t_{n-1}}, B_{t_n}\right)  \\
&= \sum_{i=1}^n \int_{t_{i-1}}^{t_i}\mathbb{E}\left( B_t | B_{t_0}, B_{t_1}, \dotsc, B_{t_{n-1}}, B_{t_n}\right)dt   \\
&= \sum_{i=1}^n \int_{t_{i-1}}^{t_i}\mathbb{E}\left( B_t | B_{t_{i-1}}, B_{t_i}\right)dt   \tag{1}\\
\end{align}$$
For $t_{i-1}<t<t_i$ with $i=1,...,n$ according to this result
$$B_t | B_{t_{i-1}}, B_{t_i} \stackrel{d}{=} \frac{t_i-t}{t_i-t_{i-1}}B_{t_{i-1}} +\frac{t-t_{i-1}}{t_i-t_{i-1}}B_{t_{i}} + Z$$
with $Z, B_{t_{i-1}},B_{t_{i}}$ are independent.
Then,
$$\mathbb{E}\left( B_t | B_{t_{i-1}}, B_{t_i}\right) = \frac{t_i-t}{t_i-t_{i-1}}B_{t_{i-1}} +\frac{t-t_{i-1}}{t_i-t_{i-1}}B_{t_{i}} \tag{2}$$
From $(1),(2)$, we have
$$\begin{align}
\mathbb{E}\left(\int_0^1 B_t dt | B_{t_0}, B_{t_1}, \dotsc, B_{t_{n-1}}, B_{t_n}\right)  &= \sum_{i=1}^n \int_{t_{i-1}}^{t_i}\left( \frac{t_i-t}{t_i-t_{i-1}}B_{t_{i-1}} +\frac{t-t_{i-1}}{t_i-t_{i-1}}B_{t_{i}}\right)dt\\
 &= \sum_{i=1}^n \left( \frac{t_i-t_{i-1}}{2}B_{t_{i-1}} +\frac{t_i-t_{i-1}}{2}B_{t_{i}}\right)\\
&= \frac{1}{2}\sum_{i=1}^n (t_i-t_{i-1})\left( B_{t_{i-1}} +B_{t_{i}}\right) \tag{3}\\
\end{align}$$
If the points $(t_i)_i^n$ satisfy  $t_i-t_{i-1} = h$ for all $i=1,...,n$, $(3)$ becomes your trapezoid sum.
