# Trapani test ## Trapani test ::: incremental - Random variables $\left\{ x_i \right\}$ sampled from a distribution $f$ - Sample moments converge to $f$ moments - $H_0$: $\mu_k \longrightarrow + \infty$ - Statistic with 1 dof $\chi^2$ distribution - $p$-value $\rightarrow$ reject or accept $H_0$ ::: ## Infinite moments - Generate a sample $L$ from a Landau PDF - Generate a sample $M$ from a Moyal PDF . . . \vspace{20pt} :::: {.columns} ::: {.column width=50% .c} For the Landau PDF: \begin{align*} \mu_1 &= \text{E}\left[|x|\right] = + \infty \\ \mu_2 &= \text{E}\left[|x|^2\right] = + \infty \end{align*} ::: ::: {.column width=50%} . . . For the Moyal PDF: \begin{align*} \mu_1 &= \text{E}\left[|x|\right] < + \infty \\ \mu_2 &= \text{E}\left[|x|^2\right] < + \infty \end{align*} ::: :::: ## Infinite moments - Previous tests: points sampled from Landau PDF? . . . - Trapani test: check whether a moment is finite or infinite \begin{align*} \text{infinite} &\thus \text{Landau} \\ \text{finite} &\thus \text{not Landau} \end{align*} . . . - Compatibility test with $\mu_k = + \infty$ . . . - If points were sampled from a Cauchy distribution... ## Trapani test ![](images/cauchy-pdf.pdf) ## Trapani test - Start with $\left\{ x_i \right\}^N$ and compute $\mu_k$ as: $$ \mu_k = \frac{1}{N} \sum_{i = 1}^N |x_i|^k $$ . . . - Generate $r$ points $\left\{ \xi_j\right\}^r$ according to $G(0, 1)$ and define $\left\{ a_j \right\}^r$ as: $$ a_j = \sqrt{e^{\mu_k}} \cdot \xi_j \thus G\left( 0, \sqrt{e^{\mu_k}} \right) $$ . . . The greater $\mu^k$, the 'larger' $G\left( 0, \sqrt{e^{\mu_k}} \right)$ $$ \begin{cases} \mu_k \longrightarrow + \infty \\ r \longrightarrow + \infty \end{cases} \thus a_j \text{ distributed uniformly} $$ ## Trapani test - Define the sequence: $\left\{ \zeta_j (u) \right\}^r$ as: $$ \zeta_j (u) = \theta( u - a_j) \with \theta - \text{Heaviside} $$ . . . \begin{center} \begin{tikzpicture}[>=Stealth] % line \draw [line width=3, ->, cyclamen] (0,0) -- (10,0); \node [right] at (10,0) {$u$}; % tic \draw [thick] (5,-0.3) -- (5,0.3); \node [above] at (5,0.3) {$u_0$}; % aj tics \draw [thick, cyclamen] (1,-0.2) -- (1,0.2); \node [below right, cyclamen] at (1,-0.2) {$a_{j+2}$}; \draw [thick, cyclamen] (2,-0.2) -- (2,0.2); \node [below right, cyclamen] at (2,-0.2) {$a_j$}; \draw [thick, cyclamen] (5.2,-0.2) -- (5.2,0.2); \node [below right, cyclamen] at (5.2,-0.2) {$a_{j+2}$}; \draw [thick, cyclamen] (6,-0.2) -- (6,0.2); \node [below right, cyclamen] at (6,-0.2) {$a_{j+3}$}; \draw [thick, cyclamen] (8.5,-0.2) -- (8.5,0.2); \node [below right, cyclamen] at (8.5,-0.2) {$a_{j+4}$}; % notes \node [below] at (1,-1) {1}; \node [below] at (2,-1) {1}; \node [below] at (5.2,-1) {0}; \node [below] at (6,-1) {0}; \node [below] at (8.5,-1) {0}; \draw [thick, ->] (1,-0.5) -- (1,-1); \draw [thick, ->] (2,-0.5) -- (2,-1); \draw [thick, ->] (5.2,-0.5) -- (5.2,-1); \draw [thick, ->] (6,-0.5) -- (6,-1); \draw [thick, ->] (8.5,-0.5) -- (8.5,-1); \end{tikzpicture} \end{center} . . . If $a_j$ uniformly distributed: - $\zeta_j (u)$ Bernoulli PDF with $P\left( \zeta_j (u) = 1 \right) = \frac{1}{2}$ $\hence \text{E}[\zeta_j]_j = \frac{1}{2} \quad \wedge \quad \text{Var}[\zeta_j]_j = \frac{1}{4}$ ## Trapani test - Define the function $\vartheta (u)$ as: $$ \vartheta (u) = \frac{2}{\sqrt{r}} \left[ \sum_{j} \zeta_j (u) - \frac{r}{2} \right] $$ . . . If $a_j$ uniformly distributed, for the CLT: $$ \sum_j \zeta_j (u) \hence G \left( \frac{r}{2}, \frac{\sqrt{r}}{2} \right) \thus \vartheta (u) \hence G \left( 0, 1 \right) $$ . . . - Test statistic: $$ \Theta = \int_{\underbar{u}}^{\bar{u}} du \, \vartheta^2 (u) \psi(u) $$ ## Trapani test According to L. Trapani [@trapani15]: - $r = o(N) \hence r = N^{0.75}$ - $\underbar{u} = -1 \quad \wedge \quad \bar{u} = 1$ - $\psi(u) = \frac{1}{\bar{u} - \underbar{u}} \, \chi_{[\underbar{u}, \bar{u}]}$ . . . $\mu_k$ must be scale invariant for $k > 1$: $$ \mu_k^* = \frac{\mu_k}{ \left( \mu_{\phi} \right)^{k/\phi} } \with \phi \in (0, k) $$ ## Trapani test If $\mu_k < + \infty \hence \left\{ a_j \right\}$ are not uniformly distributed \vspace{20pt} Rewriting: $$ \vartheta (u) = \frac{2}{\sqrt{r}} \left[ \sum_{j} \zeta_j (u) - \frac{r}{2} \right] = \frac{2}{\sqrt{r}} \sum_{j} \left[ \zeta_j (u) - \frac{1}{2} \right] $$ \vspace{20pt} . . . Residues become very large $\hence$ $p$-values decreases.