2026-03-04

Introduction

  • This presentation analyzes the relationship between square footage (2000 - 3000) and home prices in ZIP code 85249.
  • A total of 28 observations were collected.
  • The data were collected from Zillow.

Plotly Plot

GGPlot 1

GGPlot 2

Linear Regression

The relationship between home price and square footage can be analyzed using the linear regression equation:

\[ y = \beta_0 + \beta_1 x \]

Where:

  • \(y\) = price
  • \(\beta_0\) = intercept (price when square footage is 0)
  • \(\beta_1\) = slope (change in price for each additional square foot)
  • \(x\) = square footage

Estimated Regression

The estimated regression equation is:

\[ \hat{y} = \beta_0 + \beta_1 x \]

Where:

  • \(\hat{y}\) = predicted home price
  • \(\beta_0\) = estimated intercept
  • \(\beta_1\) = estimated slope
  • \(x\) = square footage

R Code

plot_ly(homes,
        x = homes$sqft,
        y = homes$price,
        type = "scatter",
        mode = "markers" )%>%
  layout(xaxis = list(title = "Square Footage"),
         yaxis = list(title = "Home Price ($)"))

Conclusion

  • There appears to be a positive relationship between square footage and home price.
  • Homes with larger square footage have higher prices.