Given a simple null and a simple alternative hypotheses, this function calculates the likelihood ratio (LR) in favor of the alternative based on an observed data in one-sample Z-tests.
Usage
LR.oneZ(m, suff.stat, null = 0, alt, sigma0 = 1)
Arguments
m
a postive numeric (integer); number of samples for computing the LR.
suff.stat
numeric; the value of sufficient statistic based on m observed data.
In this case, the sufficient statistic is the sum of m observations
null
a numeric; the hypothesized value of population mean under the simple null.
Default: 0.
alt
a numeric; the hypothesized value of population mean under the simple alternative.
sigma0
a positive numeric; the known population standard deviation (sd).
Default: 1.
Value
Returns a numeric denoting the LR in favor of alt in the one-sample Z-test based on m observations.