Odds are an alternative means to quantify probabilities of events. If the probability of an event has a value p, the odds corresponding to p is p/(1-p).

probs_to_odds(p)

Arguments

p

A numeric vector of probabilities, which are values between 0.0 and 1.0.

Value

A numeric vector of odds, which are values between zero and infinity.

Examples

p <- c(0.25, 0.5, 0.75)
probs_to_odds(p)
#> [1] 0.3333333 1.0000000 3.0000000