
On 88 house sales, OLS predicted $164K for a $219K home, while a 90% interval from 5th and 95th percentile models spanned $136K to $227K. The post Quantile Regression Caught the House Price OLS Missed by $55K appeared first on Towards Data Science .
On 88 house sales, OLS predicted $164K for a $219K home, while a 90% interval from 5th and 95th percentile models spanned $136K to $227K.
Prefer us on GoogleSharePhoto by Pawel Czerwinski on UnsplashHeteroscedastic data is a scary term when you first read it.
Yes, I know. It is an ugly word. But its meaning is far from ugly.
In essence, the concept means the data does not have equal variance. When the spread of the residuals in a regression model is not constant across different values of an independent variable (X), we will see the scatterplot of the data form a fan out, funnel in, or form a cone shape as X changes. This is heteroscedasticity.
Heteroscedasticity is when the values of the errors are not constant as the predictor (X) varies, thus the errors increase or decrease as X increases.
Learn this step by step with the interactive AI and Data Scientist roadmap.
So, when the data has this kind of cone shape, running an OLS will not be the best option. The reason is simple: the model will present good results where the data varies little to nothing, but it will miss it badly where the data varies a lot.
In this post, we will learn one of the solutions for such a problem: creating a prediction interval with Quantile Regression.
Ordinary Least Squares (OLS) regression is a great resource for statisticians and data scientists. At one point or another, we all turn our attention to it when trying to model a given behavior. However, if you have some experience in these fields, you will know that datasets are never as clean and beautiful as the ones we get from practice exercises.
For instance, one of OLS's assumptions is the homogeneous variance of the error term, meaning that the data must have a fairly behaved deviation from the average for the regression to show its full potential.
OLS models the average (which can be the same or close to the 50th quantile).
OLS will draw a line that minimizes the error from the points above and below the mean line.
The more those points are uniform, with a steady variance, the better the line will fit to the "middle of the data".
For data with crazy variance, it is harder to find the middle point, so the fitting becomes compromised.
Look closely at the heteroscedastic data from the previous picture. If we apply standard Ordinary Least Squares (OLS) regression here, our predictions are reliable when X is low (up to 4) because the error margins are tight, leading to high precision. However, as X climbs past 8, the variance also climbs, and prediction errors become significantly larger.
Towards Data Science - Medium
Original Reporting Source
Explore features, ratings, and alternatives from our 19,000+ AI tools catalog.

AssistLoop's AI chatbots slash response times by 70% and boost satisfaction, scaling support for e-commerce and SaaS without extra hires.

Design professional websites effortlessly with AI.
Hypertxt.ai is an AI-powered SEO content writing tool that helps create high-quality, optimized content for improved search engine rankings. It offers various features to streamline the content creation process, from keyword research to content optimization and plagiarism checks.