In: Statistics and Probability
As our planet warms, the change in temperature will have major effects on life. One of the possibilities for what might happen to a species is that species can move closer to the poles so that it experienced temperatures closer to what it has experienced in the past. A recent study of the range of limits of European butterflies found that, of 24 species that had changed their ranges in the last 100 years, 22 of them had moved further north and only two had moved further south. Assume that these 24 species are a random sample of butterfly species. Conduct a binomial test to test the hypothesis that the fraction of butterfly species moving north is different from the fraction moving south.
H0:probability of success p=0.916 or the fraction of butterfly species moving north is different from the fraction moving south.
H1:probability of success p0.916 the fraction of butterfly species moving north is not different from the fraction moving south.
X=no of butterflies moving further north
p=22/24=0.916
q=2/24=0.083(1-p)
> binom.test(12,24,p=0.916,alternative="two.sided")
Exact binomial test
data: 12 and 24
number of successes = 12, number of trials = 24, p-value =
1.271e-07
alternative hypothesis: true probability of success is not equal to
0.916
95 percent confidence interval:
0.2912418 0.7087582
sample estimates:
probability of success
0.5
p-value = 1.271e-07<0.05(null hypothesis rejected)
so,we reject the null hypothesis,hence,H1:probability of success p0.916 the fraction of butterfly species moving north is not different from the fraction moving south.
P(X>22)=P(x=23)+P(x=24)
P(X>22)= >
dbinom(23,24,prob=0.916)+dbinom(24,24,prob=0.916)
[1] 0.3897264
please rate my answer and comment for doubts.