infer_binom_calc: Binomial Test

Description Usage Arguments Value Deprecated Functions References See Also Examples

View source: R/infer-binom-test.R

Description

Test whether the proportion of successes on a two-level categorical dependent variable significantly differs from a hypothesized value.

Usage

1
2
3
infer_binom_calc(n, success, prob = 0.5, ...)

infer_binom_test(data, variable, prob = 0.5)

Arguments

n

number of observations

success

number of successes

prob

assumed probability of success on a trial

...

additional arguments passed to or from other methods

data

a data.frame or a tibble

variable

factor; column in data

Value

binom_test returns an object of class "binom_test". An object of class "binom_test" is a list containing the following components:

n

number of observations

k

number of successes

exp_k

expected number of successes

obs_p

assumed probability of success

exp_p

expected probability of success

lower

lower one sided p value

upper

upper one sided p value

Deprecated Functions

binom_calc() and binom_test() have been deprecated. Instead use infer_binom_cal() and infer_binom_test().

References

Hoel, P. G. 1984. Introduction to Mathematical Statistics. 5th ed. New York: Wiley.

See Also

binom.test

Examples

1
2
3
4
5
# using calculator
infer_binom_calc(32, 13, prob = 0.5)

# using data set
infer_binom_test(hsb, female, prob = 0.5)

inferr documentation built on May 2, 2019, 6:23 a.m.