# DMKV.test: Z-test for the difference of means of two independent Normal... In RcmdrPlugin.TeachStat: R Commander Plugin for Teaching Statistical Methods

## Description

Under the assumption that the data come from two independent Normal distributions, it performs the hypothesis test and the confidence interval for the difference of means with known population variances.

## Usage

 ```1 2 3``` ```DMKV.test(x, y, difmu = 0, sdx, sdy, alternative = c("two.sided", "less", "greater"), conf.level = 0.95, ...) ```

## Arguments

 `x` numerical vector (non-empty) that contains the data of the first sample. `y` numerical vector (non-empty) containing the data of the second sample. `difmu` numeric value indicating the value of the difference in population means between the two samples. `sdx` numerical value indicating the population standard deviation of the first sample, which is assumed to be known (mandatory). `sdy` numeric value indicating the population standard deviation of the second sample, which is 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"` containing the following components:

 `statistic` the value of the test statistic. `parameter` sample lenghts and population standard deviations. `p.value` the p-value for the test. `conf.int` intervalo de confianza para la diferencia de medias con varianzas poblacionales conocidas asociado a la hiptesis alternativa especificada. `estimate` the estimated difference in means. `null.value` the specified hypothesized value of the mean difference. `alternative` a character string describing the alternative hypothesis. `method` a character string indicating what type of statistical method was performed. `data.name` a character string giving the name(s) of the data.

`t.test`
 ```1 2 3 4 5 6 7 8``` ```data(cars93) # Data set provided with the package # Maximum price difference (MaxPrice) in means between cars manufactured in the # US and those manufactured outside, assuming that the variances are known and # equal to 64 and 169, respectively var1<-subset(cars93, USA=="nonUS", select=MaxPrice) var2<-subset(cars93, USA=="US", select=MaxPrice) DMKV.test(var1, var2, sdx=13, sdy=8, difmu=0, alternative="greater", conf.level=0.95) ```