Sunday, November 2, 2025

Goldfeld-Quandt Test

 ## **Goldfeld-Quandt Test**


The **Goldfeld-Quandt test** is a statistical test used to detect **heteroscedasticity** in a regression model.


---


### **What is Heteroscedasticity?**

Heteroscedasticity occurs when the **variance of the errors** is not constant across observations. This violates one of the key assumptions of ordinary least squares (OLS) regression.


---


### **Purpose of Goldfeld-Quandt Test**

- Checks if the **error variance** is related to one of the explanatory variables

- Tests whether heteroscedasticity is present in the data

- Helps determine if robust standard errors or other corrections are needed


---


### **How the Test Works**


1. **Order the data** by the suspected heteroscedasticity-causing variable


2. **Split the data** into three groups:

   - Group 1: First \( n \) observations (low values)

   - Group 2: Middle \( m \) observations (typically excluded)

   - Group 3: Last \( n \) observations (high values)


3. **Run separate regressions** on Group 1 and Group 3


4. **Calculate the test statistic**:

   \[

   F = \frac{\text{RSS}_3 / (n - k)}{\text{RSS}_1 / (n - k)}

   \]

   Where:

   - \( \text{RSS}_3 \) = Residual sum of squares from high-value group

   - \( \text{RSS}_1 \) = Residual sum of squares from low-value group

   - \( n \) = number of observations in each group

   - \( k \) = number of parameters estimated


5. **Compare to F-distribution** with \( (n-k, n-k) \) degrees of freedom


---


### **Interpretation**


- **Large F-statistic** → Evidence of heteroscedasticity

- **Small F-statistic** → No evidence of heteroscedasticity

- If \( F > F_{\text{critical}} \), reject null hypothesis of homoscedasticity


---


### **When to Use**

- When you suspect variance increases/decreases with a specific variable

- When you have a medium to large dataset

- When you can identify which variable might cause heteroscedasticity


---


### **Limitations**

- Requires knowing which variable causes heteroscedasticity

- Sensitive to how data is split

- Less reliable with small samples

- Middle exclusion reduces power


---


### **Example Application**

If you're modeling house prices and suspect error variance increases with house size, you would:

1. Order data by house size

2. Run Goldfeld-Quandt test using house size as the ordering variable

3. If test shows heteroscedasticity, use robust standard errors or transform variables


The test helps ensure your regression inferences are valid by checking this important assumption.

No comments:

Post a Comment