rStats.js v1.3.0
    Preparing search index...

    Function binomTest

    • Exact test of a simple null hypothesis about the probability of success in Bernoulli trials. Equivalent to R's binom.test().

      Parameters

      • x: number | readonly [number, number]

        Number of successes, or [successes, failures].

      • Optionaln: number | BinomTestOptions

        Number of trials (ignored when x has two elements; may then be omitted and the options passed in its place).

      • options: BinomTestOptions = {}

      Returns BinomTestResult

      binomTest(682, 925, { p: 0.75 }).pValue; // 0.3824916