Performs a Z test for one population mean when the population variance is known.
Usage
tz1(
dadosX = NULL,
mp,
vp,
alfa = 0.05,
Ha = 1,
unidade = NULL,
media = NULL,
n = NULL,
plot = TRUE
)
Value
Invisibly returns an object of classes th_test and htest containing the test statistic, degrees of freedom when applicable, p-value, estimates, critical values, significance level, and decision. When plot = TRUE, the educational graph is produced as a side effect.
Arguments
dadosX
Numeric vector containing the sample data. Use NULL when summary statistics are supplied.
mp
Population mean specified under the null hypothesis.
vp
Known population variance.
alfa
Significance level.
Ha
Alternative hypothesis. Use 1 or "two.sided", 2 or "greater", and 3 or "less".
unidade
Measurement unit displayed in the graph.
media
Sample mean used when dadosX = NULL.
n
Sample size used when dadosX = NULL.
plot
Logical. If TRUE (default), draw the educational graph; if FALSE, return the result without plotting.
Author
Willian Silva Barros
Details
Raw-data and summary-statistics modes are mutually exclusive. The function accepts either raw observations or the sample mean and sample size. It produces a graphical representation of the main stages of the test.