library(nonpar)
x = c(1.8, 3.3, 5.65, 2.25, 2.5, 3.5, 2.75, 3.25, 3.10, 2.70, 3, 4.75, 3.4)
signtest(x, m = 3.5, alpha = 0.05, alternative = 'two.sided',
conf.level = 0.95, exact = TRUE)
##
## Large Sample Approximation for the Sign Test
##
## H0: The population median is = 3.5
## HA: The population median is not equal to 3.5
##
## B = 10
##
## Significance Level = 0.05
## The p-value is 0.043308142810792
## There is enough evidence to conclude that the population median is different than 3.5 at a significance level of 0.05
##
## The 95 % confidence interval is [ 2.25 , 3.3 ].
##