Exercise:
Title: Single Predictor Linear Regression: Sea Proximity and Property Value
Scenario:
Imagine you are a real estate analyst at a property valuation company. Your firm specializes in coastal properties and it has been observed that the proximity to the sea can have a significant impact on property values. You have been tasked with developing a simple linear regression model to predict the value of a property based on its distance from the sea.
Dataset:
You have a dataset of 1000 properties, each with two variables:
- Distance from the sea (in meters)
- Property value (in USD)
Objective:
Your objective is to develop a single predictor linear regression model that can predict the value of a property based on its distance from the sea.
Task 1: Data Cleaning and Preparation
Clean and prepare your data for analysis. Check for any null or missing values and deal with them appropriately.
Task 2: Exploratory Data Analysis
Perform some exploratory data analysis. Plot your data and calculate some basic statistics to understand your data better.
Task 3: Model Development
Split your dataset into a training set (70%) and a testing set (30%). Develop a single predictor linear regression model using the training set.
Task 4: Model Evaluation
Evaluate your model. How well does it fit your data? Calculate the R-squared and RMSE of your model using the testing set.
Question:
Based on your model, how does the value of a property change for each meter closer to the sea it is?
Task 5: Interpretation and Reporting
Interpret your results. What does your model tell you about the relationship between a property's distance from the sea and its value? How confident are you in this model's predictions?
Remember to justify your answers with appropriate reasoning.
Good luck!