Skip to content

AI & ML · Optimization

Least squares

366 problems in this skill, each with a solver-verified answer key. Answers are checked the moment you submit — with a hint if you want one and a worked solution afterwards.

What the problems look like

A few statements from this skill. Answers, hints and worked solutions live in the practice session.

  1. Warm-up

    The simplest least-squares problem fits a single constant cc to data y1,y2,y3y_1, y_2, y_3 by minimizing the sum of squared errors ∑i=13(yi−c)2\sum_{i=1}^{3} (y_i - c)^{2}. For the data y1=−5y_1 = -5, y2=6y_2 = 6, y3=5y_3 = 5, find the least-squares optimal cc. Give your answer as a fraction (or integer if it reduces to one).

  2. Warm-up

    The simplest least-squares problem fits a single constant cc to data y1,y2,y3y_1, y_2, y_3 by minimizing the sum of squared errors ∑i=13(yi−c)2\sum_{i=1}^{3} (y_i - c)^{2}. For the data y1=−8y_1 = -8, y2=−1y_2 = -1, y3=17y_3 = 17, find the least-squares optimal cc. Give your answer as a fraction (or integer if it reduces to one).

  3. Warm-up

    The simplest least-squares problem fits a single constant cc to data y1,y2,y3y_1, y_2, y_3 by minimizing the sum of squared errors ∑i=13(yi−c)2\sum_{i=1}^{3} (y_i - c)^{2}. For the data y1=7y_1 = 7, y2=3y_2 = 3, y3=8y_3 = 8, find the least-squares optimal cc. Give your answer as a fraction (or integer if it reduces to one).

Problems shown under their original terms: Generated (template, solver-computed).

Practice this free, right now

Unlimited math practice is on the free plan — no card, no trial clock.

See every Optimization skill for ai & ml