UNSW Sydney · FACULTY OF ENGINEERING

CVEN9407 Chap.6 Inference and Prediction from a Fitted Regression

- one subject, every graph, every model, every mark
6 Chapters3-page Bible
Our own words - no uploaded lecturer files
Updated for this semester
Chapter 6 of 12 · CVEN9407

Inference and Prediction from a Fitted Regression

A fitted line becomes evidence only when its uncertainty is measured. This chapter explains why the errors are assumed normal and independent, how that assumption turns estimates into t and F statistics, and why maximum likelihood understates the error variance in small samples.

Continuing the trip-generation data, it tests whether the slope differs from zero and whether it lies below one, builds its confidence interval, and confirms the F ratio. It then separates prediction of a mean response from prediction for one household and shows how to report a regression.

This is the chapter that turns estimates into statements a reader can act on.

In the first project report, each coefficient needs a standard error and a test, the model needs an overall F test, and any forecast for your area needs an interval. The same t and F logic carries into the multiple regression and diagnostics of the next chapter without change.

In this chapter

What this chapter covers

  • 01

    The classical normal linear regression model

  • 02

    Estimating the error variance and standard errors

  • 03

    Slope t tests and confidence intervals

  • 04

    The F ratio and analysis of variance

  • 05

    Mean and individual prediction

  • 06

    Reporting a regression

Worked example · free

Testing and bounding a slope from 22 observations

Q [3 marks]. A regression of yearly crashes on traffic volume (in thousands of vehicles a day) uses 22 sites and gives a slope of 0.48 with standard error 0.16. Test whether the slope is zero at 5% and give the 95% interval, using t with 20 degrees of freedom equal to 2.086. The mark allocation is our own practice weighting and is not an official university scheme.
Two bands around one fitted line.Two bands around one fitted line. The narrow blue band is the 95% interval for the mean number of trips at each vehicle count; the wide amber band is the interval for one household. Both are narrowest at the mean of X and widen towards the edges and beyond the data.mean of Xindividual bandmean bandvehicles per householdtrips
Two bands around one fitted line. The narrow blue band is the 95% interval for the mean number of trips at each vehicle count; the wide amber band is the interval for one household. Both are narrowest at the mean of X and widen towards the edges and beyond the data.
  • 1t = 0.48 / 0.16 = 3.00, with n - 2 = 20 degrees of freedom.
  • 1Since 3.00 > 2.086, reject a zero slope at the 5% level.
  • 1Interval: 0.48 +/- 2.086 x 0.16 = 0.48 +/- 0.334, which is 0.146 to 0.814 extra crashes a year per thousand vehicles a day.
t = 3.00, so the slope is significant; the 95% interval runs from 0.146 to 0.814.
Sia tip — Count the degrees of freedom as observations minus estimated coefficients, n - 2 for one regressor, before reading the t table.
Glossary

Key terms

Standard error
A standard error is the estimated standard deviation of an estimator's sampling distribution, used to scale t statistics.
Confidence band
A confidence band is the set of interval limits around a fitted line, widening with distance from the mean of X.
Mean prediction
Mean prediction estimates the average value of Y for all units at a chosen value of X.
Individual prediction
Individual prediction estimates the value of Y for a single new unit and carries the extra variance of one disturbance.
Analysis of variance
Analysis of variance splits the total variation in the dependent variable into the part the regression explains and the residual part.
FAQ

Inference and Prediction from a Fitted Regression FAQ

Why is the error variance divided by n minus two?

Two coefficients, the intercept and the slope, are estimated from the same data before the residuals are computed, which uses up two degrees of freedom. Dividing by n minus two makes the estimate of the error variance unbiased.

Why is the interval for one new case wider than the interval for the mean?

The mean prediction is uncertain only because the line is estimated. A single new case adds its own random disturbance on top of that, so its interval must cover both sources of variation.

Are the t test and the F test different with one regressor?

No. With a single explanatory variable the F statistic equals the square of the t statistic on the slope, so the two give the same decision; F becomes useful for joint tests once there are several regressors.

What should a regression results table in my report include?

Each coefficient with its standard error and t ratio or p value, the number of observations, R squared and adjusted R squared, the F statistic, and a note defining the variables and significance markers. The brief asks for clean tables, not pasted software output.

Can I forecast outside the range of my data?

You can compute a number, but the prediction interval widens quickly away from the mean of X, and the straight-line form has never been tested there. Flag such forecasts clearly in a report and prefer statements within the observed range.

Study strategy

Assessment move

Practise turning raw regression output into three sentences: the effect with its interval, the test result with its p value, and the fit. Rework the prediction formulas at a value of X near the mean and at one far from it, and notice how the interval grows. Use that contrast when you discuss forecasts in your report. Build one results table in the format your report will use and reuse it for every regression you present.

Working through Inference and Prediction from a Fitted Regression in CVEN9407? Sia is AskSia’s AI Engineering tutor — ask any CVEN9407 Inference and Prediction from a Fitted Regression question and get a clear, step-by-step explanation grounded in how CVEN9407 is taught and assessed. Read this chapter free, then take your hardest questions to Sia.

A+Everything unlocked
Unlocks this Bible + all 100 of your UNSW Sydney subjects - and 1,000+ Bibles across every Australian university.
Sia - your CVEN9407 tutor, unlimited, worked the way the exam marks it
The full 3-page Bible + practice bank with worked solutions
Chrome extension - sync your LMS so Sia knows your deadlines
Bilingual EN / Chinese on every Bible and every Sia answer
$0.99 Trial
30-day money-back · cancel in one tap · how it works
CVEN9407 · Transport Demand Modelling - independent study guide on the AskSia Library. More UNSW Sydney subjects · Microeconomics across all universities