  We study the problem of testing the null hypothesis that X and Y are
conditionally independent given Z, where each of X, Y and Z may be functional
random variables. This generalises, for example, testing the significance of X
in a scalar-on-function linear regression model of response Y on functional
regressors X and Z. We show however that even in the idealised setting where
additionally (X, Y, Z) have a non-singular Gaussian distribution, the power of
any test cannot exceed its size. Further modelling assumptions are needed to
restrict the null and we argue that a convenient way of specifying these is
based on choosing methods for regressing each of X and Y on Z. We thus propose
as a test statistic, the Hilbert-Schmidt norm of the outer product of the
resulting residuals, and prove that type I error control is guaranteed when the
in-sample prediction errors are sufficiently small. We show this requirement is
met by ridge regression in functional linear model settings without requiring
any eigen-spacing conditions or lower bounds on the eigenvalues of the
covariance of the functional regressor. We apply our test in constructing
confidence intervals for truncation points in truncated functional linear
models.
