De Wikipedia, la enciclopedia libre
Saltar a navegación Saltar a búsqueda

En estadística , la función de varianza es una función uniforme que describe la varianza de una cantidad aleatoria en función de su media . La función de varianza es una medida de heterocedasticidad y juega un papel importante en muchos entornos de modelado estadístico. Es un ingrediente principal en el marco del modelo lineal generalizado y una herramienta utilizada en regresión no paramétrica , [1] regresión semiparamétrica [1] y análisis de datos funcionales . [2]En el modelado paramétrico, las funciones de varianza adoptan una forma paramétrica y describen explícitamente la relación entre la varianza y la media de una cantidad aleatoria. En un entorno no paramétrico, se supone que la función de varianza es una función suave .

Intuición [ editar ]

En la configuración de un modelo de regresión, el objetivo es establecer si existe o no una relación entre una variable de respuesta y un conjunto de variables predictoras. Además, si existe una relación, el objetivo es poder describir esta relación de la mejor manera posible. Un supuesto principal en la regresión lineal es la varianza constante u (homocedasticidad), lo que significa que diferentes variables de respuesta tienen la misma varianza en sus errores, en cada nivel de predictor. Esta suposición funciona bien cuando la variable de respuesta y la variable predictora son conjuntamente Normal, consulte Distribución normal . Como veremos más adelante, la función de varianza en el entorno Normal es constante, sin embargo, debemos encontrar una manera de cuantificar la heterocedasticidad (varianza no constante) en ausencia de normalidad conjunta.

Cuando es probable que la respuesta siga una distribución que es un miembro de la familia exponencial, un modelo lineal generalizado puede ser más apropiado para usar y, además, cuando no deseamos forzar un modelo paramétrico en nuestros datos, un modelo no paramétrico El enfoque de regresión puede ser útil. La importancia de poder modelar la varianza en función de la media radica en una mejor inferencia (en un entorno paramétrico) y en la estimación de la función de regresión en general, para cualquier entorno.

Las funciones de varianza juegan un papel muy importante en la estimación e inferencia de parámetros. En general, la estimación de máxima verosimilitud requiere que se defina una función de verosimilitud. Este requisito implica entonces que primero se debe especificar la distribución de las variables de respuesta observadas. Sin embargo, para definir una cuasi verosimilitud, solo es necesario especificar una relación entre la media y la varianza de las observaciones para luego poder usar la función de cuasi verosimilitud para la estimación. [3] La estimación de cuasi-verosimilitud es particularmente útil cuando hay sobredispersión . La sobredispersión ocurre cuando hay más variabilidad en los datos de la que debería esperarse según la distribución supuesta de los datos.

En resumen, para asegurar una inferencia eficiente de los parámetros de regresión y la función de regresión, se debe tener en cuenta la heterocedasticidad. Las funciones de varianza cuantifican la relación entre la varianza y la media de los datos observados y, por lo tanto, desempeñan un papel importante en la estimación y la inferencia de la regresión.

Tipos [ editar ]

La función de varianza y sus aplicaciones surgen en muchas áreas del análisis estadístico. Un uso muy importante de esta función es en el marco de modelos lineales generalizados y regresión no paramétrica .

Modelo lineal generalizado [ editar ]

Cuando se ha especificado un miembro de la familia exponencial , la función de varianza se puede derivar fácilmente. [4] : 29 La forma general de la función de varianza se presenta en el contexto familiar exponencial, así como formas específicas para Normal, Bernoulli, Poisson y Gamma. Además, describimos las aplicaciones y el uso de las funciones de varianza en la estimación de máxima verosimilitud y la estimación de cuasi-verosimilitud.

Derivación [ editar ]

El modelo lineal generalizado (GLM) , es una generalización del análisis de regresión ordinario que se extiende a cualquier miembro de la familia exponencial . Es particularmente útil cuando la variable de respuesta es categórica, binaria o sujeta a una restricción (por ejemplo, solo las respuestas positivas tienen sentido). En esta página se resume un resumen rápido de los componentes de un GLM, pero para obtener más detalles e información, consulte la página sobre modelos lineales generalizados .

Un GLM consta de tres ingredientes principales:

1. Componente aleatorio: una distribución de y de la familia exponencial,
2. Predictor lineal:
3. Función de enlace:

Primero, es importante derivar un par de propiedades clave de la familia exponencial.

Cualquier variable aleatoria en la familia exponencial tiene una función de densidad de probabilidad de la forma,

con loglikelihood,

Aquí, está el parámetro canónico y el parámetro de interés, y es un parámetro de molestia que juega un papel en la varianza. Usamos las identidades de Bartlett para derivar una expresión general para la función de varianza . El primer y segundo resultado de Bartlett asegura que bajo condiciones adecuadas (ver la regla integral de Leibniz ), para una función de densidad dependiente de ,

Estas identidades conducen a cálculos simples del valor esperado y la varianza de cualquier variable aleatoria en la familia exponencial .

Valor esperado de Y : Tomando la primera derivada con respecto al logaritmo de la densidad en la forma de familia exponencial descrita anteriormente, tenemos

Luego, tomar el valor esperado y establecerlo igual a cero conduce a,

Varianza de Y: Para calcular la varianza usamos la segunda identidad de Bartlett,

Ahora tenemos una relación entre y , a saber

y , que permite una relación entre y la varianza,

Tenga en cuenta que porque , entonces es invertible. Derivamos la función de varianza para algunas distribuciones comunes.

Ejemplo: normal [ editar ]

The Normal distribution is a special case where the variance function is a constant. Let then we put the density function of y in the form of the exponential family described above:

where

To calculate the variance function , we first express as a function of . Then we transform into a function of

Therefore, the variance function is constant.

Example – Bernoulli[edit]

Let , then we express the density of the Bernoulli distribution in exponential family form,

logit(p), which gives us expit
and
expit

This give us

Example – Poisson[edit]

Let , then we express the density of the Poisson distribution in exponential family form,

which gives us
and

This give us

Here we see the central property of Poisson data, that the variance is equal to the mean.

Example – Gamma[edit]

The Gamma distribution and density function can be expressed under different parametrizations. We will use the form of the gamma with parameters

Then in exponential family form we have

And we have

Application – weighted least squares[edit]

A very important application of the variance function is its use in parameter estimation and inference when the response variable is of the required exponential family form as well as in some cases when it is not (which we will discuss in quasi-likelihood). Weighted least squares (WLS) is a special case of generalized least squares. Each term in the WLS criterion includes a weight that determines that the influence each observation has on the final parameter estimates. As in regular least squares, the goal is to estimate the unknown parameters in the regression function by finding values for parameter estimates that minimize the sum of the squared deviations between the observed responses and the functional portion of the model.

While WLS assumes independence of observations it does not assume equal variance and is therefore a solution for parameter estimation in the presence of heteroscedasticity. The Gauss–Markov theorem and Aitken demonstrate that the best linear unbiased estimator (BLUE), the unbiased estimator with minimum variance, has each weight equal to the reciprocal of the variance of the measurement.

In the GLM framework, our goal is to estimate parameters , where . Therefore, we would like to minimize and if we define the weight matrix W as

where are defined in the previous section, it allows for iteratively reweighted least squares (IRLS) estimation of the parameters. See the section on iteratively reweighted least squares for more derivation and information.

Also, important to note is that when the weight matrix is of the form described here, minimizing the expression also minimizes the Pearson distance. See Distance correlation for more.

The matrix W falls right out of the estimating equations for estimation of . Maximum likelihood estimation for each parameter , requires

, where is the log-likelihood.

Looking at a single observation we have,

This gives us

, and noting that
we have that

The Hessian matrix is determined in a similar manner and can be shown to be,

Noticing that the Fisher Information (FI),

, allows for asymptotic approximation of
, and hence inference can be performed.

Application – quasi-likelihood[edit]

Because most features of GLMs only depend on the first two moments of the distribution, rather than the entire distribution, the quasi-likelihood can be developed by just specifying a link function and a variance function. That is, we need to specify

– Link function:
– Variance function:

With a specified variance function and link function we can develop, as alternatives to the log-likelihood function, the score function, and the Fisher information, a quasi-likelihood, a quasi-score, and the quasi-information. This allows for full inference of .

Quasi-likelihood (QL)

Though called a quasi-likelihood, this is in fact a quasi-log-likelihood. The QL for one observation is

And therefore the QL for all n observations is

From the QL we have the quasi-score

Quasi-score (QS)

Recall the score function, U, for data with log-likelihood is

We obtain the quasi-score in an identical manner,

Noting that, for one observation the score is

The first two Bartlett equations are satisfied for the quasi-score, namely

and

In addition, the quasi-score is linear in y.

Ultimately the goal is to find information about the parameters of interest . Both the QS and the QL are actually functions of . Recall, , and , therefore,

Quasi-information (QI)

The quasi-information, is similar to the Fisher information,

QL,QS,QI as functions of

The QL, QS and QI all provide the building blocks for inference about the parameters of interest and therefore it is important to express the QL, QS and QI all as functions of .

Recalling again that , we derive the expressions for QL,QS and QI parametrized under .

Quasi-likelihood in ,

The QS as a function of is therefore

Where,

The quasi-information matrix in is,

Obtaining the score function and the information of allows for parameter estimation and inference in a similar manner as described in Application – weighted least squares.

Non-parametric regression analysis[edit]

A scattor plot of years in the major league against salary (x$1000). The line is the trend in the mean. The plot demonstrates that the variance is not constant.
The smoothed conditional variance against the smoothed conditional mean. The quadratic shape is indicative of the Gamma Distribution. The variance function of a Gamma is V() =

Non-parametric estimation of the variance function and its importance, has been discussed widely in the literature[5][6][7]In non-parametric regression analysis, the goal is to express the expected value of your response variable(y) as a function of your predictors (X). That is we are looking to estimate a mean function, without assuming a parametric form. There are many forms of non-parametric smoothing methods to help estimate the function . An interesting approach is to also look at a non-parametric variance function, . A non-parametric variance function allows one to look at the mean function as it relates to the variance function and notice patterns in the data.

An example is detailed in the pictures to the right. The goal of the project was to determine (among other things) whether or not the predictor, number of years in the major leagues (baseball,) had an effect on the response, salary, a player made. An initial scatter plot of the data indicates that there is heteroscedasticity in the data as the variance is not constant at each level of the predictor. Because we can visually detect the non-constant variance, it useful now to plot , and look to see if the shape is indicative of any known distribution. One can estimate and using a general smoothing method. The plot of the non-parametric smoothed variance function can give the researcher an idea of the relationship between the variance and the mean. The picture to the right indicates a quadratic relationship between the mean and the variance. As we saw above, the Gamma variance function is quadratic in the mean.

Notes[edit]

  1. ^ a b Muller and Zhao (1995). "On a semi parametric variance function model and a test for heteroscedasticity". The Annals of Statistics. 23 (3): 946–967. doi:10.1214/aos/1176324630. JSTOR 2242430.
  2. ^ Muller, Stadtmuller and Yao (2006). "Functional Variance Processes". Journal of the American Statistical Association. 101 (475): 1007–1018. doi:10.1198/016214506000000186. JSTOR 27590778. S2CID 13712496.
  3. ^ Wedderburn, R.W.M. (1974). "Quasi-likelihood functions, generalized linear models, and the Gauss–Newton Method". Biometrika. 61 (3): 439–447. doi:10.1093/biomet/61.3.439. JSTOR 2334725.
  4. ^ McCullagh, Peter; Nelder, John (1989). Generalized Linear Models (second ed.). London: Chapman and Hall. ISBN 0-412-31760-5. CS1 maint: discouraged parameter (link)
  5. ^ Muller and StadtMuller (1987). "Estimation of Heteroscedasticity in Regression Analysis". The Annals of Statistics. 15 (2): 610–625. doi:10.1214/aos/1176350364. JSTOR 2241329.
  6. ^ Cai and Wang, T.; Wang, Lie (2008). "Adaptive Variance Function Estimation in Heteroscedastic Nonparametric Regression". The Annals of Statistics. 36 (5): 2025–2054. arXiv:0810.4780. Bibcode:2008arXiv0810.4780C. doi:10.1214/07-AOS509. JSTOR 2546470. S2CID 9184727.
  7. ^ Rice and Silverman (1991). "Estimating the Mean and Covariance structure nonparametrically when the data are curves". Journal of the Royal Statistical Society. 53 (1): 233–243. JSTOR 2345738.

References[edit]

  • McCullagh, Peter; Nelder, John (1989). Generalized Linear Models (second ed.). London: Chapman and Hall. ISBN 0-412-31760-5. CS1 maint: discouraged parameter (link)
  • Henrik Madsen and Poul Thyregod (2011). Introduction to General and Generalized Linear Models. Chapman & Hall/CRC. ISBN 978-1-4200-9155-7.

External links[edit]

  • Media related to Variance function at Wikimedia Commons