Proof verification: conditional distribution of integral of brownian motion I am looking to compute the conditional distribution of
$$S_T=\int_0^T W_t dt$$
given $W_T=x$. Thanks to this question and using the fact that $d(tW_t)=W_tdt + tdW_t$ by Itô's formula, we get
\begin{align*}
    W_t dt &= d(tW_t) - t dW_t\\
    S_T=\int_0^T W_t dt & = T W_T - \int_0^T t dW_t
\end{align*}
and hence $\mathbb{E}[S_T|W_T = x]= Tx$ because the second term is the stochastic integral of a deterministic process, which is normally distributed with mean 0. Furthermore,
\begin{alignat*}{2}
    \text{Var}(S_T|W_T=x) & = \text{Var}\left(Tx - \int_0^T t dW_t\right)\\
    &= \text{Var}\left(\int_0^T t dW_t\right)\\
    & = \mathbb{E}\left[\left(\int_0^T t dW_t\right)^2\right] &&\text{ null mean}\\
    &= \int_0^T t^2 dt &&\text{ isometry}\\
    & = \frac{T^3}{3}
\end{alignat*}
Is this correct?
 A: I provide details for the hint given by @NateEldredge in the comments.
First, by witnessing the random vector $(S_T, W_T)$ as the $L^2$-limit of Gaussian vectors, we note that $(S_T, W_T)$ itself is Gaussian. As you have observed, integration by parts gives us $$S_T = TW_T - \int_0^T s dW_s$$
From here, we get $E(S_T) = 0$ and
$$\begin{align*}
E(S_T^2) &= T^2 E(W_T^2) - 2T E \left(W_T \int_0^T s dW_s\right)  + E \left[\left(\int_0^T s dW_s\right)^2\right]  \\
&= T^3 - 2T E \int_0^T s ds + E \int_0^T s^2 ds \\
&= \frac{T^3}{3}
\end{align*}$$
where we use the Itô isometry to compute the second and third terms. Likewise, we have $E(W_T) = 0$, $E(W_T^2)=T$, and,
$$
\begin{align*}
E(S_T W_T) &= E \left(TW_T^2 - W_T \int_0^T sdW_s\right) =\frac{T^2}{2}
\end{align*}$$
Thus, $(S_T, W_T) \sim N (0, \Sigma)$ where
$$\begin{align*}
\Sigma &= \begin{pmatrix}
\frac{T^3}{3} & \frac{T^2}{2} \\
\frac{T^2}{2} & T
\end{pmatrix}
\end{align*}$$
It follows for the formula for bivariate normal distributions that
$$S_T | (W_T = x) \sim N \left( \frac{T}{2}x, \frac{T^3}{12} \right)$$
