R Console Page 1
> mpg
[1] 21.0 21.0 22.8 21.4 18.7 18.1 14.3 24.4 22.8 19.2 17.8
16.4 17.3 15.2 10.4 10.4
[17] 14.7 32.4 30.4 33.9 21.5 15.5 15.2 13.3 19.2 27.3 26.0
30.4 15.8 19.7 15.0 21.4
> [Link](mpg,mu=25,alternative='[Link]')
One Sample t-test
data: mpg
t = -4.6079, df = 31, p-value = 6.587e-05
alternative hypothesis: true mean is not equal to 25
95 percent confidence interval:
17.91768 22.26357
sample estimates:
mean of x
20.09062
> disp
[1] 160.0 160.0 108.0 258.0 360.0 225.0 360.0 146.7 140.8 1
67.6 167.6 275.8 275.8
[14] 275.8 472.0 460.0 440.0 78.7 75.7 71.1 120.1 318.0 3
04.0 350.0 400.0 79.0
[27] 120.3 95.1 351.0 145.0 301.0 121.0
> [Link](disp,mu=25,alternative='[Link]')
Wilcoxon signed rank test with continuity correction
data: disp
V = 528, p-value = 8.311e-07
alternative hypothesis: true location is not equal to 25
Warning message:
In [Link](disp, mu = 25, alternative = "[Link]
ed") :
cannot compute exact p-value with ties
>