Chapter 1 of 5

The Data and the Question

Simple Linear Regression

15 houses. Each dot is one house.

100200300400500600House Size (sqft)$0$50k$100k$150k$200k$250k$300kPrice ($)

Bigger house, higher price. There's a pattern.

100200300400500600House Size (sqft)$0$50k$100k$150k$200k$250k$300kPrice ($)

Can you draw the best line? Drag the handles to adjust.

100200300400500600House Size (sqft)$0$50k$100k$150k$200k$250k$300kPrice ($)slopeintercept

Your line is a prediction machine. Plug in a size, get a price.

100200300400500600House Size (sqft)$0$50k$100k$150k$200k$250k$300kPrice ($)
y^=80,000+200×size\hat{y} = 80,000 + 200 \times \text{size}

Built with SvelteKit + D3.js