1 of 30

Chi-Squared Tests in Ecology

2 of 30

The Chi-Squared Test (χ2)

  • The chi-squared test is used to study differences between data sets.
  • It is only used for frequencies (counts), never for measurements.
  • It is used to compare an experimental result with an expected theoretical outcome.
  • It is not a valid test for small sample sizes (n<20)
  • It tests the validity of the null hypothesis: no difference between groups of data.
  • In ecology, chi-squared tests are used to study habitat preference.

3 of 30

Mangrove (Avicennia marina var. resinifera)

4 of 30

Mangroves are doing well in USA these days…

5 of 30

Mangrove forests vs shrimp farming

6 of 30

Pneumatophores�

  • Some plants have aerial roots – pneumatophores
  • These can come in handy in waterlogged soil where oxygen levels are very low…

7 of 30

Soil porosity is related to the average size of soil particles…

  • Larger particles, like sand, have larger spaces for air
  • Clay soils have very tiny particles, much smaller spaces for air

8 of 30

Experimental Design

  • 1 m x 1 m quadrats were placed around many mangroves in numerous locations.
  • Pneumatophores were counted.
  • Chi-squared test was use to compare observed results for pneumatophore density.
  • Null hypothesis: no difference in density between substrates (soils)

9 of 30

To calculate the expected values, we multiply the marginal total or each row by the marginal total of each column.

10 of 30

11 of 30

12 of 30

13 of 30

14 of 30

The Flat Periwinkle�(Littorina littoralis)

15 of 30

Periwinkles feed on a number of seaweed species

16 of 30

Food preference is a form of animal behavior

  • Using quadrats, the number of periwinkles associated with each seaweed species was recorded.

17 of 30

State your null hypothesis for this investigation (H0)

  • H0: There is no difference between the numbers of periwinkles associated with different species.

  • What is the alternative hypothesis (HA)?

  • HA : There is a real difference between numbers of periwinkles associated with different species.

18 of 30

Use the chi-squared test to determine if the observed differences are significant or if they can be attributed to chance alone.

Enter the observed values and calculate the chi-squared value

19 of 30

Here’s how you do it…

  • The expected value (E) would be the mean number of periwinkles associated with the four seaweed species.

20 of 30

Now Complete the Chart…

  • Calculate the degrees of freedom:
  • 4-1 = 3

21 of 30

Check your Chi-square table for 3 degrees of freedom.

  • 57.4 >> 7.82, 11.34
  • Is H0 accepted or rejected?
  • There is a significant difference in feeding preferences of periwinkles.

22 of 30

Woodlice (Pillbugs) Experiment

23 of 30

24 of 30

Category

O

E

O-E

(O-E)2

(O-E)2/E

Dry

15

25

-10

100

4

Humid

35

25

+10

100

4

Chi-squared value is 8 for 1DF

25 of 30

Chi-Square Homework Worksheet�

  • A marketing analyst wishes to see whether consumers have any preference among five flavors of a new fruit candy.

  • A random sample of 100 people provided the following data.

Flavor

Preference

Cherry

32

Strawberry

28

Orange

16

Lime

14

Grape

10

26 of 30

What is the null hypothesis? �

  • How do you calculate your expected value?
  • How many degrees of freedom do you have?

  • Show your chi-square calculations below, and state whether the null hypothesis is accepted or rejected.

27 of 30

Flavor

Preference

Cherry

32

Strawberry

28

Orange

16

Lime

14

Grape

10

28 of 30

A science teacher living in the desert noticed that native mesquite trees differed in terms of number of parasitic mistletoe plants they contained. Mesquite trees in residential neighborhoods tended to have fewer parasitic plants than trees found in undisturbed areas.�

  • RESEARCH QUESTION: Is there really more mistletoe in the undisturbed areas than in his neighborhood?
  • What is his hypothesis?

29 of 30

Mesquite and Mistletoe

30 of 30

Tree #

“wild” trees

Residential trees

1

26

6

2

11

8

3

16

1

4

9

0

5

3

0

6

14

0

7

5

3

8

8

3

9

14

3

10

15

1

Here is his data. Calculate the chi-squared value for the null hypothesis.