one.sample.z {asbio}R Documentation

One sample z-test

Description

Provides a one-sample hypothesis test. The test assumes that the underlying population is normal and furthermore that σ is known.

Usage

one.sample.z(data = NULL, null.mu, xbar = NULL, sigma, n = NULL, test = c("two.sided", "lower.tail", "upper.tail"))

Arguments

data A vector of quantitative data. Not required if xbar and n are supplied by the user.
null.mu The expectation for the null distribution.
xbar Sample mean. Not required if is.null(data)==FALSE
sigma The null distribution variance
n The sample size. Not required if is.null(data)==FALSE
test Type of test. One of three must be specified "two.sided", "lower.tail", or "upper.tail"

Details

The function can use either raw data is.null(data)==FALSE or summarized data if is.null(data)==TRUE. With the later xbar and n must be specified by the user.

Value

Returns a p-value.

Author(s)

Ken Aho

See Also

pnorm

Examples

one.sample.z(null.mu=131,xbar=126,sigma=12,n=85,test="two.sided")

[Package asbio version 0.1 Index]