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

View source: R/testscontrasteshipotesis.R

MKV.testR Documentation

Z-test for the mean of a Normal variable with known population variance.

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

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

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 Nov. 14, 2023, 5:08 p.m.