Your first prediction
Can I predict next month's temperature?
๐ School maths ยท Years 9โ10Statistics โ Fit a line of best fit and extend it to predict.Maths by year โ
The Case. Spring is here and each month has been a little warmer than the last. Could you predict next month's temperature before it happens? Drawing a trend line and extending it is the first real step toward how AI forecasts everything โ from the weather to how much a shop will sell.
Your tools. numpy's np.polyfit draws the best straight line through your data โ the 'trend'. You extend the line to guess the future.
Investigate. Press Run. The green dot is the computer's prediction for next month.
- Change
next_monthto predict further ahead. - Real life isn't a perfect line โ why might the guess be wrong?