Wednesday, August 28, 2024

Calculating R-Squared in Regression Analysis

The formula for calculating R-squared is:


R^2 = 1 - (SS_res / SS_tot)


Where:
- `SS_res` (Sum of Squares of Residuals) is the sum of the squared differences between the observed values and the predicted values from the model.
- `SS_tot` (Total Sum of Squares) is the sum of the squared differences between the observed values and their mean.

In formula terms:


SS_res = Σ (y_i - ŷ_i)²



SS_tot = Σ (y_i - ȳ)²


Where:
- `y_i` is an observed value.
- `ŷ_i` is a predicted value from the model.
- `ȳ` is the mean of the observed values.

By substituting these values into the formula, you calculate R-squared, which indicates how well the model explains the variability in the data.

No comments:

Post a Comment

Featured Post

How HMT Watches Lost the Time: A Deep Dive into Disruptive Innovation Blindness in Indian Manufacturing

The Rise and Fall of HMT Watches: A Story of Brand Dominance and Disruptive Innovation Blindness The Rise and Fal...

Popular Posts