negative_binomial_p_one_sample {LRTesteR} | R Documentation |
Test the p parameter of a negative binomial distribution.
Description
Test the p parameter of a negative binomial distribution.
Usage
negative_binomial_p_one_sample(
num_failures,
num_successes,
p,
alternative = "two.sided",
conf.level = 0.95
)
Arguments
num_failures |
Number of failures. |
num_successes |
Number of successes. |
p |
Hypothesized probability of success. |
alternative |
a character string specifying the alternative hypothesis, must be one of "two.sided" (default), "greater" or "less". |
conf.level |
confidence level of the likelihood interval. |
Value
An S3 class containing the test statistic, p value, likelihood based confidence interval, and alternative hypothesis.
Source
Yudi Pawitan. In All Likelihood. Oxford University Press.
Hodd, McKean, and Craig. Introduction to Mathematical Statistics. Pearson.
Examples
library(LRTesteR)
# Null is true. 48 failures before 52 successes.
negative_binomial_p_one_sample(48, 52, .50, "two.sided")
# Null is false. 25 failures before 75 successes.
negative_binomial_p_one_sample(25, 75, .50, "two.sided")
[Package LRTesteR version 1.1.1 Index]