# DEVIANCE Function

Returns the deviance based on a probability distribution.

 Category: Mathematical

## Syntax

### Required Arguments

#### distribution

is a character constant, variable, or expression that identifies the distribution. Valid distributions are listed in the following table:

Distribution
Argument
Bernoulli
`'BERNOULLI' | 'BERN'`
Binomial
`'BINOMIAL' | 'BINO'`
Gamma
`'GAMMA'`
Inverse Gauss (Wald)
`'IGAUSS' | 'WALD'`
Normal
`'NORMAL' | 'GAUSSIAN'`
Poisson
`'POISSON' | 'POIS'`

#### variable

is a numeric constant, variable, or expression.

#### shape-parameter

are one or more distribution-specific numeric parameters that characterize the shape of the distribution.

### Optional Argument

#### ε

is an optional numeric small value used for all of the distributions, except for the normal distribution.

## Details

### The Bernoulli Distribution

DEVIANCE('BERNOULLI', variable, p<, ε> )
Arguments

#### variable

is a binary numeric random variable that has the value of 1 for success and 0 for failure.

#### p

is a numeric probability of success with εp ≤ 1–ε.

#### ε

is an optional positive numeric value that is used to bound p. Any value of p in the interval 0 ≤ pε is replaced by ε. Any value of p in the interval 1 – εp ≤ 1 is replaced by 1 – ε.

The DEVIANCE function returns the deviance from a Bernoulli distribution with a probability of success p, where success is defined as a random variable value of 1. The equation follows:
$equation$

### The Binomial Distribution

DEVIANCE('BINO', variable, μ, n<, ε> )
Arguments

#### variable

is a numeric random variable that contains the number of successes.

 Range 0 ≤ variable ≤ 1

#### μ

is a numeric mean parameter.

 Range nε ≤ μ ≤ n(1–ε)

#### n

is an integer number of Bernoulli trials parameter

 Range n ≥ 0

#### ε

is an optional positive numeric value that is used to bound μ. Any value of μ in the interval 0 ≤ μ is replaced by . Any value of μ in the interval n(1 – ε) ≤ μn is replaced by n(1 – ε).

The DEVIANCE function returns the deviance from a binomial distribution, with a probability of success p, and a number of independent Bernoulli trials n. The following equation describes the DEVIANCE function for the Binomial distribution, where x is the random variable.
$equation$

### The Gamma Distribution

DEVIANCE('GAMMA', variable, μ <, ε> )
Arguments

#### variable

is a numeric random variable.

 Range variable ≥ ε

#### μ

is a numeric mean parameter.

 Range μ ≥ε

#### ε

is an optional positive numeric value that is used to bound variable and μ. Any value of variable in the interval 0 ≤ variableε is replaced by ε. Any value of μ in the interval 0 ≤ με is replaced by ε.

The DEVIANCE function returns the deviance from a gamma distribution with a mean parameter μ. The following equation describes the DEVIANCE function for the gamma distribution, where x is the random variable:
$equation$

### The Inverse Gauss (Wald) Distribution

DEVIANCE('IGAUSS' | 'WALD', variable, μ<, ε> )
Arguments

#### variable

is a numeric random variable.

 Range variable ≥ ε

#### μ

is a numeric mean parameter.

 Range μ ≥ε

#### ε

is an optional positive numeric value that is used to bound variable and μ. Any value of variable in the interval 0 ≤ variableε is replaced by ε. Any value of μ in the interval 0 ≤ με is replaced by ε.

The DEVIANCE function returns the deviance from an inverse Gaussian distribution with a mean parameter μ. The following equation describes the DEVIANCE function for the inverse Gaussian distribution, where x is the random variable:
$equation$

### The Normal Distribution

DEVIANCE('NORMAL' | 'GAUSSIAN', variable, μ)
Arguments

#### variable

is a numeric random variable.

#### μ

is a numeric mean parameter.

The DEVIANCE function returns the deviance from a normal distribution with a mean parameter μ. The following equation describes the DEVIANCE function for the normal distribution, where x is the random variable:
$equation$

### The Poisson Distribution

DEVIANCE('POISSON', variable, μ<, ε> )
Arguments

#### variable

is a numeric random variable.

 Range variable ≥ 0

#### μ

is a numeric mean parameter.

 Range μ ≥ε

#### ε

is an optional positive numeric value that is used to bound μ. Any value of μ in the interval 0 ≤ με is replaced by ε.

The DEVIANCE function returns the deviance from a Poisson distribution with a mean parameter μ. The following equation describes the DEVIANCE function for the Poisson distribution, where x is the random variable:
$equation$