← Module A

CLERK2OFFICER · CAIIB / ABM / A04

Correlation and Regression

2,829 teaching words · 25 explained questions · Interactive laboratory

Start chapter practice ↓

Original study edition R2 · 3 November 2026. Banking figures are illustrative. Not affiliated with IIBF. Lessons and practice work offline; reference links require internet. Independent academic sign-off is not claimed.

1. Two variables, two different questions

A branch manager observes that days with more applications also have longer processing times. Correlation describes the direction and strength of a particular kind of association. Regression builds an equation for predicting or describing one variable using another. The questions are related, but they are not identical. A correlation coefficient treats the two variables symmetrically. A regression equation specifies which variable is the response and which is the predictor. Neither method automatically proves that changing the predictor will cause the predicted change in the response.

Suppose x is daily application count and y is mean processing time in minutes. Each day contributes one paired observation. The pairing matters. Sorting the two columns independently destroys the relationship between application counts and their corresponding processing times. Define the period, unit and measurement rules before calculating. Data from different branches may mix branch effects with workload effects. Changes in staffing, case complexity or system availability may affect both variables. A useful analysis begins with a precise business question and a plot of the paired data, then moves to a coefficient or fitted equation with its assumptions and limitations clearly understood.

2. Read a scatter diagram

A scatter diagram places the predictor on the horizontal axis and response on the vertical axis. Each point represents one pair. An upward pattern suggests positive association, a downward pattern negative association, and a diffuse cloud weak visible association. Examine curvature, clusters, unusual observations and changing vertical spread. A straight-line summary may be reasonable for a roughly linear pattern but misleading for a curve. A U-shaped pattern can have a Pearson correlation near zero while showing a strong relationship.

Suppose short and very long queues are associated with different staffing responses. Processing time may rise with workload initially and flatten after an additional counter opens. A single line averages across that operational change. Colouring points by staffing regime can reveal separate patterns, provided the categories are known and not invented after inspecting outcomes. An isolated extreme workload day may dominate the fitted line. Investigate it before deleting it. It could be a valid stress day, a data error or a different process. Plotting does not replace numerical analysis, but it reveals whether the calculation is answering the intended question. Always label axes with units so the slope can later be interpreted correctly.

A curved relationship can have r = 0For x=0,1,2,3,4 and y=4,1,0,1,4, positive and negative cross-deviations cancel. The relation is strong but not linear.A curved relationship can have r = 0Response yPredictor x002244
For x=0,1,2,3,4 and y=4,1,0,1,4, positive and negative cross-deviations cancel. The relation is strong but not linear.

3. Covariance and cross-deviations

For each pair, subtract the corresponding sample mean to obtain deviations. Multiply the x deviation by the y deviation and sum these products. Denote the result Sxy. When large x tends to occur with large y and small x with small y, many products are positive. Opposite-direction deviations produce negative products. The sample covariance divides Sxy by n−1. Covariance therefore indicates direction, but its magnitude depends on the units of both variables.

For x values one, two and three and y values two, four and six, the means are two and four. Cross-products are two, zero and two, so Sxy is four. The sample covariance is two. Converting y from minutes to seconds multiplies covariance by sixty, even though the underlying association is unchanged. This dependence on units makes covariance difficult to compare across unrelated datasets. Correlation standardises the cross-deviation sum by the spreads of both variables. Keep the sums distinct: Sxx is the sum of squared x deviations, Syy the sum of squared y deviations, and Sxy the sum of cross-products. These three quantities also determine the simple least-squares regression coefficients.

4. Pearson correlation

Pearson correlation is r = Sxy/√(SxxSyy), provided both variables have nonzero spread. Its value lies between minus one and one. A value of one means the points lie exactly on an increasing straight line, while minus one means an exact decreasing straight line. Values near zero indicate little linear association, not necessarily no relationship. Correlation is dimensionless because the units in the numerator and denominator cancel. Swapping x and y leaves r unchanged.

If Sxy = 12, Sxx = 9 and Syy = 25, the denominator is fifteen and r = 0.8. Squaring gives 0.64, but 0.64 is not the correlation itself. Adding a constant to either variable leaves r unchanged. Multiplying a variable by a positive constant also leaves it unchanged, while multiplying one variable by a negative constant reverses its sign. If all x values are equal, Sxx is zero and correlation is undefined. Reporting zero in that situation confuses absence of measurable variation with evidence of no linear association. In examination arithmetic, check that the denominator is a square root and that the final coefficient remains within its permissible range.

5. Rank correlation

Spearman rank correlation assesses association between ranks. It is useful for ordered assessments or monotonic relationships where a straight line in the original units is not the focus. Assign ranks consistently to each variable and calculate Pearson correlation between those ranks. Tied values receive average ranks in the usual approach. Without ties, the shortcut rₛ = 1−6Σd²/[n(n²−1)] applies, where d is the difference between the two ranks for each pair. With ties, directly correlating average ranks avoids inappropriate use of the untied shortcut.

Consider five branches ranked one through five on one measure and one, three, two, five, four on another. Rank differences are zero, minus one, one, minus one and one. Their squared sum is four. The shortcut gives 1−24/120 = 0.8. This describes strong positive rank association in the small example. It does not quantify how many minutes or rupees correspond to a change in rank. A monotonic curved relation may have high rank correlation while a straight-line regression is unsuitable. Choose the measure according to the variable scale and question, and do not interpret a ranking coefficient as a direct prediction equation in the original measurement units.

6. Correlation does not establish cause

Two variables can move together because one affects the other, because a third factor affects both, because of selection, or because of chance. Ice-cream sales and electricity demand may both rise in hot weather. In banking, marketing activity may increase both applications and staff allocation, complicating the observed workload-delay relationship. Reverse causation can also matter. Managers may add staff when queues lengthen, creating a positive association between staffing and delays even if extra staff helps reduce waiting.

Aggregating across groups can change or reverse a relationship. Branches handling complex cases may have both higher staffing and longer processing times, while within each branch more staffing reduces delays. Compare relevant subgroups and understand how observations were selected. A predictive association can still be useful without a causal interpretation. Workload may help forecast staffing needs even when the fitted slope is not an intervention effect. State that distinction. To evaluate a policy change, stronger evidence such as a well-designed experiment or credible causal design may be needed. A high correlation is a numerical feature of observed pairs, not an automatic instruction to change one variable and expect the regression prediction to follow.

7. Fit the regression of y on x

Simple linear regression represents the fitted response as ŷ = a + bx. The slope b estimates the change in fitted y for one unit increase in x. Least squares chooses a and b to minimise the sum of squared vertical residuals, where each residual is observed y minus fitted y. With an intercept, b = Sxy/Sxx and a = ȳ−bx̄. The fitted line passes through the point formed by the two sample means.

Using Sxy = 12, Sxx = 9, x̄ = 4 and ȳ = 8 gives b = 4/3 and a = 8/3. The fitted equation is ŷ = 8/3 + (4/3)x. At x = 7, the predicted response is twelve. The slope has units of y per unit of x. If x is applications per hour and y is processing minutes, the slope describes fitted minutes per additional application per hour. The intercept is the predicted response when x is zero. If zero lies outside the observed range or has no meaningful operational interpretation, treat the intercept mainly as a parameter locating the fitted line rather than a literal baseline promise.

8. A complete numerical fit

Take four illustrative observations with x values one, two, three and four, and y values two, three, five and four. The means are 2.5 and 3.5. The squared x deviations sum to five. The cross-deviations sum to four. Thus the slope is 0.8 and the intercept is 1.5. Predicted y values are 2.3, 3.1, 3.9 and 4.7. Residuals are minus 0.3, minus 0.1, 1.1 and minus 0.7. Their sum is zero apart from rounding, as expected for an ordinary least-squares fit with an intercept.

Squared residuals sum to 1.8. The squared y deviations from its mean sum to five. Therefore the fraction of total squared variation represented by the fitted line is 1−1.8/5 = 0.64. The correlation is 4/√25 = 0.8, and its square agrees with that value. This compact example connects the line, predictions, residuals and fit measure. A positive residual means the actual response exceeded the prediction. A negative residual means it fell below. Do not reverse this sign convention midway through a calculation. Although squaring removes the sign for total error, the sign is essential when diagnosing systematic overprediction or underprediction.

Paired observationsPairs (1,2), (2,3), (3,5), (4,4) give r=0.8 and fitted y=1.5+0.8x. Points are observations, not a time sequence.Paired observationsResponse yPredictor x0032.565
Pairs (1,2), (2,3), (3,5), (4,4) give r=0.8 and fitted y=1.5+0.8x. Points are observations, not a time sequence.

9. The other regression line

Regressing x on y minimises squared errors in x rather than y. Its slope is Sxy/Syy and its intercept is x̄ minus that slope times ȳ. It is generally not obtained by algebraically reversing the regression of y on x. The two objectives differ because vertical and horizontal prediction errors are different quantities. Both fitted lines pass through the sample-means point, but they coincide as exact inverse relationships only in the perfect linear-correlation case with nonzero variation.

If Sxy = 12 and Syy = 25, the slope for x on y is 0.48. With means four and eight, its intercept is 0.16. The equation is x̂ = 0.16 + 0.48y. The product of the two regression slopes is r². Here (4/3) × 0.48 = 0.64. Both slopes have the same sign as correlation, but a regression slope can exceed one because it depends on units. Correlation cannot exceed one in magnitude. These relationships provide useful checks in problems that supply regression coefficients instead of raw data. Select the equation according to which variable the question asks you to predict.

10. Explained variation and residual error

With an intercept, total squared variation in y can be divided into fitted and residual components. The residual sum of squares is SSE. The total sum of squared deviations from ȳ is SST. The coefficient of determination is R² = 1−SSE/SST when SST is positive. In simple ordinary least-squares regression with an intercept, R² equals r². It describes the proportion of sample squared variation accounted for by the fitted line. It is not the percentage of predictions that are correct and does not establish causation.

Residual standard error is √[SSE/(n−2)] for a simple regression with an intercept and slope. Two estimated parameters consume two degrees of freedom. With n = 10 and SSE = 32, the estimate is √4 = 2 response units. In the four-observation example, it is √(1.8/2), approximately 0.949. Some descriptive treatments use a root mean squared residual with denominator n. That is a different quantity and should be labelled accordingly. An impressive R² can coexist with prediction errors too large for the business decision. Compare residual error with service tolerances, costs and the range of outcomes, not just with a generic threshold for a good fit.

11. Assumptions and diagnostic patterns

Computing a least-squares line is an algebraic operation. Using it for inference or future prediction requires additional assumptions. A useful linear model assumes the conditional mean of the response is adequately represented by a line and that errors have mean zero given the predictor. Standard textbook uncertainty formulas often assume independent errors and constant error variance. Normal errors support exact small-sample t and related results. These conditions are not all required merely to calculate the slope, but they affect what conclusions can be drawn from it.

Plot residuals against fitted values and time. A curved residual pattern suggests that the mean relationship is not adequately linear. A widening funnel suggests changing error variance. Runs of positive residuals over time may indicate dependence or an omitted seasonal effect. A single influential point can alter the slope substantially, especially if its predictor value is far from the rest. Investigate its source and compare fits transparently rather than deleting it to improve appearance. If data is clustered by branch, ordinary independent-error formulas can understate uncertainty. Diagnostics help decide whether to refine the model, change the prediction scope or report that the available data is insufficient for the intended use.

12. Prediction and extrapolation

Interpolation predicts within the observed predictor range. Extrapolation predicts outside it and relies more heavily on assuming the same relationship continues. A line fitted to workloads between ten and thirty applications per hour may produce implausible predictions at one hundred, where capacity limits and queueing effects become important. Even within the range, a fitted value is an estimate of a conditional mean, not a guarantee for an individual future observation.

A confidence interval for the mean response at a specified x accounts for uncertainty in the estimated line. A prediction interval for one new response also includes individual error variation and is therefore wider under the same model. Both tend to widen as x moves away from the observed mean because the fitted line is less precisely located there. A full interval calculation requires more than the slope and intercept alone. It needs residual variance, sample size and predictor spread. Do not fabricate an uncertainty band from an arbitrary percentage of the prediction. For operational use, evaluate predictions on data not used to fit the model and report the horizon and population to which the assessment applies.

13. Banking use and validation

A regional team wants to forecast daily processing effort from application volume. It collects paired daily observations, checks time definitions, plots the data and identifies days affected by outages. It fits a line on an earlier period and evaluates it on later days. The test period should remain outside the fitting and method-selection process as far as practical. Otherwise, reported error can be too optimistic. If staffing or product mix changes materially, the model may need updating even when the historical fit was strong.

Suppose the model predicts forty minutes and the observed daily mean is forty-six. The residual is six minutes. If several high-workload days show similar positive residuals, the model may systematically underestimate busy-day delays. A high overall correlation does not excuse that operational failure. Examine errors by workload range, branch type and relevant time periods. Compare the model with a simple baseline such as the historical mean. A more complicated method should earn its place through useful improvement, not merely more parameters. Keep the model's purpose clear. Forecasting effort, identifying associations and evaluating a staffing intervention are different tasks, even when they begin with the same pair of columns.

14. Examination and calculator checks

Before calculating, identify the response variable and inspect whether the provided information is raw data, deviation sums or regression coefficients. For Pearson correlation, use the square root of the product of squared-deviation sums. For the regression slope, divide the cross-deviation sum by the predictor's squared-deviation sum. Compute the intercept from the means. Substitute the requested predictor value and retain units. If the question asks for residual standard error, determine whether it uses the inferential n−2 convention or a descriptive alternative.

Check that the fitted line passes through the sample-means point and that correlation lies between minus one and one. When both regression slopes are supplied, their product should be nonnegative and no greater than one for a valid paired dataset under these definitions. A slope greater than one is not itself an error. A correlation greater than one is. Use the interactive paired-data calculator to change one unusual observation and observe the effects on slope, correlation and residual error. Explain the change in terms of geometry and prediction rather than merely reporting the new numbers. The central skill is choosing and interpreting the right relationship for the question.

Guided exercise: units and model checks

A fitted line predicts processing minutes as twelve plus two times the number of daily application batches. At five batches the prediction is twenty-two minutes. If the actual mean is twenty-five minutes, the residual is positive three minutes. Converting the response to seconds multiplies the intercept, slope, prediction and residual by sixty. The new equation predicts seconds as 720 plus 120 times batches, and the residual becomes 180 seconds. Correlation remains unchanged because the conversion is a positive scaling.

Now express workload in groups of ten batches. The numerical predictor becomes one tenth as large, so the slope per new workload unit becomes twenty minutes. The physical relationship has not become stronger merely because its numerical slope increased. This illustrates why slopes from differently scaled datasets cannot be compared as if they were correlation coefficients. If the original observations covered only two through eight batches, predicting at fifty batches is substantial extrapolation. The line still produces a number, but the number may ignore capacity saturation or staffing changes. Check the range and the operational mechanism before using it. A prediction calculator can verify substitution and units, while judgement about the prediction's relevance still depends on the data and the process represented by the model.

Paired-data regression laboratory

Lists must contain the same number of paired observations, at least three, with variation in both variables.

Change the inputs, then calculate.

Practice and review

25 questions. One answer per question, no negative marking. Explanations remain readable without JavaScript.

Local browser storage only; no account synchronisation.

1. Why must paired observations remain paired?
Answer and option explanations

Correct answer: C. Independent sorting destroys observed relationships.

  • A. Cross-products depend on pairing.
  • B. It creates an artificial association.
  • C. Independent sorting destroys observed relationships.
  • D. The requirement is general.
2. A U-shaped scatter has r near zero. What follows?
Answer and option explanations

Correct answer: C. Pearson r summarises linear structure.

  • A. The result is mathematically possible.
  • B. A curved dependence can remain.
  • C. Pearson r summarises linear structure.
  • D. A suitable nonlinear model may be useful.
3. Sxy=12, Sxx=9 and Syy=25. What is r?
Answer and option explanations

Correct answer: A. Divide twelve by √225=fifteen.

  • A. Divide twelve by √225=fifteen.
  • B. That is the x-on-y slope.
  • C. That is the y-on-x slope.
  • D. That is r squared.
4. If all x observations are identical, what is Pearson correlation?
Answer and option explanations

Correct answer: D. Sxx is zero, so the denominator vanishes.

  • A. A constant variable does not establish a line with measurable correlation.
  • B. No negative relation is established.
  • C. No variation is not evidence of zero association.
  • D. Sxx is zero, so the denominator vanishes.
5. Changing y from minutes to seconds does what to r?
Answer and option explanations

Correct answer: D. Positive scaling cancels in standardisation.

  • A. Correlation is dimensionless.
  • B. Covariance and slope scale, correlation does not.
  • C. Unit conversion does not improve association.
  • D. Positive scaling cancels in standardisation.
6. What happens to r if one variable is multiplied by −1?
Answer and option explanations

Correct answer: A. The direction reverses while strength is preserved.

  • A. The direction reverses while strength is preserved.
  • B. A nonzero sign changes.
  • C. Scaling does not create perfect fit.
  • D. Both variables can still vary.
7. Without ties, n=5 and sum of squared rank differences=4. What is Spearman correlation?
Answer and option explanations

Correct answer: D. Use 1−24/(5×24).

  • A. Ranks differ, so agreement is not perfect.
  • B. It does not follow the rank formula.
  • C. That is the amount subtracted from one.
  • D. Use 1−24/(5×24).
8. How should tied ranks usually be handled?
Answer and option explanations

Correct answer: B. This accounts for ties directly.

  • A. Its assumptions do not hold.
  • B. This accounts for ties directly.
  • C. That introduces arbitrary order.
  • D. That unnecessarily changes the sample.
9. Which example shows a possible confounder of workload and delay?
Answer and option explanations

Correct answer: C. A third factor can create or alter association.

  • A. Presentation does not explain the relationship.
  • B. That changes units, not the causal structure.
  • C. A third factor can create or alter association.
  • D. That transforms a statistic, not the process.
10. Which quantity does y-on-x least squares minimise?
Answer and option explanations

Correct answer: A. The response prediction errors are squared and added.

  • A. The response prediction errors are squared and added.
  • B. Least squares does not minimise r.
  • C. That is a different fitting criterion.
  • D. That is unrelated to fitting y.
11. For Sxy=12 and Sxx=9, what is y-on-x slope?
Answer and option explanations

Correct answer: C. Divide cross-deviation sum by predictor squared-deviation sum.

  • A. That uses Syy and predicts x.
  • B. That reverses the ratio.
  • C. Divide cross-deviation sum by predictor squared-deviation sum.
  • D. That is correlation when Syy=25.
12. With means x=4, y=8 and slope 4/3, what is intercept?
Answer and option explanations

Correct answer: B. Use 8−(4/3)×4.

  • A. That is the predictor mean.
  • B. Use 8−(4/3)×4.
  • C. That is slope times mean x.
  • D. That omits the slope adjustment.
13. For ŷ=8/3+(4/3)x, what is prediction at x=7?
Answer and option explanations

Correct answer: C. The two terms sum to 36/3.

  • A. That repeats the predictor.
  • B. That is the response mean in the example.
  • C. The two terms sum to 36/3.
  • D. That omits the intercept.
14. Actual y is 15 and fitted y is 12. What is residual?
Answer and option explanations

Correct answer: B. Residual is actual minus fitted.

  • A. Adding does not measure error.
  • B. Residual is actual minus fitted.
  • C. That reverses the stated convention.
  • D. That is a ratio, not a residual.
15. Where does an ordinary least-squares line with intercept pass?
Answer and option explanations

Correct answer: C. The intercept formula ensures this.

  • A. Extremes need not lie on the line.
  • B. Only some fitted intercepts are zero.
  • C. The intercept formula ensures this.
  • D. Residuals generally remain.
16. Why is reversing the y-on-x equation generally not the x-on-y regression?
Answer and option explanations

Correct answer: C. Horizontal and vertical errors produce different solutions.

  • A. Pearson correlation is symmetric.
  • B. It is possible but usually not the other least-squares fit.
  • C. Horizontal and vertical errors produce different solutions.
  • D. Units and denominators differ.
17. Two regression slopes are 4/3 and 0.48. What is their product?
Answer and option explanations

Correct answer: D. The product equals r² under these definitions.

  • A. That adds slopes.
  • B. That is the positive square root.
  • C. Both slopes have the same sign.
  • D. The product equals r² under these definitions.
18. With SST=5 and SSE=1.8, what is R²?
Answer and option explanations

Correct answer: B. Use 1−1.8/5.

  • A. That is explained sum of squares, not its proportion.
  • B. Use 1−1.8/5.
  • C. That is the unexplained fraction.
  • D. That is positive r in the example.
19. For n=10 and SSE=32, what is residual standard error with intercept and slope?
Answer and option explanations

Correct answer: C. Use √(32/(10−2)).

  • A. That is residual variance.
  • B. That is SSE/n without taking a root.
  • C. Use √(32/(10−2)).
  • D. That uses n rather than n−2.
20. What does R²=0.64 mean here?
Answer and option explanations

Correct answer: D. It is a variation decomposition.

  • A. R² is dimensionless.
  • B. R² is not a correctness rate.
  • C. It is not a causal fraction.
  • D. It is a variation decomposition.
21. A funnel-shaped residual plot most directly suggests what?
Answer and option explanations

Correct answer: A. Spread varies with fitted level.

  • A. Spread varies with fitted level.
  • B. The pattern is diagnostically relevant.
  • C. The pattern suggests the opposite.
  • D. Variance pattern does not determine slope.
22. Predicting workload 100 from data covering 10 to 30 is what?
Answer and option explanations

Correct answer: B. The predictor lies outside observed support.

  • A. This is prediction, not enumeration.
  • B. The predictor lies outside observed support.
  • C. That would stay within the range.
  • D. High historical correlation does not guarantee the extension.
23. Which interval is generally wider under the same regression model?
Answer and option explanations

Correct answer: C. It adds individual error to line-estimation uncertainty.

  • A. Both generally depend on it.
  • B. It excludes the new observation's individual error.
  • C. It adds individual error to line-estimation uncertainty.
  • D. They target different quantities.
24. Which evaluation better reflects future forecasting performance?
Answer and option explanations

Correct answer: B. It preserves chronology and separates fitting from testing.

  • A. That can be optimistic.
  • B. It preserves chronology and separates fitting from testing.
  • C. That leaks evaluation information.
  • D. That selects favourable evidence without a valid test.
25. Can a regression slope exceed one?
Answer and option explanations

Correct answer: C. A slope is not bounded like correlation.

  • A. The formulas and units differ.
  • B. Valid slopes can be arbitrarily large.
  • C. A slope is not bounded like correlation.
  • D. Ordinary R² with intercept remains within its usual range.

Ready: 25 questions.

References and scope

Original exposition, cases and questions. Formula conventions are stated in the lesson. Automated checks support arithmetic and functionality; they are not independent academic certification.