DEVIANCE

# DEVIANCE

Computes the deviance and returns a value

 Category: Mathematical

## Syntax

 DEVIANCE(distribution, variable, shape-parameter(s)<,>)

### Arguments

distribution
is a character string that identifies the distribution. Valid distributions are

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 random variable.

shape-parameter(s)
are one or more distribution-specific numeric parameters that characterize the shape of the distribution.

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

## Syntax

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

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:

## Syntax

 DEVIANCE('BINO', variable, , n<, >)

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 n is replaced by n. 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.

## Syntax

 DEVIANCE('GAMMA', variable, <, >)

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:

## Syntax

 DEVIANCE('IGAUSS' | 'WALD', variable, <, >)

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:

## Syntax

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

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:

## Syntax

 DEVIANCE('POISSON', variable, <, >)

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: