# poisscdf

Poisson cumulative distribution function

## Syntax

`p = poisscdf(x,lambda)p = poisscdf(x,lambda,'upper')`

## Description

`p = poisscdf(x,lambda)` returns the Poisson cdf at each value in `x` using the corresponding mean parameters in `lambda`. `x` and `lambda` can be vectors, matrices, or multidimensional arrays that have the same size. A scalar input is expanded to a constant array with the same dimensions as the other input. The parameters in `lambda` must be positive.

`p = poisscdf(x,lambda,'upper')` returns the complement of the Poisson cdf at each value in `x`, using an algorithm that more accurately computes the extreme upper tail probabilities.

The Poisson cdf is

$p=F\left(x|\lambda \right)={e}^{-\lambda }\sum _{i=0}^{floor\left(x\right)}\frac{{\lambda }^{i}}{i!}$

## Examples

collapse all

### Compute Poisson Distribution cdf

For example, consider a Quality Assurance department that performs random tests of individual hard disks. Their policy is to shut down the manufacturing process if an inspector finds more than four bad sectors on a disk. What is the probability of shutting down the process if the mean number of bad sectors (λ) is two?

`probability = 1-poisscdf(4,2)`
```probability = 0.0527```

About 5% of the time, a normally functioning manufacturing process produces more than four flaws on a hard disk.

Suppose the average number of flaws (λ) increases to four. What is the probability of finding fewer than five flaws on a hard drive?

`probability = poisscdf(4,4)`
```probability = 0.6288```

This means that this faulty manufacturing process continues to operate after this first inspection almost 63% of the time.