Statistical test for distribution as a function of time?

SLAM: debunk creationism, pseudoscience, and superstitions. Discuss logic and morality.

Moderator: Alyrium Denryle

Post Reply
User avatar
Fire Fly
Jedi Council Member
Posts: 1608
Joined: 2004-01-06 12:03am
Location: Grand old Badger State

Statistical test for distribution as a function of time?

Post by Fire Fly »

Let us say that we want to run a little experiment on some insect. You have a tube that is partitioned into four quarters and the insects are randomly distributed at time 0. You add volatile chemical A and count the number of insects in each quarter of tube every 1 minute for 10 minutes. You do the same for volatile chemical B and when you observe the insects with no volatile chemical, there is randomness. Is there a statistical test to determine if there is a statistical significance between A/B, A/random, and B/random? Keep in mind that the insects are free to move back and forth at any given time. In the hypothetical graph below, hypothetical data is presented for the quarter of tube that is furthest away from the chemical source (each curve represents N replicates).

Image

I've been asking my stats friends this question and apparently they can't be entirely sure. Does anyone here know if such a test exists?
User avatar
Eris
Jedi Knight
Posts: 541
Joined: 2005-11-15 01:59am

Re: Statistical test for distribution as a function of time?

Post by Eris »

You have here a categorical independent variable (Chem A, B, control) with an ordinal outcome (distance from chemical, ranked in 1st, 2nd, 3rd, 4th quadrant). You effectively have more than one category in the independent, so a Kruskal-Wallis test would be appropriate, I think.

That would preserve the orderedness of your outcome, but if you felt lazy because K-W is not exactly well known, you can treat the outcome as categorical and do a 3x4 contingency table on it. You'd have to be careful in interpreting that, though, since you know there's an inherent ordering, so you'd have to couch any explanation in those terms. Also you might have some oddness if in some cases you end up with zeroes in the cells due to the insects completely abandoning certain quadrants, something that is likely to happen if that graph is something you might seriously expect to see.

If you really must control for time, you can just throw it in either as a modifying effect, or have each measurement be an individual population. I don't particularly recommend that, though. This frankly sounds like you just need one observation at the end point, and compare the three categories. Because the only way you really should look at time is if you follow each insect individually, so the observations can be paired. Time isn't as much used per se except in survival analysis, which this is not appropriate for since that's all time till event, or for looking at pair observations for pre and post tests and the like. In this case, it looks more like you'll be interested in comparing categories at an end point, and you won't gain much more out of temporal ordering, since the entire thing should reach an equilibrium at some point. Run it till then and compare categories. The rest is all fluff.
"Hey, gang, we're all part of the spleen!"
-PZ Meyers
User avatar
Alyrium Denryle
Minister of Sin
Posts: 22224
Joined: 2002-07-11 08:34pm
Location: The Deep Desert
Contact:

Re: Statistical test for distribution as a function of time?

Post by Alyrium Denryle »

Eris is just... wrong.

If you do not need to control for time, a simple Chi Squared Test will work. However, given that you DO need to deal with time:

The statistical test you are looking for is called a Repeated Measures Analysis of Variance. It is available through most statistical software packages including SYSTAT and SPSS, as well as SAS, and there more complicated (but more powerful) methods available using R if you are familiar with the coding. You can do this as a two-way design, with the chemical and each quarter of your tube as independent variables, and the number of insects as independent.
GALE Force Biological Agent/
BOTM/Great Dolphin Conspiracy/
Entomology and Evolutionary Biology Subdirector:SD.net Dept. of Biological Sciences


There is Grandeur in the View of Life; it fills me with a Deep Wonder, and Intense Cynicism.

Factio republicanum delenda est
User avatar
Eris
Jedi Knight
Posts: 541
Joined: 2005-11-15 01:59am

Re: Statistical test for distribution as a function of time?

Post by Eris »

I'm not quite sure where your assertion comes from, since we more or less are saying the same thing. If time is not controlled for, then a chi-square is a contingency table.

As for the use of repeated ANOVA vs K-W, I would be interested to hear your reasoning. I will be the first to admit, my field usually lies outside of this, so I could be wrong, but I'm not sure you appreciate how close our recommendations are, so the vehemence of your condemnation surprised me. You offered a matched parametric test, while I offered the unmatched non-parametric version of the same thing, in essence.

Now, I may concede on the matching, as I'll have to think about exactly how to go through with this, especially if we want to include timed measurements, but you have here a natural ordinal dataset. I would be fairly uncomfortable advising a parametric test in that case, but perhaps your reasoning is different? Even if we go matched in that case, you don't want repeated ANOVA, but the Friedman test, as the parametric version can present problems later on.

Perhaps you could give your reasoning? I'm genuinely curious why you would go with that, in this case. I do public health principally, so I might be missing out, but the test logic is usually pretty similar cross-field. I'm genuinely curious what we're doing differently.
"Hey, gang, we're all part of the spleen!"
-PZ Meyers
Post Reply