Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

length_probability

Calculates the probability of a single length


Description

Creates all the possibilities and then add them up. union_probability Assumes independence between the probabilities to calculate the final size.

Usage

union_probability(p)

length_probability(p, size)

Arguments

p

Numeric vector of probabilities.

size

Integer value of the size of the selected values.

Value

A numeric value of the probability of the given size.

See Also

Examples

length_probability(c(0.5, 0.75), 2)
length_probability(c(0.5, 0.75, 0.66), 1)
length_probability(c(0.5, 0.1, 0.3, 0.5, 0.25, 0.23), 2)
union_probability(c(0.5, 0.1, 0.3))

BaseSet

Working with Sets the Tidy Way

v0.0.16
MIT + file LICENSE
Authors
Lluís Revilla Sancho [aut, cre] (<https://orcid.org/0000-0001-9747-2570>), Zebulun Arendsee [rev], Jennifer Chang [rev]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.