This project statistically analyzes the relationship between Berlin's official rent index (Mietspiegel) and Germany's inflation rate from 2005-2023. The Mietspiegel surveys and reports Kaltmiete (base rent excluding utilities), serving as a legal benchmark for fair rents in Berlin.
Hypothesis Test: Does rent change mirror inflation?
-
H₀: Biennial rent index change = Inflation rate (μ_rent = μ_inflation)
The biennial % change in Berlin's rent index = Germany's inflation rate
(Mathematically: μ_rent = μ_inflation) -
H₁: Biennial rent index change ≠ Inflation rate (μ_rent ≠ μ_inflation)
The biennial % change in Berlin's rent index ≠ Germany's inflation rate
(Mathematically: μ_rent ≠ μ_inflation)
Core Question:
"Do biennial changes in Berlin's base rent systematically differ from inflation changes?"
File | Description |
---|---|
analysis.ipynb |
Main analysis notebook |
src/data_cleaning.py |
Data processing functions |
data/processed/ |
Cleaned datasets |
visuals/ |
Generated plots and charts |
- Observation: Rent consistently increased while inflation showed volatility
- Divergence Peak: 2021-2023 inflation spike vs. moderate rent growth
- Key Insight: Rent exceeded inflation in 7/9 periods
- Notable Divergence: 2021-2023 (rent +5.4% vs inflation +13.2%)
- Critical Finding:
- Current power (9 periods): 16.6%
- Required periods for 80% power: 59
What Statistical Power Means:
Statistical power measures our ability to detect a real difference when it exists. With only 9 data points:
- Our current power is 16.6% - meaning we'd miss a real difference 83.4% of the time. Surprisingly, when we added more data (from 3 to 9 periods):
- Power increased from 11.2% → 16.6% (slightly better detection) - 118 years of data for 80% power
- But required periods jumped from 19 → 59 for reliable detection
Why? The new data revealed higher variability in rent-inflation differences, making patterns harder to spot despite more data points."
- This low power explains why we can't detect significance despite visible differences
Cohen's d = 0.37 quantifies the practical importance of differences:
- Measures how many standard deviations separate rent and inflation changes
- d=0.37 is a small-to-medium effect
- In practical terms: When inflation changes by 5%, rent typically changes by either 3.2% or 6.8% (about ±1.8% difference)
- Interpretation: The average difference is noticeable but not dramatic
d Value | Effect Size | Housing Market Interpretation |
---|---|---|
<0.2 | Negligible | Trivial difference |
0.2-0.5 | Small | Noticeable but minor |
0.5-0.8 | Medium | Substantial policy impact |
>0.8 | Large | Market-altering difference |
- Pattern Identification:
- Pre-2019: Higher rent volatility
- Post-2019: Stabilization despite economic shocks
Metric | Value | Interpretation |
---|---|---|
p-value | 0.298 | > 0.05 → Fail to reject H₀ |
Effect Size (d) | 0.37 | Small-medium effect |
Key Conclusion | No systematic difference |
Interpretation:
While we observe meaningful differences in specific periods (especially before 2019), statistical tests show no consistent evidence that rent changes systematically differ from inflation over the 2005-2023 period.
git clone https://github.com/GFiaMon/data-wrangling-project.git
cd berlin-rent-inflation
pip install -r requirements.txt
Execute Jupyter notebook:
jupyter notebook notebooks/01_mietspiegel_inflation_eda_full_dataset.ipynb
graph LR
A[Raw PDFs/CSVs] --> B[Data Extraction]
B --> C[Data Cleaning]
C --> D[Analysis]
D --> E[Visualization]
berlin-rent-inflation/
├── data/
│ ├── raw/ # Original datasets
│ └── processed/ # Cleaned data files
├── notebooks/
│ └── analysis.ipynb # Main analysis notebook
├── src/
│ ├── data_cleaning.py # Cleaning functions
├── visuals/ # Generated plots
├── .gitignore
├── requirements.txt
└── README.md
-
Mietspiegel Reports
- Berlin Senate Department
- Years: 2005, 2007, 2009, 2011, 2013, 2015, 2017, 2019, 2021, 2023
-
Inflation Data
- District-level analysis
- Integration of wage growth data
- Predictive modeling of 2025 Mietspiegel
- Impact assessment of rent control policies
For questions or collaboration: Guillermo Fiallo Montero