PPB

Project Profile Bangladesh

Show how to calculate R-squared step-by-step and handle data outliers when validating cost drivers.

Calculating $R^2$ (the Coefficient of Determination) determines how much variation in cost is explained by a candidate cost driver. Identifying and handling outliers ensures these data points do not distort the regression model.

Calculating $R^2$ (the Coefficient of Determination) determines how much variation in cost is explained by a candidate cost driver. Identifying and handling outliers ensures these data points do not distort the regression model.  ---  ### Step-by-Step Calculation of $R^2$  $R^2$ is defined as the proportion of total variance in cost ($Y$) that is explained by the regression model:  $$R^2 = \frac{\text{Explained Variation (SSR)}}{\text{Total Variation (SST)}} = 1 - \frac{\text{Unexplained Variation (SSE)}}{\text{Total Variation (SST)}}$$  Where:  * $\text{SST} = \sum (Y_i - \bar{Y})^2$ (Total Sum of Squares) * $\text{SSE} = \sum (Y_i - \hat{Y}_i)^2$ (Sum of Squared Errors / Residuals) * $\hat{Y}_i = a + bX_i$ (Predicted Cost from Regression)  #### Numerical Walkthrough  Using the previous dataset ($n = 6$, $\bar{Y} = \$3,333.33$, and model $\hat{Y} = 248.67 + 19.08X$):  | Month | Driver ($X_i$) | Actual Cost ($Y_i$) | Predicted Cost ($\hat{Y}_i$) | Residual ($Y_i - \hat{Y}_i$) | Squared Residual $(Y_i - \hat{Y}_i)^2$ | Total Variance $(Y_i - \bar{Y})^2$ | | --- | --- | --- | --- | --- | --- | --- | | **Jan** | 100 | $2,200 | $2,156.67 | +$43.33 | 1,877.49 | 1,284,437.11 | | **Feb** | 120 | $2,500 | $2,538.27 | -$38.27 | 1,464.59 | 694,439.11 | | **Mar** | 150 | $3,100 | $3,110.67 | -$10.67 | 113.85 | 54,443.11 | | **Apr** | 180 | $3,700 | $3,683.07 | +$16.93 | 286.63 | 134,443.11 | | **May** | 200 | $4,000 | $4,064.67 | -$64.67 | 4,182.21 | 444,449.11 | | **Jun** | 220 | $4,500 | $4,446.27 | +$53.73 | 2,886.91 | 1,361,115.11 | | **Sum** | — | — | — | — | **$\text{SSE} = 10,811.68$** | **$\text{SST} = 3,973,326.54$** |  $$R^2 = 1 - \frac{\text{SSE}}{\text{SST}} = 1 - \frac{10,811.68}{3,973,326.54} = 1 - 0.00272 = \mathbf{0.99728 \quad (99.73\%)}$$  * **Interpretation:** $99.73\%$ of the variation in maintenance cost is explained by machine hours.  ---  ### Handling Data Outliers in Cost Driver Validation  An outlier is a data point that deviates significantly from the overall trend, pulling the regression line away from true operating conditions.  ``` Cost ($)   ^   |                                 * (Normal point)   |                       *    |             * (Outlier: Equipment Breakdown)   |         *   |     *   +--------------------------------------------> Driver (X)  ```  #### 1. Identification Methods  * **Standardized Residuals:** Calculate $e_i = \frac{Y_i - \hat{Y}_i}{s_e}$. Any observation where $\vert{}e_i\vert{} > 2.5$ or $3.0$ standard deviations is classified as an outlier. * **Scatter Plots:** Visual inspection of driver volume vs. activity cost readily reveals isolated data points.  #### 2. Root-Cause Analysis Criteria  Before removing or adjusting an outlier, investigate the cause:  | Outlier Cause | Example | Action Required | | --- | --- | --- | | **Data Entry Error** | Typo ($25,000 recorded instead of $2,500) | Correct the error using primary invoices/logs. | | **One-Off / Abnormal Event** | Major machine breakdown, flood, supply shock | **Remove the observation** from the baseline model. | | **Capacity Structural Shift** | Factory added a second shift or new line | Split dataset into pre-expansion and post-expansion models. | | **Non-Linear Cost Behavior** | Step-fixed costs or tiered pricing | Keep point, but switch from simple linear to non-linear or multi-segment models. |  #### 3. Impact Assessment  Compare the regression parameters before and after removing the outlier:  $$\text{If } R^2 \text{ increases significantly (e.g., from } 0.55 \to 0.92\text{) after removing a verified abnormal event, the cost driver is validated.}$$


Step-by-Step Calculation of $R^2$

$R^2$ is defined as the proportion of total variance in cost ($Y$) that is explained by the regression model:

$$R^2 = \frac{\text{Explained Variation (SSR)}}{\text{Total Variation (SST)}} = 1 - \frac{\text{Unexplained Variation (SSE)}}{\text{Total Variation (SST)}}$$
Where:

  • $\text{SST} = \sum (Y_i - \bar{Y})^2$ (Total Sum of Squares)

  • $\text{SSE} = \sum (Y_i - \hat{Y}_i)^2$ (Sum of Squared Errors / Residuals)

  • $\hat{Y}_i = a + bX_i$ (Predicted Cost from Regression)

Numerical Walkthrough

Using the previous dataset ($n = 6$, $\bar{Y} = \$3,333.33$, and model $\hat{Y} = 248.67 + 19.08X$):

MonthDriver (Xi​)Actual Cost (Yi​)Predicted Cost (Y^i​)Residual (Yi​−Y^i​)Squared Residual (Yi​−Y^i​)2Total Variance (Yi​−Yˉ)2
Jan100$2,200$2,156.67+$43.331,877.491,284,437.11
Feb120$2,500$2,538.27-$38.271,464.59694,439.11
Mar150$3,100$3,110.67-$10.67113.8554,443.11
Apr180$3,700$3,683.07+$16.93286.63134,443.11
May200$4,000$4,064.67-$64.674,182.21444,449.11
Jun220$4,500$4,446.27+$53.732,886.911,361,115.11
Sum$\text{SSE} = 10,811.68$$\text{SST} = 3,973,326.54$
$$R^2 = 1 - \frac{\text{SSE}}{\text{SST}} = 1 - \frac{10,811.68}{3,973,326.54} = 1 - 0.00272 = \mathbf{0.99728 \quad (99.73\%)}$$
  • Interpretation: $99.73\%$ of the variation in maintenance cost is explained by machine hours.

Handling Data Outliers in Cost Driver Validation

An outlier is a data point that deviates significantly from the overall trend, pulling the regression line away from true operating conditions.

Cost ($)
  ^
  |                                 * (Normal point)
  |                       * 
  |             * (Outlier: Equipment Breakdown)
  |         *
  |     *
  +--------------------------------------------> Driver (X)

1. Identification Methods

  • Standardized Residuals: Calculate $e_i = \frac{Y_i - \hat{Y}_i}{s_e}$. Any observation where $\vert{}e_i\vert{} > 2.5$ or $3.0$ standard deviations is classified as an outlier.

  • Scatter Plots: Visual inspection of driver volume vs. activity cost readily reveals isolated data points.

2. Root-Cause Analysis Criteria

Before removing or adjusting an outlier, investigate the cause:

Outlier CauseExampleAction Required
Data Entry ErrorTypo ($25,000 recorded instead of $2,500)Correct the error using primary invoices/logs.
One-Off / Abnormal EventMajor machine breakdown, flood, supply shockRemove the observation from the baseline model.
Capacity Structural ShiftFactory added a second shift or new lineSplit dataset into pre-expansion and post-expansion models.
Non-Linear Cost BehaviorStep-fixed costs or tiered pricingKeep point, but switch from simple linear to non-linear or multi-segment models.

3. Impact Assessment

Compare the regression parameters before and after removing the outlier:
$$\text{If } R^2 \text{ increases significantly (e.g., from } 0.55 \to 0.92\text{) after removing a verified abnormal event, the cost driver is validated.}$$
← Newer Article Older Article →