blob: bc68ce4e3d272fbabc223c4f2112fef9b88b536c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/distrib.R
\name{lossdistrib}
\alias{lossdistrib}
\title{Loss distribution of a portfolio}
\usage{
lossdistrib(p)
}
\arguments{
\item{p}{Numeric vector, the vector of success probabilities}
}
\value{
A vector q such that \eqn{q_k=\Pr(S=k)}
}
\description{
\code{lossdistrib} computes the probability distribution of a sum
of independent Bernouilli variables with unequal probabilities
(also called the Poisson-Binomial distribution).
}
\details{
We compute the probability distribution of \eqn{S = \sum_{i=1}^n X_i}
where \eqn{X_i} is Bernouilli(\eqn{p_i}). This uses the simple recursive
algorithm of Andersen, Sidenius and Basu
}
|