When does the expected value or variance of the $t$ statistic exist? The distribution of Student's $t$ statistic is known when the random variable $x$ follows a Normal distribution. Sometimes, however, we apply it to random variables drawn from other distributions. I am curious if there are known conditions, sufficient and necessary, that the expectation of the $t$ statistic, or its variance, are known to exist (i.e. be finite).
For example, in the extreme if $x$ were drawn from a Bernoulli distribution, there would be a non-zero probability the sample variance is zero, and thus $t$ is infinite or not defined, and the expectation of $t$ does not exist. So presumably "the sample variance is positive almost surely" is a necessary condition. I am looking for more conditions like this (and ones that are easier to check).

The case of independent and identical distributions for the variables $X_i$ in the sample
The (non-central) t-distribution is proportional to the distribution of the inverse of the tangent of the angle of the sample $\vec{x}$ with the diagonal line $x_1 = x_2 = \dots = x_n$.
$$t = \frac{\sqrt{n-1}}{\text{tan}(\theta)}$$
The problematic case is when this angle is 0 degrees in which case $\tan(\theta) = 0$ and the inverse is infinite.
Discrete distribution
In your example with a Bernoulli distribution you have a discrete distribution and there is a non-zero probability that $\theta = 0$, or that the sample $\vec{x}$ is on the diagonal line.
Whenever that probability is non-zero then the mean of $t$ (and other moments) will be infinite or undefined. This happens with any iid discrete sampling because there is a non-zero probability
$$P(X_1 = X_2 = \dots = X_n) = \sum_{\forall x} P(X=x)^n$$
Continuous distribution
One can imagine the distribution of the sample $\vec{x}$ projected onto a sphere of radius $1$ and see how it is distributed near the two points of the intersection with the diagonal.
For continuous distributions, the probability that $\theta = 0$ will be zero (unless you have fully correlated sample), but what also matters is how the density changes in the neighbourhood of $\theta = 0$.
For the expected value to be finite we need to have the second derivative of the distribution of $z = \tan(\theta)$ to be zero in the point $z=0$. Since
$$E[1/z] =  \int_{-\infty}^{0} \frac{1}{z} f(z) dz + \int_0^\infty \frac{1}{z} f(z) dz$$
...
To be continued I imagine that we can come up with some distribution that concentrates in one or more values such that for cases with $n = 3$ we do not have a finite mean (unlike the case of a normal distribution). Also when $X$ already has finite mean, then probably $t$ will have a finite mean as well.
