# Example 2: Habitat selection (ecology)

You have just returned from a 3 year stint in the jungles western Africa, where you studied the habitat selected by the native bee eaters (a family of birds that specialize in catching bees and wasps on the wing, taking them to a perch, bashing their stingers out, and devouring them. In a pinch, they will eat other flying or hopping insects, such as grasshoppers). Three habitats were available to the bee eaters:

 habitat Jungle Grassland Fields % of area 75% 10% 15%

Here's where you observed birds:

 habitat Jungle Grassland Fields # of birds 86 3 11

Is there evidence that birds prefer jungle habitat over grassland or fields? See if you can set this test up and interpret it on your own. Below is an excerpt from the chi-square table:

### Click below for hints if you need them.

(To make this problem interactive, turn on javascript!)

• What should the rows be?: There are three types of habitat in which birds
were observed. Each of these should be a row in the table. That also means
you have 3-1 = 2 degrees of freedom for your test.

• What should the expected values be?: Your null hypothesis is that birds are
distributed randomly -- so 75% should be in the jungle, etc. Since there were
100 birds observed altogether, this makes 75 in the jungle, etc.

• How do I interpret the calculated chi-square?: Since df=2, if your
chi-square-calc is bigger than 5.99, then you have to reject the null hypothesis
of random locations -- meaning that the birds prefer some habitats over others.