Analyzing Global Cost of Living with Rent and Groceries Indices
This presentation utilizes the dataset Cost of Living Index by Country found at this page: https://www.kaggle.com/datasets/myrios/cost-of-living-index-by-country-by-number-2024.
2024-09-16
Analyzing Global Cost of Living with Rent and Groceries Indices
This presentation utilizes the dataset Cost of Living Index by Country found at this page: https://www.kaggle.com/datasets/myrios/cost-of-living-index-by-country-by-number-2024.
\[ y = \beta_0 + \beta_1 x_1 + \beta_2 x_2 + \epsilon \] Where:
Call:
lm(formula = Cost.of.Living.Index ~ Rent.Index + Groceries.Index,
data = df)
Residuals:
Min 1Q Median 3Q Max
-15.829 -2.460 -0.302 2.647 10.153
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 5.35365 1.10862 4.829 4.16e-06 ***
Rent.Index 0.28593 0.05206 5.492 2.32e-07 ***
Groceries.Index 0.75995 0.03484 21.814 < 2e-16 ***
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 4.145 on 118 degrees of freedom
Multiple R-squared: 0.9352, Adjusted R-squared: 0.9341
F-statistic: 851.4 on 2 and 118 DF, p-value: < 2.2e-16
plot_ly(data=df, x=~Rent.Index, y=~Groceries.Index,
z=~Cost.of.Living.Index,
type="scatter3d", mode="markers")
`geom_smooth()` using formula = 'y ~ x'
\[ \text{Residual} = y - \hat{y} \] Where: