Description Usage Arguments Value Examples
Performs z test for samples and sample proportions on vector values
1 2 |
x |
FLVector |
y |
FLVector |
test_val |
The mean value for which the z test has to be performed. The default value is 0. |
prob |
The values is 1 if the sample set is for proportions. Otherwise, by default it's 0. |
A list with class "htest" outputting the corresponding Z Stat and P Values.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | flx<-as.FLVector(rnorm(100))
fly<-as.FLVector(rnorm(100))
z.test(flx)
## Two- sided one sample z-test.
## mean for 'x' is zero. The alternative hypothesis states
## that it is either greater or less than zero.
z.test(flx,fly,2)
## Two- sided two sample z-test.
## The null hypothesis is that the population mean for 'x'
## less that for 'y' is 2.
## The alternative hypothesis is that this difference is not 2.
## z- test for population proportion.
fla<-as.FLVector(sample(c(0,1),replace=T,size=100))
flb<-as.FLVector(sample(c(0,1),replace=T,size=100))
##test_val= 0.4 implies that null hypothesis is
##population proportion is 0.4
z.test(fla,prob=1, test_val= 0.4)
z.test(fla,flb,prob=1)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.