A biologist is studying the behavior of snails. As a part of this study, the biologist and his students used snails from a natural population to measure the distances (in cm) that snails travel per day.
A sample (m1) of 30 measurements in cm that snails traveled per day is obtained.
Generate the sample using the R codes below:
set.seed(12345678)
Z = rexp(30,0.01)
m1 = round(Z,1)
State the sample (m1) that you obtained.
Use these data to answer the following questions.
(a) Find the mean (?̅) and standard deviation (s) for the sample.
(b) Plot a box plot for the sample. What is the shape of the distribution? Is the distribution symmetrical or skewed? Does the distribution have a large spread? Explain.
(c) Test the hypothesis that the distances that snails traveled per day come from an exponential distribution with rate ?, using 0.05 level of significance. Use 1/?̅ as an estimate of ?.
(i) Group the data into 5 classes, with equal probabilities for each class. Thus, the expected value for each class will be 6.0. Use a chi-square goodnessof-fit test to test the hypothesis above and state your conclusion.
ii) A non-parametric test called the Kolmogorov-Smirnov goodness-of-fit test can also be used to decide if a sample comes from a specific continuous distribution. Explain about this test and use this test to test the hypothesis above. State your conclusion.
(iii) Compare your conclusion in parts (i) and (ii), is there any difference? Explain
set.seed(12345678)
Z = rexp(30,0.01)
m1 = round(Z,1)
a).
> mean(m1)
[1] 79.10333
> sd(m1)
[1] 77.58231
b). > boxplot(m1)
c).
> t.test(1/m1,mu = 0,alternative = "two.sided",conf.level = 0.95)
One Sample t-test
data: 1/m1
t = 1.6642, df = 29, p-value = 0.1068
alternative hypothesis: true mean is not equal to 0
(
is significant)
95 percent confidence interval:
-0.02098196 0.20425497
sample estimates:
mean of x
0.0916365
as = 1/mean, 1/m1 is the vector passed and mean of x = = 0.0092
Please rate my answer and comment for doubt.
Get Answers For Free
Most questions answered within 1 hours.