# HYPGEOM.DIST

## Content

This function returns the hypergeometric distribution.

## Syntax

`HYPGEOM.DIST(x, n, M, N, cumulative)`

## Arguments

The arguments are as follows, and are truncated if not integers:

| Argument | Description |
| -------- | ----------- |
| *x* | [Required] An integer representing the number of successes in the sample |
| *n* | [Required] An integer representing the size of the sample |
| *M* | [Required] An integer representing the number of successes in the population |
| *N* | [Required] An integer representing the size of the population |
| *cumulative* | [Required] A logical value that determines the form of the function. If cumulative is TRUE, then this function returns the cumulative distribution function; if this argument is FALSE, it returns the probability mass function |

## Remarks

If any argument is non-numeric, the function returns the #VALUE! error value.

## Examples

`HYPGEOM.DIST(A22,B23,62,1000,C10)`
`HYPGEOM.DIST(R22C11,R22C12,R34C14,R35C15,R10C5)`
`HYPGEOM.DIST(2,37,6,100,200)` gives the result 0.6079646750428083