20.2 C
London
Sunday, June 22, 2025
HomeStatistics TutorialStatologyHow to Calculate Sxy in Statistics (With Example)

How to Calculate Sxy in Statistics (With Example)

Related stories

Learn About Opening an Automobile Repair Shop in India

Starting a car repair shop is quite a good...

Unlocking the Power: Embracing the Benefits of Tax-Free Investing

  Unlocking the Power: Embracing the Benefits of Tax-Free Investing For...

Income Splitting in Canada for 2023

  Income Splitting in Canada for 2023 The federal government’s expanded...

Can I Deduct Home Office Expenses on my Tax Return 2023?

Can I Deduct Home Office Expenses on my Tax...

Canadian Tax – Personal Tax Deadline 2022

  Canadian Tax – Personal Tax Deadline 2022 Resources and Tools...

In statistics, Sxy represents the sum of the product of the differences between x values and the mean of x and the differences between y values and the mean of y.

This value is often calculated when fitting a simple linear regression model by hand.

We use the following formula to calculate Sxy:

Sxy = Σ(xix)(yiy)

where:

  • Σ: A symbol that means “sum”
  • xi: The ith value of x
  • x: The mean value of x
  • yi: The ith value of y
  • y: The mean value of y

The following example shows how to use this formula in practice.

Example: Calculating Sxy by Hand

Suppose we would like to fit a simple linear regression model to the following dataset:

Suppose we would like to calculate Sxy for this dataset.

First, we must calculate the mean value of x:

  • x = (1 + 2 + 2 + 3 + 5 + 8) / 6 = 3.5

Then, we must calculate the mean value of y:

  • y = (8 + 12 + 14 + 19 + 22 + 21) / 6 = 16

Using these values, the following screenshot shows how to calculate the value for Sxy:

Sxy calculation in linear regression

The value for Sxy turns out to be 59.

Note that we could also use the Sxy Calculator to automatically calculate the value of Sxy for this model as well:

The calculator returns a value of 59, which matches the value that we calculated by hand.

Note that we use the following formulas to perform simple linear regression by hand:

y = a + bx

where:

  • a = y – bx
  • b = Sxy / Sxx

The calculation for Sxy is just one calculation that we must perform in order to fit a simple linear regression model.

Related: How to Calculate Sxx in Statistics

Additional Resources

The following tutorials explain how to perform other common tasks in statistics:

How to Perform Simple Linear Regression by Hand
How to Perform Multiple Linear Regression by Hand

Subscribe

- Never miss a story with notifications

- Gain full access to our premium content

- Browse free from up to 5 devices at once

Latest stories