In: Statistics and Probability
Chapter 4, Section 3, Exercise 116 Lizards and Invasive Fire Ants This exercise addresses lizard behavior in response to fire ants. The red imported fire ant, Solenopsis invicta, is native to South America, but has an expansive invasive range, including much of the southern United States (invasion of this ant is predicted to go global). In the United States, these ants occupy similar habitats as fence lizards. The ants eat the lizards and the lizards eat the ants, and in either scenario the venom from the fire ant can be fatal to the lizard. A study explored the question of whether lizards learn to adapt their behavior if their environment has been invaded by fire ants. The researchers selected lizards from an uninvaded habitat (eastern Arkansas) and lizards from an invaded habitat (southern Alabama, which has been invaded for more than 70 years) and exposed them to fire ants. They measured how long it takes each lizard to flee and the number of twitches each lizard does. The data are stored in FireAnts. If lizards adapt their behavior to the fire ants, then lizards from the invaded habitats should flee from the fire ants faster than lizards from the uninvaded habitats. Test this hypothesis. Time to flee is measured in seconds, and lizards taking more than a minute to flee have recorded responses of 61 seconds. Let group 1 be lizards from invaded habitats and let group 2 be lizards from uninvaded habitats.
(b) Use StatKey or other technology to compute the p-value.
Round your answer to three decimal places.
p-value = ?
I have used R to answer the question. Other technologies are
permitted as per the question. The code is:
> library(Lock5Data)
> attach(FireAnts)
The following objects are masked from FireAnts (pos = 3):
Flee, Habitat, Twitches
The following objects are masked from FireAnts (pos = 4):
Flee, Habitat, Twitches
The following objects are masked from FireAnts (pos = 5):
Flee, Habitat, Twitches
The following objects are masked from FireAnts (pos = 6):
Flee, Habitat, Twitches
The following objects are masked from FireAnts (pos = 7):
Flee, Habitat, Twitches
The following objects are masked from FireAnts (pos = 8):
Flee, Habitat, Twitches
The following objects are masked from FireAnts (pos = 9):
Flee, Habitat, Twitches
The following objects are masked from FireAnts (pos = 10):
Flee, Habitat, Twitches
The following objects are masked from FireAnts (pos = 11):
Flee, Habitat, Twitches
> data=FireAnts
> group1=data[Habitat=="Invaded",]
> group2=data[Habitat=="Uninvaded",]
> t.test(group1$Flee,group2$Flee,)
Welch Two Sample t-test
data: group1$Flee and group2$Flee
t = -4.6686, df = 76.413, p-value = 6.357e-06
alternative hypothesis: true difference in means is less than
0
95 percent confidence interval:
-Inf -12.96358
sample estimates:
mean of x mean of y
26.725 46.875
Thus, the p-value for the test is 6.357e-06 =0.0157 =0.016
The dataset taken is:
> data
Habitat Twitches Flee
1 Invaded 0 1
2 Invaded 1 3
3 Invaded 1 5
4 Invaded 2 5
5 Invaded 1 6
6 Invaded 1 6
7 Invaded 3 6
8 Invaded 4 7
9 Invaded 4 7
10 Invaded 6 8
11 Invaded 2 9
12 Invaded 4 9
13 Invaded 0 10
14 Invaded 3 11
15 Invaded 2 12
16 Invaded 3 13
17 Invaded 3 14
18 Invaded 2 17
19 Invaded 7 18
20 Invaded 2 21
21 Invaded 3 21
22 Invaded 5 23
23 Invaded 1 25
24 Invaded 1 29
25 Invaded 4 30
26 Invaded 7 33
27 Invaded 7 36
28 Invaded 2 38
29 Invaded 7 39
30 Invaded 2 40
31 Invaded 7 42
32 Invaded 2 46
33 Invaded 4 52
34 Invaded 0 61
35 Invaded 0 61
36 Invaded 0 61
37 Invaded 0 61
38 Invaded 1 61
39 Invaded 2 61
40 Invaded 4 61
41 Uninvaded 0 54
42 Uninvaded 0 13
43 Uninvaded 0 14
44 Uninvaded 0 20
45 Uninvaded 0 40
46 Uninvaded 0 61
47 Uninvaded 0 61
48 Uninvaded 0 61
49 Uninvaded 0 61
50 Uninvaded 0 61
51 Uninvaded 0 61
52 Uninvaded 0 61
53 Uninvaded 0 61
54 Uninvaded 0 61
55 Uninvaded 0 61
56 Uninvaded 0 61
57 Uninvaded 0 61
58 Uninvaded 0 61
59 Uninvaded 0 61
60 Uninvaded 0 61
61 Uninvaded 0 61
62 Uninvaded 0 61
63 Uninvaded 0 61
64 Uninvaded 1 10
65 Uninvaded 1 17
66 Uninvaded 1 47
67 Uninvaded 1 55
68 Uninvaded 1 56
69 Uninvaded 1 61
70 Uninvaded 2 23
71 Uninvaded 2 32
72 Uninvaded 3 15
73 Uninvaded 3 25
74 Uninvaded 3 41
75 Uninvaded 3 43
76 Uninvaded 3 50
77 Uninvaded 3 61
78 Uninvaded 4 27
79 Uninvaded 6 32
80 Uninvaded 6 41
I hope this clarifies your doubt. If you're satisfied with the
solution, hit the Like button. For further
clarification, comment below. Thank You. :)