hypo: Hypothesis Testing

Description Usage Arguments Details Value Examples

View source: R/hypo.R

Description

hypo returns test statistic (z or t-value), location of x_bar on the graph (relative to centre), which test is used and the corresponding p-value.

Usage

1
hypo(one_tail = TRUE, unknown_pop_sd = TRUE, x_bar, mu, sd, sample_size)

Arguments

one_tail

boolean value for type of test, e.g. FALSE (defaults to TRUE otherwise)

unknown_pop_sd

boolean, e.g. FALSE (defaults to TRUE otherwise)

x_bar

value, e.g. 30

mu

value, e.g. 32

sd

value, e.g. 3.14

sample_size

integer, e.g. 30

Details

By default, the computation assumes that sample standard deviation is used - if using population standard deviation (where it is known or given), set unknown_pop_sd to FALSE.

Similarly, the computation assumes that the one-tail test is used - if using the two-tail test, set one-tail to FALSE.

Value

Returns the p-value.

Examples

1
hypo(TRUE, TRUE, 30, 32, 5, 30)

shunyao643/ab1202ay2021 documentation built on Feb. 26, 2021, 8:53 a.m.