3
$\begingroup$

I have a large sample of values, bounded in $[0, 1]$, divided into two conditions A and B, and I want to test the significance of one condition A having higher value than condition B.

For the details, these values are bootstrap scores for a given relationship (A or B) of species taxa in many different phylogenetic gene trees (i.e. A = taxon1 is sister to taxon2 VS B = taxon1 is sister to taxon3). I would like to set aside the fact that actual phylogenetic tests exist for this kind of question and come back to the case of a t-test for proportion values.

I feel that a t-test (Welch) for independent samples would not be valid, even if the sample is very large, because values are proportions (note: I don't have the original counts).

Indeed, on this forum many people suggested (here, here or here) not using T-test but something more appropriate like a generalized linear model, which was my intuition as well.

However, I could not answer: which assumption of either the Central Limit Theorem or of the Welch's T-test is violated by my dataset?

First, I reasoned by translating the T-test problem into the (I believe equivalent) linear regression problem, in which we would clearly violate the assumption of identically normally distributed residuals. My problem is that I still don't find what is violated in the T-test formulation. How are the assumptions related between these two formulations?

Indeed, it seems that with the Central Limit Theorem, the mean of many percentages would follow a normal distribution, thus the condition that the mean is normally distributed would hold; so the violated assumption has to be another one in the T-test. I saw that the $T$ variable

$$ T = \frac{Z}{\sqrt{U/k}} $$

requires that $Z$ and $U$ be independent to follow the Student distribution. Is it the assumption that is violated by a dataset of proportion values?

$\endgroup$
5
  • 2
    $\begingroup$ Because you have a "large" sample, a Z-test should work fine. But why not use an accurate Binomial proportion test instead? $\endgroup$
    – whuber
    Commented Mar 17, 2022 at 15:57
  • $\begingroup$ I don't have the original counts for the percentages, they would be required, right? $\endgroup$ Commented Mar 17, 2022 at 16:07
  • 5
    $\begingroup$ Yes. And because you don't have them, you're in a delicate situation, because potentially the variances of each of your values differ appreciably. This is likely an important piece of information to add to your question. $\endgroup$
    – whuber
    Commented Mar 17, 2022 at 17:02
  • $\begingroup$ The fact your data is proportions does completely preclude you from using a t-test. Technically the $T$ statistic is unbounded, however if your sample proportions are not too close to 0 or 1, and your sample size is large enough so the variance of your $T$ statistic is small, then the problem induced by the proportions needing to be between 0 and 1 should be very minimal. $\endgroup$ Commented Mar 21, 2022 at 16:54
  • 1
    $\begingroup$ Might be asymptotically okay, perhaps even for a specific sample size you have. But, there's no reason to use something that might be approximately okay, when you could just use something that we know is appropriate. $\endgroup$
    – Björn
    Commented Mar 23, 2022 at 0:21

2 Answers 2

2
+50
$\begingroup$

The answer is that, contrary to popular belief, the Welch (not Welsh) T-test kind of assumes equal variance of populations. Now, before you go crazy and think you were lied to, let me explain. A T-test only holds when the following are true:

  1. When the two populations have equal variances (in practice: similar variances).
  2. The distributions are perfectly normally distributed (In practice: The skewness must be small, or the sample size must be very large to make up for it).

Welch's T-test applies a correction to the regular t-test that makes violations of the first assumption practically unimportant when condition 1 is fulfilled. However, the Welch t-test, in theory, is still not exact unless condition 1 is fulfilled or the sample size is very large.

In theory, the Welch and regular T-tests have their assumption of equal variances violated when dealing with a binomial distribution, because a binomial distribution has a standard error equal to: $$\frac{\sqrt{p (1 - p)}}{\sqrt n}$$

Notice that this variance depends on $p$. Therefore, any change in $p$ technically invalidates any t-test, so a t-test can't be used.

But what if $n$ is really big? Well then, the variance hardly changes, because the variance is close to 0, and going from "Basically 0" to "Basically 0" is a change of, well, basically 0. So the fact that the variance changes a little is fine, because Welch's t-test is insensitive to small differences in variance (unlike the regular t-test).

$\endgroup$
2
  • $\begingroup$ I assume you meant "practically unimportant when condition 2 is fulfilled"? So Welch also works whatever the skew of the distributions, if large samples? We must then decide what is "large enough", but in short, with large samples the Welch is valid no matter what, if I understood. $\endgroup$ Commented Mar 24, 2022 at 10:05
  • $\begingroup$ No, Welch’s T-test only helps with the first problem. T-tests aren’t valid when the distribution is skewed, because they assume a normal distribution. $\endgroup$ Commented Mar 24, 2022 at 15:04
1
$\begingroup$

The proposed answer here assumes that, despite your data being bounded on [0,1], the means (average proportions) for each condition are not too close to either zero or one.

In brief, if your sample size is sufficiently large, then use of the Welsh t-test is acceptable. (And if the sample size is truly large enough, you probably won't notice a difference in the P-values between a 2 independent sample t-test and the Welsh t-test.)

So, the major concern is that your data (the proportions for varying sample sizes) is being drawn from potentially very non-normal distributions.

Here is a small bit of code that helps demonstrate this:

grp1 <- rep.int(NA,5000)
grp2 <- rep.int(NA,5000)

for(ctr in 1:5000) {
  grp1[ctr] <- sum(sample(c(0,1),50,replace=T))/50
  grp2[ctr] <- sum(sample(c(0,1),2000,replace=T))/2000
}

hist(c(grp1,grp2),breaks=100)

convolution of 2 binomial proportion distributions

In brief, what you see in this plot is two normal distributions on top of each other. As there is such a distribution for each different sample size, you can see why the "combination" of all of these possible distributions would result in a non-normal distribution. (Though, all the distributions would have the same mean, if not the same variance, and thus you would still have a relatively symmetric distribution.)

However, with large enough samples drawn from these non-normal distributions, the mean of the samples will follow a normal distribution (by the CLT). To clarify, the CLT requires the same sample size for the sampling distribution, but it is the population distribution that bears the burden of having different samples for each proportion calculated in this context. The sampling distribution would be based on the number of samples in conditions A and B (not the sample sizes used for the data collection process in each observation in each condition).

Thus, assuming you do indeed have sufficiently large enough samples, the Welsh t-test should be robust enough to provide a reasonable estimate for the P-value under a null hypothesis that the population means of the two conditions are the same.

$\endgroup$
6
  • $\begingroup$ Yes, my main problem is not sample size, rather non-normality (boundaries). Sorry, I do not understand the illustration: why simulating different proportion "granularity", but the same mean? I think I am already convinced that the mean of many such proportions (grp1[1], grp1[2], ...) will tend to be normal (CLT). However, I would like to understand what is wrong when applying a T-test on grp1 VS grp2, especially if we sample proportions closer to the boundaries. $\endgroup$ Commented Mar 23, 2022 at 8:59
  • $\begingroup$ To compare 2 groups using a null hypothesis test, we assume that the data from each condition come from a single population, and this population will have one mean. (This was the motivation for the quick simulation). But, the more important take-away from the simulation is that the population of sample proportions is not normal. Next, as you note, the means of these proportions would tend toward a normal distribution (citing the CLT). The last question is a whole new topic...at the boundary, there is far less variability. $\endgroup$
    – Gregg H
    Commented Mar 23, 2022 at 13:06
  • $\begingroup$ Thanks, I think being bounded is the main problem when applying the t-test, and I would like to know which of the t-test assumptions is incorrect with bounded values. Sorry if the question was not clear. $\endgroup$ Commented Mar 23, 2022 at 13:16
  • 1
    $\begingroup$ The main issue with the boundary is that the variance goes to zero as you approach the extremes. The t-test does assume equal variance between the groups, and if you have essentially zero variance in one group, it is hard to argue that the variance is the same for the other non-zero variance group. $\endgroup$
    – Gregg H
    Commented Mar 23, 2022 at 13:52
  • 1
    $\begingroup$ The Welsh test assumes that the sample sizes for the two group means are large enough that the lack of homoscedasticity (equal variance) is not an issue. However, while Welsh is more robust, it still has its limitations, too...and having one variance essential equal to zero for one group could potentially cause issues. $\endgroup$
    – Gregg H
    Commented Mar 23, 2022 at 15:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.