% Generated by roxygen2 (4.1.1): do not edit by hand % Please edit documentation in R/distrib.R \name{lossdistrib.fft} \alias{lossdistrib.fft} \title{Loss distribution of a portfolio} \usage{ lossdistrib.fft(p) } \arguments{ \item{p}{Numeric vector, the vector of success probabilities} } \value{ A vector such that q[k]=P(S=k) } \description{ \code{lossdistrib.fft} computes the probability distribution of a sum of independent Bernouilli variables with unequal probabilities. } \details{ This uses the fft. Complexity is of order O(n m) + O(m\log{m}) where m is the size of the grid and n, the number of probabilities. It is slower than the recursive algorithm in practice. We compute the probability distribution of S = \sum_{i=1}^n X_i where X_i is Bernouilli(p_i) }