# Minitab Help 13: Weighted Least Squares

Minitab Help 13: Weighted Least Squares

## Minitab®

### Galton peas (nonconstant variance and weighted least squares)

• Perform a linear regression analysis to fit an ordinary least squares (OLS) simple linear regression model of Progeny vs Parent (click "Storage" in the regression dialog to store fitted values).
• Select Calc > Calculator to calculate the weights variable = $$1/SD^{2}$$ and Perform a linear regression analysis to fit a weighted least squares (WLS) model (click "Options" in the regression dialog to set the weights variable and click "Storage" to store fitted values).
• Create a basic scatterplot< of the data and click Editor > Add > Calculated Line to add a regression line for each model using the stored fitted values.

### Market share (nonconstant variance and weighted least squares)

• Perform a linear regression analysis to fit an OLS model (click "Storage" to store the residuals and fitted values).
• Create a basic scatterplot of the OLS residuals vs fitted values but select "With Groups" to mark the points by Discount.
• Select Stat > Basic Statistics > Display Descriptive Statistics to calculate the residual variance for Discount=0 and Discount=1.
• Select Calc > Calculator to calculate the weights variable = 1/variance for Discount=0 and Discount=1, Perform a linear regression analysis to fit a WLS model (click "Options" to set the weights variable and click "Storage" to store standardized residuals and fitted values).
• Create a basic scatterplot of the WLS standardized residuals vs fitted values.

### Home price (nonconstant variance and weighted least squares)

 [1] Link ↥ Has Tooltip/Popover Toggleable Visibility