Free Polynomial Regression Course: Compare Curves with R and ggplot

A curve can follow a dataset more closely than a straight line, but that does not automatically make it a better model. Charles Redmond’s free English course introduces polynomial regression through R functions and ggplot graphics. It is a compact continuation for learners who already understand basic plotting and simple linear regression and want to see how a fitted relationship changes when the model gains flexibility.

Original Free Polynomial Regression Course cover with decorative curved ribbons and glossy data tokens, credited to Charles Redmond
Free learning access

Listed as Free on Udemy when checked on 8 November 2026. No coupon or subscription trial is required for the listed lessons. Enrollment needs a Udemy account; availability can change.

About this course

A curve can follow a dataset more closely than a straight line, but that does not automatically make it a better model. Charles Redmond’s free English course introduces polynomial regression through R functions and ggplot graphics. It is a compact continuation for learners who already understand basic plotting and simple linear regression and want to see how a fitted relationship changes when the model gains flexibility.

The course contains thirteen lectures in two sections, with about sixty-five minutes of listed material. It was updated in May 2015, so package interfaces and installation details may have changed. Have R and RStudio available, and allow additional time to reproduce examples yourself. The course’s introductory scope covers functions, polynomial fits and smoothing splines; it does not promise an independently validated prediction system or a professional credential.

Official course Polynomial Regression, R, and ggplot
Created by Charles Redmond
Platform Udemy
Language English
Level Intermediate
Listed duration 66 minutes; 13 lectures across 2 sections
Completion terms Not included with a new free enrollment

What you’ll learn

Connect a function definition with the shape you see on a graph. Follow the progression from a fitted line to quadratic and cubic models, compare observations with fitted values, and examine the gaps left behind. Finish by exploring smoothing splines and why adding flexibility can make interpretation and model selection more demanding.

Skills you’ll gain

  • R function construction
  • Function plotting
  • Polynomial model comparison
  • Signed residual interpretation
  • Smoothing-spline awareness
  • Overfitting recognition

Start with a function you can explain

The opening section reviews functions and polynomials before introducing user-defined functions in R and plotting them with ggplot. This is a useful bridge between mathematical notation and code: a function receives an input and returns a result that you can check. Try several inputs before drawing a curve, and make sure the plotted values agree with those calculations.

For independent practice, define a fictional response by “two plus the input plus half the input squared.” At inputs zero, one and two, its values are two, three-and-a-half and six. These values are invented for learning, not measurements from the instructor’s dataset. Use them to check your function, then draw it over a short input range. A table of a few known values makes a convenient check when a graph looks surprising.

Compare the gaps, not just the shapes

The second section starts by reading a supplied dataset and revisiting least squares. It then plots fitted points at the same horizontal coordinates as the observations, visualizes residuals, and extends the model to degrees two and three. Keep the observation and its corresponding fitted value paired when interpreting these graphics.

In R’s linear-model output, a residual is the observed response minus its fitted value. Its sign tells you which side of the fitted curve the observation lies on. The length of a vertical segment shows the residual’s magnitude, which is nonnegative; it does not preserve that sign. Keeping those two ideas separate helps you read both a residual table and a geometric illustration accurately.

A polynomial model can curve in the predictor while still being linear in its fitted coefficients. When using R’s `poly` function, also check its basis: the default uses orthogonal polynomials, while raw powers require an explicit choice. Coefficients from the default basis should not be read directly as the ordinary coefficients of the input, its square and its cube.

Give flexibility a clear purpose

Return to the invented function and add two more inputs, three and four, whose responses are nine-and-a-half and fourteen. Compare a straight-line fit with a quadratic fit to these five constructed observations. The example deliberately comes from a quadratic rule, so a close quadratic fit is unsurprising. It demonstrates a known construction; it does not show that a quadratic model will predict an unrelated real dataset well.

The final lessons introduce smoothing splines and warn about overfitting. A smoothing spline is not simply another single polynomial of higher degree. R’s implementation fits a cubic smoothing spline, with smoothing controlled through settings such as equivalent degrees of freedom. Treat that flexibility as something to examine deliberately, and distinguish it from the degree of the polynomials in the preceding lessons.

Use the course to build a small comparison you can explain: the data used, the model chosen, its fitted values and what the residuals show. Better agreement on the fitting data alone is insufficient evidence of better prediction. The downloadable resource is part of the course listing, while this independent practice exercise uses only invented observations. Keep conclusions within that scope and consult current package documentation when adapting older examples.

Read the current linear-model reference: Review the definitions of fitted values and residuals in R. Understand the polynomial basis: Distinguish orthogonal polynomial columns from raw powers.

Related courses for your next step

  • Explore data frames in another languageFree Python Pandas Course

    Compare how a separate course introduces series and data frames in Python.

    Beginner

Enroll Now ↗

Frequently asked questions

Do I need prior experience with R?

Basic R, ggplot and simple linear regression knowledge is recommended. This course continues those ideas rather than teaching installation and data handling from the beginning.

Are residuals always positive?

No. A residual is observed minus fitted and may be positive, zero or negative. Its absolute value is the magnitude of the gap.

Does a more flexible curve always predict better?

No. Agreement on the fitting data does not establish performance on new observations. The course introduces this issue through its closing discussion of overfitting.

Share this course

Learner reviews

Tell other learners what you actually tried. Reviews are moderated and may come from learners who have started or completed the course.

No published learner reviews yet.

Sign in to write a review

Questions still belong in the discussion below. Review and ranking rules.

Questions & discussion

Share a useful question or correction. Comments appear after moderation. Please avoid personal or sensitive information.

Add to the discussion

Keep comments relevant and respectful. Spam, adult content, and adult-site names or links are not allowed. All visitor comments are reviewed before publication.

Your email address will not be published. Required fields are marked *