Skip to content

Least Squares

Probability and Statistics · FE Reference Handbook section

Probability and Statistics
15 formulas
10 exam-style examples
~60 min
All Probability and Statistics lectures

Learning objectives

What you must be able to do before leaving this section.

This chapter section covers Least Squares within Probability and Statistics. Read it the way you would read a textbook chapter: the theory first so the relations mean something, then every equation with its use and its trap, then 10 fully worked examples with the arithmetic shown line by line, and finally a self-check you should be able to answer without notes.

  • Explain, in your own words, what least squares describes physically and when it applies.
  • State every one of the 15 relations the handbook lists here and name each symbol with its unit.
  • Select the correct relation from the wording of an exam stem within 20 seconds.
  • Carry a complete solution from givens to a "most nearly" answer with the correct unit.
  • Recognise the distractors generated by the unit trap: probabilities are dimensionless and must land in [0, 1].

Lecture

Why this section exists. Least Squares is the part of Probability and Statistics that lets you connect a sample of measurements from a construction or materials process to a number you can defend. Before any equation is useful you must be able to picture the physical situation it describes; the schematic below is that picture.

How the theory is built. The handbook prints results, not derivations. Each relation in this section comes from one governing principle applied to the idealised system: state the principle, impose the stated assumptions, and the printed equation follows. Knowing which assumption each relation rests on is what lets you reject a wrong answer choice in seconds.

How it is examined. Items from this page are written as one distribution or one counting rule, then a single probability or interval. Roughly two thirds are direct substitution, one third require one intermediate quantity from a neighbouring relation, and a small number are conceptual — testing whether you know the assumption, not the arithmetic.

The habit that earns the points. Unit discipline. probabilities are dimensionless and must land in [0, 1]. Every relation below is dimensionally consistent only when that rule is honoured, and the distractor set is deliberately built from candidates who ignored it. Write the unit next to every number you substitute, every time.

How to study this page. Read the theory, then cover the formula cards and try to reproduce each relation from its description. Then work the examples with the solution hidden, revealing one line at a time. Finish with the self-check questions; if you cannot answer one, return to the matching formula card.

Three engineers in hard hats and safety vests reviewing drawings on a truck tailgate.

Photo 1. Where this shows up in practice: least squares.

Capstone Studio instructional photograph

xf(x)DistributionArea under the curve is the probability

Probability and Statistics — Least Squares: reference schematic for orienting the symbols used in this section.

Theory, developed

Read this before the equations — it is what makes them memorable.

The physical situation

Every item from this section describes a sample of measurements from a construction or materials process. Sketch it before you compute — a labelled sketch with the givens on it converts a wordy stem into a solvable problem and exposes the quantity the examiner left out on purpose.

The governing principle

The 15 relations on this page are consequences of one principle applied to that idealised system. Identify which quantity is conserved, balanced, or defined, and the correct equation follows without memorisation.

Assumptions and limits of validity

Each printed relation carries silent assumptions — linearity, steady state, uniformity, small deformation, or standard conditions, depending on the subject. Conceptual exam items are written by violating exactly one of these, so read the sentence above the equation as carefully as the equation itself.

Solution procedure you should automate

1) Read the last sentence of the stem to identify the requested quantity. 2) Locate the relation on this page whose left-hand side is that quantity. 3) Tabulate the givens with units and mark the missing symbol. 4) If a symbol is missing, find the one relation that produces it. 5) Rearrange symbolically, substitute once, evaluate, and round only at the end.

Three engineers in hard hats and safety vests reviewing drawings on a truck tailgate.

Photo 2. Probability and Statistics: the physical system the theory above idealises.

Capstone Studio instructional photograph

Notation used in this section

ytQuantity produced by "yt = at + bx" — read its definition and unit from the handbook line directly above the equation.
btQuantity produced by "bt = Sxy/Sxx" — read its definition and unit from the handbook line directly above the equation.
atQuantity produced by "at = y - bt x" — read its definition and unit from the handbook line directly above the equation.
SxyQuantity produced by "Sxy = / xi yi - ^1/nhe / xi oe / yi o" — read its definition and unit from the handbook line directly above the equation.
iQuantity produced by "i=1 i=1 i=1" — read its definition and unit from the handbook line directly above the equation.
SxxQuantity produced by "Sxx = / xi2 - ^1/n he / xi o" — read its definition and unit from the handbook line directly above the equation.
yQuantity produced by "y = ^1/n he / yi o" — read its definition and unit from the handbook line directly above the equation.
xQuantity produced by "x = ^1/n he / xi o" — read its definition and unit from the handbook line directly above the equation.
nQuantity produced by "n = sample size" — read its definition and unit from the handbook line directly above the equation.
SyyQuantity produced by "Syy = sum of squares of y" — read its definition and unit from the handbook line directly above the equation.

Handbook notes for this section

Definitions and conditions exactly as the handbook states them.

  • where
  • n n n
  • n n
  • where

Core formulas for this FE topic

Definitions, applicability, units, assumptions and worked examples for each relation.

Worked exam-style examples

The four ways this section is written on the real exam — thoughts first, then equations, then substitution.

Example 1
Least-squares line through test data — Least Squares

Five load–settlement readings give y = 25.5, 27.5, 31.5, 33.5, 37.5 at x = 1, 2, 3, 4, 5. Fit y = a + bx by least squares.

Given

  • n = 5
  • Σx = 15
  • Σy = 155.5
  • Σxy = 496.5
  • Σx² = 55

Find

Slope b and intercept a

Start with the thinking

  • Build the five sums first; the formulas are pure bookkeeping.
  • The line always passes through (x̄, ȳ).

Step-by-step solution

  1. Slope — b = (nΣxy − ΣxΣy)/(nΣx² − (Σx)²)

  2. Substituting

  3. Evaluate

  4. Intercept — a = ȳ − b·x̄

  5. Substituting

Answer: y = 22.10 + 3.000x

Why the other options are there

  • b = 0.333 (axes swapped)
  • a = 31.10 (intercept taken as ȳ)

Reference: FE Reference Handbook — Probability and Statistics → Least Squares

Example 2
Least-squares line through test data — Least Squares (2)

Five load–settlement readings give y = 10.3, 12.1, 15.9, 17.7, 21.5 at x = 1, 2, 3, 4, 5. Fit y = a + bx by least squares.

Given

  • n = 5
  • Σx = 15
  • Σy = 77.50
  • Σxy = 260.5
  • Σx² = 55

Find

Slope b and intercept a

Start with the thinking

  • Build the five sums first; the formulas are pure bookkeeping.
  • The line always passes through (x̄, ȳ).

Step-by-step solution

  1. Slope — b = (nΣxy − ΣxΣy)/(nΣx² − (Σx)²)

  2. Substituting

  3. Evaluate

  4. Intercept — a = ȳ − b·x̄

  5. Substituting

Answer: y = 7.10 + 2.800x

Why the other options are there

  • b = 0.357 (axes swapped)
  • a = 15.50 (intercept taken as ȳ)

Reference: FE Reference Handbook — Probability and Statistics → Least Squares

Example 3
Least-squares line through test data — Least Squares (3)

Five load–settlement readings give y = 17.6, 19.7, 23.8, 25.9, 30 at x = 1, 2, 3, 4, 5. Fit y = a + bx by least squares.

Given

  • n = 5
  • Σx = 15
  • Σy = 117.0
  • Σxy = 382.0
  • Σx² = 55

Find

Slope b and intercept a

Start with the thinking

  • Build the five sums first; the formulas are pure bookkeeping.
  • The line always passes through (x̄, ȳ).

Step-by-step solution

  1. Slope — b = (nΣxy − ΣxΣy)/(nΣx² − (Σx)²)

  2. Substituting

  3. Evaluate

  4. Intercept — a = ȳ − b·x̄

  5. Substituting

Answer: y = 14.10 + 3.100x

Why the other options are there

  • b = 0.323 (axes swapped)
  • a = 23.40 (intercept taken as ȳ)

Reference: FE Reference Handbook — Probability and Statistics → Least Squares

Example 4
Least-squares line through test data — Least Squares (4)

Five load–settlement readings give y = 16.9, 20.3, 25.7, 29.1, 34.5 at x = 1, 2, 3, 4, 5. Fit y = a + bx by least squares.

Given

  • n = 5
  • Σx = 15
  • Σy = 126.5
  • Σxy = 423.5
  • Σx² = 55

Find

Slope b and intercept a

Start with the thinking

  • Build the five sums first; the formulas are pure bookkeeping.
  • The line always passes through (x̄, ȳ).

Step-by-step solution

  1. Slope — b = (nΣxy − ΣxΣy)/(nΣx² − (Σx)²)

  2. Substituting

  3. Evaluate

  4. Intercept — a = ȳ − b·x̄

  5. Substituting

Answer: y = 12.10 + 4.400x

Why the other options are there

  • b = 0.227 (axes swapped)
  • a = 25.30 (intercept taken as ȳ)

Reference: FE Reference Handbook — Probability and Statistics → Least Squares

Example 5
Least-squares line through test data — Least Squares (5)

Five load–settlement readings give y = 13, 14.5, 18, 19.5, 23 at x = 1, 2, 3, 4, 5. Fit y = a + bx by least squares.

Given

  • n = 5
  • Σx = 15
  • Σy = 88.00
  • Σxy = 289.0
  • Σx² = 55

Find

Slope b and intercept a

Start with the thinking

  • Build the five sums first; the formulas are pure bookkeeping.
  • The line always passes through (x̄, ȳ).

Step-by-step solution

  1. Slope — b = (nΣxy − ΣxΣy)/(nΣx² − (Σx)²)

  2. Substituting

  3. Evaluate

  4. Intercept — a = ȳ − b·x̄

  5. Substituting

Answer: y = 10.10 + 2.500x

Why the other options are there

  • b = 0.400 (axes swapped)
  • a = 17.60 (intercept taken as ȳ)

Reference: FE Reference Handbook — Probability and Statistics → Least Squares

Example 6
Least-squares line through test data — Least Squares (6)

Five load–settlement readings give y = 27.1, 29.7, 34.3, 36.9, 41.5 at x = 1, 2, 3, 4, 5. Fit y = a + bx by least squares.

Given

  • n = 5
  • Σx = 15
  • Σy = 169.5
  • Σxy = 544.5
  • Σx² = 55

Find

Slope b and intercept a

Start with the thinking

  • Build the five sums first; the formulas are pure bookkeeping.
  • The line always passes through (x̄, ȳ).

Step-by-step solution

  1. Slope — b = (nΣxy − ΣxΣy)/(nΣx² − (Σx)²)

  2. Substituting

  3. Evaluate

  4. Intercept — a = ȳ − b·x̄

  5. Substituting

Answer: y = 23.10 + 3.600x

Why the other options are there

  • b = 0.278 (axes swapped)
  • a = 33.90 (intercept taken as ȳ)

Reference: FE Reference Handbook — Probability and Statistics → Least Squares

Example 7
Least-squares line through test data — Least Squares (7)

Five load–settlement readings give y = 8.8, 10.1, 13.4, 14.7, 18 at x = 1, 2, 3, 4, 5. Fit y = a + bx by least squares.

Given

  • n = 5
  • Σx = 15
  • Σy = 65.00
  • Σxy = 218.0
  • Σx² = 55

Find

Slope b and intercept a

Start with the thinking

  • Build the five sums first; the formulas are pure bookkeeping.
  • The line always passes through (x̄, ȳ).

Step-by-step solution

  1. Slope — b = (nΣxy − ΣxΣy)/(nΣx² − (Σx)²)

  2. Substituting

  3. Evaluate

  4. Intercept — a = ȳ − b·x̄

  5. Substituting

Answer: y = 6.10 + 2.300x

Why the other options are there

  • b = 0.435 (axes swapped)
  • a = 13.00 (intercept taken as ȳ)

Reference: FE Reference Handbook — Probability and Statistics → Least Squares

Example 8
Least-squares line through test data — Least Squares (8)

Five load–settlement readings give y = 26.9, 29.3, 33.7, 36.1, 40.5 at x = 1, 2, 3, 4, 5. Fit y = a + bx by least squares.

Given

  • n = 5
  • Σx = 15
  • Σy = 166.5
  • Σxy = 533.5
  • Σx² = 55

Find

Slope b and intercept a

Start with the thinking

  • Build the five sums first; the formulas are pure bookkeeping.
  • The line always passes through (x̄, ȳ).

Step-by-step solution

  1. Slope — b = (nΣxy − ΣxΣy)/(nΣx² − (Σx)²)

  2. Substituting

  3. Evaluate

  4. Intercept — a = ȳ − b·x̄

  5. Substituting

Answer: y = 23.10 + 3.400x

Why the other options are there

  • b = 0.294 (axes swapped)
  • a = 33.30 (intercept taken as ȳ)

Reference: FE Reference Handbook — Probability and Statistics → Least Squares

Example 9
Least-squares line through test data — Least Squares (9)

Five load–settlement readings give y = 31.5, 32.5, 35.5, 36.5, 39.5 at x = 1, 2, 3, 4, 5. Fit y = a + bx by least squares.

Given

  • n = 5
  • Σx = 15
  • Σy = 175.5
  • Σxy = 546.5
  • Σx² = 55

Find

Slope b and intercept a

Start with the thinking

  • Build the five sums first; the formulas are pure bookkeeping.
  • The line always passes through (x̄, ȳ).

Step-by-step solution

  1. Slope — b = (nΣxy − ΣxΣy)/(nΣx² − (Σx)²)

  2. Substituting

  3. Evaluate

  4. Intercept — a = ȳ − b·x̄

  5. Substituting

Answer: y = 29.10 + 2.000x

Why the other options are there

  • b = 0.500 (axes swapped)
  • a = 35.10 (intercept taken as ȳ)

Reference: FE Reference Handbook — Probability and Statistics → Least Squares

Example 10
Least-squares line through test data — Least Squares (10)

Five load–settlement readings give y = 8.6, 9.7, 12.8, 13.9, 17 at x = 1, 2, 3, 4, 5. Fit y = a + bx by least squares.

Given

  • n = 5
  • Σx = 15
  • Σy = 62.00
  • Σxy = 207.0
  • Σx² = 55

Find

Slope b and intercept a

Start with the thinking

  • Build the five sums first; the formulas are pure bookkeeping.
  • The line always passes through (x̄, ȳ).

Step-by-step solution

  1. Slope — b = (nΣxy − ΣxΣy)/(nΣx² − (Σx)²)

  2. Substituting

  3. Evaluate

  4. Intercept — a = ȳ − b·x̄

  5. Substituting

Answer: y = 6.10 + 2.100x

Why the other options are there

  • b = 0.476 (axes swapped)
  • a = 12.40 (intercept taken as ȳ)

Reference: FE Reference Handbook — Probability and Statistics → Least Squares

Self-check

Answer these without notes before moving on.

  1. Without looking, state the relation on this page whose left-hand side is the quantity most often requested, and name every symbol in it.
  2. Which assumption, if violated, makes the main relation of this section invalid?
  3. Given a sample of measurements from a construction or materials process, what is the first quantity you would compute, and why that one first?
  4. Which unit conversion in this subject most often produces a wrong answer choice, and what is its numerical factor?
  5. Rework Example 1 above from the givens alone, without reading the solution lines.

Chapter summary

  • Least Squares contains 15 relations; you must be able to find this page in under 15 seconds.
  • Exam style: one distribution or one counting rule, then a single probability or interval.
  • Unit rule: probabilities are dimensionless and must land in [0, 1].
  • Work the 10 examples until the solution path, not the answer, is automatic.

Common traps in this section

  • probabilities are dimensionless and must land in [0, 1]
  • Answering the intermediate quantity instead of the quantity requested.
  • Rounding intermediate values before the final step.
  • Using a relation from an adjacent handbook section that shares a symbol.
  • Skipping the sketch — most lost points on this page start with a misread geometry.
© 2026 Civil Engineering Capstone Studio. All rights reserved.