mean_test1 {OneTwoSamples} | R Documentation |
Two sided or one sided test of hypothesis of mu
of one normal sample
Description
Compute the two sided or one sided test of hypothesis of mu
of one normal sample when the population variance is known or unknown.
Usage
mean_test1(x, mu = 0, sigma = -1, side = 0)
Arguments
x |
A numeric vector. |
mu |
|
sigma |
The standard deviation of the population. |
side |
A parameter used to control two sided or one sided test of hypothesis. When inputting |
Value
A data.frame with variables:
mean |
The sample mean. |
df |
The degree of freedom. |
statistic |
The statistic, when |
p_value |
The P value. |
Author(s)
Ying-Ying Zhang (Robert) robertzhangyying@qq.com
References
Zhang, Y. Y., Wei, Y. (2013), One and two samples using only an R funtion, doi:10.2991/asshm-13.2013.29.
Examples
x=rnorm(10, mean = 1, sd = 0.2); x
mean_test1(x, mu = 1, sigma = 0.2, side = 1)
mean_test1(x, mu = 1)