Coding Bivariate Data (Edexcel International AS Maths: Statistics 1): Revision Note

Exam code: XMA01

Dan Finlay

Written by: Dan Finlay

Reviewed by: Lucy Kirkham

Updated on

Coding with PMCC

Does coding affect the product moment correlation coefficient (PMCC)?

  • We can code data using linear transformations

    • X = px + q

    • Y = my + n

      • The new variables won't necessarily be the upper case versions of the old variables - they could be any letter

  • Sxx,Syy and Sxy are related to variances so they are affected when the coding involves a multiplication

    • SXX=p2×Sxx

    • SYY=m2×Syy

    • SXY=pm×Sxy

  • Coding does not affect the product moment correlation coefficient

    • The factors of p and m cancel out in the formula

    • rXY=rxy

Coding Linear Regression

Does coding affect the equation of the regression line of y on x?

  • Coding does affect the equation of the regression line of y on x

  • Coding is used to make numbers simpler to work with

  • The equation of the regression line of Y on X can be calculated using the coded data

  • This equation can then be used to find the equation of the regression line of y on x

How do I use coding to find the equation of the regression line of y on x?

  • Given the variables x and y are coded using

    • X = px + q

    • Y = my + n

  • The equation of the regression line of Y on X can be calculated as Y = A + BX

  • To find the equation of the regression line of y on x

    • Substitute the codes into the equation

      • my + n = A + B(px + q)

    • Rearrange into the form y = a + bx

Worked Example

Stewart collects data to compare the salaries, £s , and lengths of service, l years, of employees in a business. Stewart codes the data using the formulae

 m=s3000012 and w=52l.

Stewart finds that:

  • the product moment correlation coefficient between m and w is 0.739,

  • the equation of the regression line of mon y is m=83.1+3.65w

(a) Write down the product moment correlation coefficient between s and l.

 

(b) The equation of the regression line of s on l can be written as s=a+bl. Find the      values of a and b to three significant figures.

Answer:

1-3-3-coding-bivariate-data-we-solution-part-1
1-3-3-coding-bivariate-data-we-solution-part-2

Examiner Tips and Tricks

  • When rearranging the equation of the regression it is important that you don’t round your coefficients until the very end. Use your ANS button on your calculator to keep the accuracy.

Unlock more, it's free!

Join the 100,000+ Students that ❤️ Save My Exams

the (exam) results speak for themselves:

Build on this topic

Dan Finlay

Author: Dan Finlay

Expertise: Portfolio Lead

Dan graduated from the University of Oxford with a First class degree in mathematics. As well as teaching maths for over 8 years, Dan has marked a range of exams for Edexcel, tutored students and taught A Level Accounting. Dan has a keen interest in statistics and probability and their real-life applications.

Lucy Kirkham

Reviewer: Lucy Kirkham

Expertise: Content Creator

Lucy has been a passionate Maths teacher for over 12 years, teaching maths across the UK and abroad helping to engage, interest and develop confidence in the subject at all levels.Working as a Head of Department and then Director of Maths, Lucy has advised schools and academy trusts in both Scotland and the East Midlands, where her role was to support and coach teachers to improve Maths teaching for all.