3
$\begingroup$

I want to know if I'm choosing the right statistical test for my situation.

Description:

In a production process there are several places where wastewater is created (lets call these "spots", spot 1,2 and 3). At every spot 1 sample of water is taken (so we have a sample for 1 spot a, a sample for spot 2, and a sample for spot 3).

Now we take these samples back to the lab. For each sample we will change the acidity of the water from 0 to 14 with a step of 0.5 (ph) (thus giving us 28 samples at different acidity per spot). At each of these acidity levels (ph levels) we measure the distribution of elements in the water (e.g.: In the water sample we gathered at spot 1 at an acidity level of 1.5 ph we measure there is 60% of component A, 20% of component B, 15% of component C and 5% of component D).

Question

Now what I want to know is if there is a difference between the distributions for every spot (spot 1,2 and 3). So I though of using a heteroscedastic 2 tailed t-test. For example I have this data:

+----------------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-------+-------+-------+-------+-------+-------+----+------+----+
|     Spots      |   0     |  0,5   |   1    |  1,5   |   2    |  2,5   |   3    |  3,5   |   4    |  4,5   |   5    |  5,5   |   6    |  6,5   |   7    |  7,5   |   8    |  8,5   |   9    |  9,5   |  10   | 10,5  |  11   | 11,5  |  12   | 12,5  | 13 | 13,5 | 14 |
+----------------+---------+---------+---------+---------+---------+---------+---------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-------+-------+-------+-------+-------+-------+----+------+----+
| Comp A, Spot 1 | 99,735% | 99,565% | 99,138% | 98,772% | 98,599% | 98,536% | 98,514% | 98,506% | 98,502% | 98,498% | 98,483% | 98,449% | 98,373% | 98,144% | 97,434% | 95,246% | 88,844% | 72,745% | 44,856% | 19,368% | 6,802% | 2,229% | 0,715% | 0,228% | 0,074% | 0,025% |  0% |    0% |  0% |
| Comp A, Spot 2 | 99,753% | 99,618% | 99,291% | 99,023% | 98,9%   | 98,854% | 98,839% | 98,833% | 98,83%  | 98,827% | 98,813% | 98,783% | 98,711% | 98,492% | 97,811% | 95,71%  | 89,55%  | 73,961% | 46,416% | 20,369% | 7,192% | 2,358% | 0,756% | 0,241% | 0,078% | 0,026% |  0% |    0% |  0% |
+----------------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-------+-------+-------+-------+-------+-------+----+------+----+

There are 2 rows of values. A row represents the amount of that element in percentage at a certain acidity level of a spot.

I would then do this t-test between "Comp A, Spot 1" and "Comp A, Spot 2" to see if there is a significant different between these two series.

I would do this test for every component at every stream for the different ph values. Is this a good idea ? I chose a heteroscedastic 2 tailed t-test because the samples come from different populations and I can't assume that the variance is the same, so that cancels out the paired t-test and the homoscedastic t-test.

$\endgroup$

1 Answer 1

1
$\begingroup$

While you could do this (it might be reasonable in very large samples), I don't think this makes as much sense a model that takes into account the fact that these are (continuous) proportions.

Not only do you have heteroskedasticity, with proportions (as in your example) very close to 1 (or to 0) they'll also be highly skewed (e.g. the individual values can't exceed 100%, but for a value close to 100%, they could easily be more than that distance the other side of the mean). High skewness can have a bad impact on t-tests.

The skewness and variance will both be related to the mean.

A beta model is an example of a model can deal with such effects; there are packages that will do beta regression. If there are exact 1's or 0's you may need 0- or 1-inflated beta models instead.

As it happens, the variance in a beta is proportional to the product of the proportion and its complement. This suggests that if beta regression is unavailable, you might consider a quasi-binomial GLM, which has the same variance function ... though I would perhaps avoid it if there are any exact 1's or 0's.

There are a number of posts here that discuss beta regression.

Constructing a suitable model for the way the samples at a spot might be dependent may be somewhat more involved - I'm not clear enough on what your situation is to make good suggestions on that score.

$\endgroup$

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.