Computes the deviance
Category: Mathematical
DEVIANCE ( distribution , variable , shape-parameter(s) <, µ >)
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.
The Bernoulli Distribution
DEVIANCE ('BERNOULLI', variable , p <, µ >)
where
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 :
The Binomial Distribution
DEVIANCE ('BINO', variable , ¼ , n <, µ >)
where
variable
is a numeric random variable that contains the number of successes.
Range: ‰ variable ‰ 1
¼
is a numeric mean parameter.
Range: n ‰ ¼ ‰ n (1- µ )
n
is an integer number of Bernoulli trials parameter
Range: n ‰
µ
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.
The Gamma Distribution
DEVIANCE ('GAMMA', variable , ¼ <, µ >)
where
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:
The Inverse Gauss (Wald) Distribution
DEVIANCE ('IGAUSS' 'WALD', variable , ¼ <, µ >)
where
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:
The Normal Distribution
DEVIANCE ('NORMAL' 'GAUSSIAN', variable , ¼ )
where
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:
The Poisson Distribution
DEVIANCE ('POISSON', variable , ¼ <, µ >)
where
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 ¼ . 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: