PDA

View Full Version : chi-square with small sample size



fishystats
05-19-2011, 10:39 PM
I want to test whether fish prefer rocky habitat over flat habitat. The study site is 5% rocky and 95% flat. I found 6 fish in rocky habitat and 2 fish in flat habitat after sampling 100% of the study site.

If I do a chi-square, the expected number of fish in rocky habitat would be 0.4 (= 5% x 8 fish). The expected number of fish in flat habitat would be 7.6 (= 95% x 8 fish).

But I can't do chi-square since the expected number of fish is below 5. What test can I use?

bugman
05-20-2011, 04:16 AM
Its a pretty small sample, but you could try a Fishers exact test.

fishystats
05-20-2011, 05:43 AM
I thought Fisher's Exact Test only allows for situations where "expected" is 50% times sample size (i.e. null hypothesis = 4 fish)? How do I do it when expected is 5% and 95% times sample size (i.e. null hypothesis = 0.4 and 7.6 fish)?

marchhare
05-20-2011, 10:24 AM
I doubt you will be able to get much out of any analysis with such a small sample. I would consider collecting more data (hopefully there are more than 8 fish in the sample site)

fishystats
05-20-2011, 11:41 AM
How about this:

http://udel.edu/~mcdonald/statrand.html

It says I need three or more variables, but I can do that if I need to by breaking up my habitat analysis into greater detail (e.g. rocky habitat, vegetated habitat, unstructured habitat).

Dason
05-20-2011, 12:11 PM
If I understand you correctly what you're really trying to do is test whether the number of fish in each habitat is proportional to the distribution of the habitats? So if this were true you would expect that out of all the fish in the study that 5% would be from the rocky habitat correct? You essentially just have binomial data at this point (In rocky habitat or not in rocky habitat) since you only have two habitats. An exact binomial test of proportion could work here. Using R:



> binom.test(6, 8, 0.05)

Exact binomial test

data: 6 and 8
number of successes = 6, number of trials = 8, p-value = 4.008e-07
alternative hypothesis: true probability of success is not equal to 0.05
95 percent confidence interval:
0.3491442 0.9681460
sample estimates:
probability of success
0.75

That's a small p-value.

fishystats
05-20-2011, 12:24 PM
Thank you Dason! That is what I have been looking for.