Software Engineering › Key terms › Y12 Software Automation › Linear regression
Linear regression
Term Key terms bank Y12 Software Automation
Definition
Fits a straight line through data to predict a numeric value from one or more inputs.
Example: Predict house price from floor area.
Found in: syllabus, course specifications, sample exam and familiarisation guidelines, school notes.
Predicts a continuous numeric value on a straight line.
Where it is used in the test
Syllabus area: Y12 Software Automation.
Question types it can appear in
- Short answer: Compare linear regression and KNN (sample Q23b)
- Multiple choice: Pick the option that matches the definition or example.
- Python: Write or complete it in the online Python tool.
Where it has appeared in the paper
Software Automation (Part B). Part letters follow each paper’s own layout.
Related past questions
- Sample exam Q23b (3 marks): Linear regression v K-nearest neighbour Software Automation (Part B) · 3 marks
These are the questions the flashcard set links to this term. Open each one and compare your answer with its marking criteria.
Study links
- Flashcard: Linear regression in Software Automation (Year 12) · study that set
- Memorise: Decision trees
- Key terms bank entry: Linear regression
- Master answer: sample-q23b (3 marks, short answer (compare, max 75 words)) (Master model answers: Software Automation)
- Notes: Describe types of algorithms associated with ML, including linear regression, logistic… (Software Automation (Year 12))
- Notes: Design, develop and apply ML regression models using an OOP to predict numeric values,… (Software Automation (Year 12))
- Notes: Regression models and KNN (Software Automation (Year 12))
How to use it in an answer
A model sentence
“Fits a straight line through data to predict a numeric value from one or more inputs.” Then apply it: Predict house price from floor area.
In a short answer, give the definition in your own words first, then tie it to the situation in the question. Do not copy the example above unless it fits the scenario.
Command words used with it
- Compare: Show how things are similar or different. (Sample exam Q23b (3 marks): Linear regression v K-nearest neighbour)
Technique for the question types
- Short answer: One clear point per mark, use the stimulus and course terms, and answer the command word.
- Multiple choice: Read all four options, rule out wrong ones, pick one; no penalty for guessing so never leave blank.
- Python: Write code that runs: indentation, quotes, define functions before calling them, print the required output, meet every listed requirement.
What the marking guidelines and feedback say
Some school notes list KNN as unsupervised: that is wrong. NESA's sample answer treats KNN as supervised.
Worked answers from the marking guidelines
Sample exam Q23b (3 marks): Linear regression v K-nearest neighbour (3 marks): criteria and sample answer
Criteria
3: Compares linear regression and KNN. 2: Outlines features of one or both. 1: Some relevant information.
Sample answer
Linear regression and K-nearest neighbours (KNN) are both supervised learning algorithms that make predictions from labelled data. The key difference is how they handle data: linear regression assumes a linear relationship between input features and the target variable, while KNN makes predictions based on the closest 'K' training examples, allowing it to handle more complex, non-linear patterns. However, KNN can be more computationally expensive than linear regression and is usually slower.
Common mistakes
- Python questions (2025 HSC exam Q19): process string inputs; use a selection structure; code must execute in the environment; use correct indentation; call functions in the main program after defining them.
- Python questions (2025 HSC exam Q26): replicate the grid; use the random library; use selection and looping to access the list; include a method of checking the number of values; use meaningful variable names and constants; avoid overly complex structures such as nested IF loops.
- Use the term exactly as the syllabus words it, then link it to the scenario in the question; the 2025 feedback repeatedly rewards using the stimulus.
- Answer the command word: outline gives main points only, explain gives a reason or cause, discuss gives both sides.
Related terms
Same group in the syllabus: Decision tree · Neural network · Polynomial regression · Logistic regression · K-nearest neighbour (KNN) · OOP for ML programming · Neural network code (predict)