condProb: Calculate conditional probability

View source: R/condProb.R

condProbR Documentation

Calculate conditional probability

Description

This returns the conditional probability: Pr(succ | trial).

Usage

condProb(succ, trials = NULL, ...)

Arguments

succ

Vector where succ[i] is TRUE if trial i succeeded (logical)

trials

Mask indicating with elements of succ are the relevent trials; NULL means all elements are relevent (logical)

...

Passed to prop.test function (e.g., conf.level or alternative)

Details

Without the trials argument, this becomes a simple probability calculation.

In any event, the output include lower and upper confidence bounds.

Value

Returns a tibble with three columns

  • CondProb - conditional probability

  • Low - lower limit of confidence interval

  • High - upper limit of confidence interval


pteetor/tutils documentation built on April 25, 2024, 9:14 a.m.