{'fraction_non_alphanumeric': 0.025, 'fraction_numerical': 0.0171875, 'mean_word_length': 4.876146788990826, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Testing the Conditional Mean Independence for Functional Data

We propose a new nonparametric conditional mean independence test for a response variable Y and a predictor variable X where either or both can be function-valued. Our test is built on a new metric, the so-called functional martingale difference divergence (FMDD), which fully characterizes the conditional mean dependence of Y given X and extends the MDD proposed in Shao and Zhang (2014). We define an unbiased estimator of FMDD by using a U-centering 20 approach, and obtain its limiting null distribution under mild assumptions. Since the limiting null distribution is not pivotal, we adopt the wild bootstrap method to estimate the critical value and show the consistency of the bootstrap test. Our test can detect the local alternative which approaches the null at the rate of n−1/2 with a nontrivial power, where n is the sample size. Unlike the recent three tests developed by Kokoszka et al (2008), Lei (2014), and Patilea et al. 25 (2016), our test does not require a finite dimensional projection nor assume a linear model, and it does not involve any tuning parameters. Promising finite sample performance is demonstrated via simulations and a real data illustration in comparison with the existing tests.