SciencesPo (version 1.3.8)

binompdf: Binomial probability density function

Description

Computes the binomial pdf at each of the values in x using the corresponding number of trials in n and probability of success for each trial in p.

Usage

binompdf(n, p, x)

Arguments

n
the number of trials.
p
a vector of probabilities.
x
the number of success.

encoding

UTF-8

Examples

Run this code
trials = 10
prob = c(.2,.25,.3,.35)
success = 4
binomcdf(n = trials, p = prob, x = success)

Run the code above in your browser using DataLab