Predictions, decisions and recommendations from models

Tip: Choose Save as PDF in the print dialog to download. Use A4 paper size.

Predictions, decisions and recommendations from models

Name:
Date:
Class:

Quick Questions

Shade in the A or B circle for each question.

1. A model uses past rainfall data to say it will probably rain tomorrow. Which use of a model is this?
A Prediction
B Recommendation
2. A streaming app suggests three shows you might like based on what you watched before. Which use of a model is this?
A Prediction
B Recommendation
3. Which statement best describes what a model does with data?
A It uses data to predict outcomes, support decisions and recommend options
B It only stores data so it can be copied into a spreadsheet
4. A school canteen uses a model of past sales to decide how many pies to order for Friday. Which use of a model is this?
A Supporting a decision
B Storing data
5. An online shop shows 'Customers who bought this also bought...' under a backpack. What is the model doing?
A Validating the data entered by the user
B Recommending suggested products

Match the Pairs

Draw a line connecting each item on the left to its match on the right.

Left columnRight column
1=FORECAST(A9,B2:B8,A2:A8) AFORECAST is missing the known_xs argument. It needs the new x, the known y values and the known x values.
2=IF(C2>=50,"Reorder","OK") B=FORECAST(8,B2:B7,A2:A7)
3A model predicts what will happen next from past data CUses a rule from a model to support a stock decision
4A model recommends options to users, such as suggested products DPredictions from a model are estimates based on past data, not certain facts, so they can be wrong.
5A model always gives a certain, guaranteed prediction of the future. ESELECT name FROM products WHERE category='Tech' ORDER BY price;
6=FORECAST(A9,B2:B8) FUses a model built from past data to predict a future value

Definitions

model

Fill in the Blanks

Complete each line of code by filling in the missing parts.

1.
=________(6,B2:B6,A2:A6)
2.
=__(B2>100,"Reorder","Wait")
3.
=IF(B2__80,"Try extension","Revise")
4.
______ name FROM products WHERE stock > 0;
5.
=IF(C2_10,"Order more","Enough stock")

Spot the Error

Shade in the letter of the line that contains an error.

Question 1
A sales ← LOAD(history)
B model ← TRAIN(next)
C next ← PREDICT(model, 7)
D DISPLAY next
Question 2
A =FORECAST(A8,A2:A7,B2:B7)
B =IF(B8>100,"Order","Wait")
C =B8-B7
Question 3
A SELECT name, price
B FROM products
C WHERE stock = 0
D ORDER BY price ASC
E LIMIT 3
Question 4
A demand ← 120
B stock ← 100
C IF demand < stock THEN
D DISPLAY "Order more"
E END IF
Question 5
A best ← 0
B FOR each item IN products
C IF item.score > pick THEN
D best ← item.score
E pick ← item
F DISPLAY pick

Answer Key

Predictions, decisions and recommendations from models
Section A: Quick Questions
Q1
A — Prediction
Q2
B — Recommendation
Q3
A — It uses data to predict outcomes, support decisions and recommend options
Q4
A — Supporting a decision
Q5
B — Recommending suggested products
Section B: Match the Pairs
Q1
=FORECAST(A9,B2:B8,A2:A8) → Uses a model built from past data to predict a future value
Q2
=IF(C2>=50,"Reorder","OK") → Uses a rule from a model to support a stock decision
Q3
A model predicts what will happen next from past data → =FORECAST(8,B2:B7,A2:A7)
Q4
A model recommends options to users, such as suggested products → SELECT name FROM products WHERE category='Tech' ORDER BY price;
Q5
A model always gives a certain, guaranteed prediction of the future. → Predictions from a model are estimates based on past data, not certain facts, so they can be wrong.
Q6
=FORECAST(A9,B2:B8) → FORECAST is missing the known_xs argument. It needs the new x, the known y values and the known x values.
Section C: Definitions
Q1
model — A model uses data to predict what will happen, support decisions and recommend options to users, such as suggested products.
Section D: Fill in the Blanks
Q1
=FORECAST(6,B2:B6,A2:A6)
Q2
=IF(B2>100,"Reorder","Wait")
Q3
=IF(B2>=80,"Try extension","Revise")
Q4
SELECT name FROM products WHERE stock > 0;
Q5
=IF(C2<10,"Order more","Enough stock")
Section E: Spot the Error
Q1
B — A model is trained on past data, so it must be TRAIN(sales). The variable next does not exist yet. It is the prediction that comes after training.
Q2
A — FORECAST takes x, then the known y values, then the known x values. The sales column (B) must come before the month column (A): =FORECAST(A8,B2:B7,A2:A7).
Q3
C — A recommendation should only suggest items that are available. The condition should be stock > 0. With stock = 0 the query would suggest items that are sold out.
Q4
C — The decision to order more should be made when predicted demand is greater than stock. It should be demand > stock, not demand < stock.
Q5
C — Each item's score is compared with the best score so far, so it should be item.score > best. The variable pick holds an item, not a score.