pValueZTest: Computes the p-value for the Z-test

View source: R/zTest.R

pValueFromZStatR Documentation

Computes the p-value for the Z-test

Description

Computes the p-value for the Z-test

Usage

pValueFromZStat(z, alternative = c("twoSided", "less", "greater"), ...)

pValueZTest(
  x,
  y = NULL,
  paired = FALSE,
  ciValue = NULL,
  alpha = 0.05,
  sigma = 1,
  h0 = 0,
  alternative = c("twoSided", "greater", "less"),
  ...
)

Arguments

z

numeric that represents the observed z-statistic.

alternative

a character string specifying the alternative hypothesis. Must be one of "twoSided" (default), "greater" or "less".

...

further arguments to be passed to or from methods.

x

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

y

an optional (non-empty) numeric vector of data values.

paired

a logical indicating whether you want the paired Z-test.

ciValue

numeric representing the confidence level. Default ciValue=NULL yields ciValue = 1 - alpha

alpha

numeric in (0, 1) that specifies the tolerable type I error and the null rejection rule e >= 1/alpha.

sigma

numeric > 0 representing the assumed population standard deviation used to scale the data.

h0

numeric, representing the null value, default h0=0.

Value

pValueTest object

Examples

pValueZTest(rnorm(10))

safestats documentation built on Sept. 6, 2026, 1:06 a.m.