MKV.test: Z-test for the mean of a Normal variable with known...

Description Usage Arguments Value See Also Examples

View source: R/testscontrasteshipotesis.R

Description

Under the assumption that the data come from a Normal distribution, it makes the hypothesis testing and the confidence interval for the mean with known population variance.

Usage

1
2
MKV.test(x, mu = 0, sd, alternative = c("two.sided", "less", "greater"),
         conf.level = 0.95, ...)

Arguments

x

a (non-empty) numeric vector of data values.

mu

a number indicating the true value of the mean - Null hypothesis.

sd

numerical value indicating the population standard deviation assumed to be known (mandatory).

alternative

a character string specifying the alternative hypothesis, must be one of "two.sided" (default), "greater" or "less". You can specify just the initial letter.

conf.level

confidence level of the interval.

...

further arguments to be passed to or from methods.

Value

A list with class "htest" l containing the following components:

statistic

the value of the test statistic.

parameter

sample length, population standard deviation and sample standard deviation.

p.value

the p-value for the test.

conf.int

a confidence interval for the mean appropriate to the specified alternative hypothesis.

estimate

the estimated mean.

null.value

the specified hypothesized value of the mean.

alternative

a character string describing the alternative hypothesis.

method

a character string indicating what type of statistical test was performed.

data.name

a character string giving the name of the data.

See Also

t.test

Examples

1
2
3
4
data(cars93) # Dataset provided with the package
# Mean maximum price (MaxPrice) less than 20 thousand $ assuming that the 
# variance is known and equal to 11
MKV.test(cars93$MaxPrice, sd=11, alternative="less", mu=20, conf.level=0.95)

RcmdrPlugin.TeachStat documentation built on Jan. 13, 2021, 7:54 p.m.