In: Math
1) (from Samuels and Witmer, 2003) If you walk toward a squirrel that is on the ground, it will eventually run to the nearest tree for safety. A researcher wondered whether he could get closer to the squirrel than the squirrel was to the nearest tree before the squirrel would start to run. Thus, for each studied squirrel he recorded the distance from person-to-squirrel and the distance from squirrel-to-tree, at the moment when the squirrel started to run. The measurements are in the txt file on the web. Conduct statistical test to determine if there is a difference between person-to-squirrel and squirrel-to-tree distances (use α=0.05). For the test do the following:
a) Explain whether you will do a test for independent samples or a test for paired samples.
b) Explain whether you will do a 1-tailed or a 2-tailed test.
c) What is the assumption for this statistical test? Is it met?
Show 2 different indicators that you used for checking assumptions (you can do this part in either SAS or R and show only the outputs from either SAS or R). Comment on what each indicator tells you about the assumption.
d) Conduct the test you decided on in
parts a) and b) by hand. Show:
Null hypothesis:
Research Hypothesis:
Value of Test Statistic:
Critical Value:
Conclusion:
e) Use SAS and R to conduct the test you decided on in parts a) and b)
What is the p-value for your test?
Explain how you used p-value to reach conclusion.
squirrelID TypeOfDistance y
1 fromPerson 81
2 fromPerson 178
3 fromPerson 202
4 fromPerson 325
5 fromPerson 238
6 fromPerson 120
7 fromPerson 240
8 fromPerson 326
9 fromPerson 60
10 fromPerson 119
11 fromPerson 189
12 fromPerson 79
13 fromPerson 180
14 fromPerson 200
15 fromPerson 330
16 fromPerson 240
17 fromPerson 132
18 fromPerson 242
19 fromPerson 328
20 fromPerson 55
21 fromPerson 121
1 fromTree 137
2 fromTree 34
3 fromTree 51
4 fromTree 150
5 fromTree 54
6 fromTree 236
7 fromTree 45
8 fromTree 293
9 fromTree 277
10 fromTree 83
11 fromTree 81
12 fromTree 47
13 fromTree 233
14 fromTree 42
15 fromTree 31
16 fromTree 290
17 fromTree 51
18 fromTree 48
19 fromTree 80
20 fromTree 274
21 fromTree 134
a) Explain whether you will do a test for independent samples or a test for paired samples.
We will use an independent samples t-test. Although the distance is measured from squirrel to tree and Person. Paired sample t-test is used when we apply some treatment to the subject and then take the second measurement, while we had taken the first measurement before the treatment.
b) Explain whether you will do a 1-tailed or a 2-tailed test.
We will use a 2-tailed test as the alternate hypothesis is neutral. There is no claim to counter-argument against.
c) What is the assumption for this statistical test? Is it met?
Show 2 different indicators that you used for checking assumptions (you can do this part in either SAS or R and show only the outputs from either SAS or R). Comment on what each indicator tells you about the assumption.
Dist from Tree is little deviating from the line.
USING R
t.test(fromPerson$y,fromTree$y,alternative = "two.sided",paired = FALSE,var.equal = TRUE,conf.level = 0.95)
P-value =0.036< 0.05 alpha, level of confidence. We reject H0