Calculate the sum of squares (SSE)

Author: Charles Brown
Date Of Creation: 9 February 2021
Update Date: 1 July 2024
Anonim
11 ii. Sum of Square Error using scientific calculator. SSE, SST
Video: 11 ii. Sum of Square Error using scientific calculator. SSE, SST

Content

The sum of squares, or SSE, is a preliminary statistical calculation that leads to different data values. When you have a set of data values, it is useful to be able to determine how closely related these values ​​are. You have to organize your data in a table and then perform fairly simple calculations. Once you find the SSE for a data set, you can then find the variance and standard deviation.

To step

Method 1 of 3: Calculate the SSE by hand

  1. Create a three-column table. The clearest way to calculate SSE is to start with a three column table. Label the three columns Value{ displaystyle { text {Value}}}Fill in the details. The first column contains the values ​​of your measurements. Fill the column Value{ displaystyle { text {Value}}}Calculate the mean. Before you can calculate the error for each measurement, you must calculate the mean of the entire data set.
    • The mean of a data set is the sum of the values ​​divided by the number of values ​​in the set. This can be represented symbolically, with the variable μ{ displaystyle mu}Calculate the individual error values. In the second column of your table, you must enter the error values ​​for each data value. The error is the difference between the measurement and the average.
      • For the given data set, subtract the mean, 98.87, from each measured value and fill in the second column with the results. These ten calculations go as follows:
        • 99,098,87=0,13{ displaystyle 99.0-98.87 = 0.13}Calculate the SSE. In the third column of the table, find the square of each of the resulting values ​​in the middle column. These represent the squares of the deviation from the mean for each measured data value.
          • For each value in the middle column, use a calculator to calculate the square. Record the results in the third column, as follows:
            • 0,132=0,0169{ displaystyle 0.13 ^ {2} = 0.0169}Add up the squares of the errors. The last step is to find the sum of the values ​​in the third column. The desired result is the SSE, or the sum of the squares of the errors.
              • For this data set, the SSE is calculated by adding the ten values ​​in the third column:
              • S.S.E=6,921{ displaystyle SSE = 6.921}Label the columns of the spreadsheet. You create a table with three columns in Excel, with the same three headings as above.
                • In cell A1, type "Value" as the heading.
                • In box B1, type "Deviation" as the heading.
                • In box C1, type "Deviation squared" as the heading.
              • Enter your details. In the first column you have to enter the values ​​of your measurements. If the set is small, you can easily type it in by hand. If you have a large data set, you may need to copy and paste the data into the column.
              • Determine the average of the data points. Excel has a function that calculates the average for you. In an empty cell below your data table (it doesn't matter which cell you choose), enter the following:
                • = Average (A2: ___)
                • Do not enter blank space. Fill in that space with the cell name of your last data point. For example, if you have 100 data points, you would use the function:
                  • = Average (A2: A101)
                  • This function contains the data from cells A2 through A101, because the top row contains the column headings.
                • When you press Enter or when you click to another cell in the table, the newly programmed cell is automatically filled with the average of your data values.
              • Enter the function for the error measurements. In the first empty cell in the "Deviation" column, enter a function to calculate the difference between each data point and the mean. To do this, use the cell name where the mean is located. Let's assume you've used cell A104 for now.
                • The error calculation function that you enter in cell B2 is:
                  • = A2- $ A $ 104. The dollar signs are needed to make sure you lock box A104 for any calculation.
              • Enter the function for the squared errors. In the third column you can instruct Excel to calculate the desired square.
                • In cell C2, enter the following function:
                  • = B2 ^ 2
              • Copy the functions to fill the entire table. After entering the functions in the top cell of each column, B2 and C2 respectively, you need to fill in the entire table. You could retype the function in any line of the table, but this would take far too long. Using your mouse, highlight cells B2 and C2 together, and without releasing the mouse button, drag to the bottom cell of each column.
                • Assuming you have 100 data points in your table, drag your mouse to cells B101 and C101.
                • When you release the mouse button, the formulas are copied to all cells of the table. The table should be automatically filled with the calculated values.
              • Find the SSE. Column C of your table contains all squared error values. The last step is to let Excel calculate the sum of these values.
                • In a cell below the table, probably C102 in this example, enter the following function:
                  • = Sum (C2: C101)
                • If you click Enter or click away in another cell of the table, you will get the SSE value of your data.

Method 3 of 3: Relate SSE to other statistics

  1. Calculate the deviation from the SSE. Finding the SSE for a dataset is generally a building block for finding other, more useful, values. The first of these is variance. The variance is a measure of how much the measured data deviates from the mean. It is actually the mean of the squared differences from the mean.
    • Since the SSE is the sum of the squared errors, you can find the mean (that's the variance) just by dividing by the number of values. However, if you calculate the variance of a sample series, rather than an entire population, you divide the variance by (n-1) instead of by n. So:
      • Variance = SSE / n, if you calculate the variance of an entire population.
      • Variance = SSE / (n-1), when calculating the variance of a sample of data.
    • For the sampling problem of the temperature of the patients, we can assume that 10 patients are only a sample. Therefore, the variance is calculated as follows:
      • Variance=SSE(n1){ displaystyle { text {Variance}} = { frac { text {SSE}} {(n-1)}}}Calculate the standard deviation of the SSE. Standard deviation is a commonly used value that indicates how far the values ​​of a data set deviate from the mean. The standard deviation is the square root of the variance. Remember that the variance is the mean of the squared error measurements.
        • Therefore, after calculating the SSE, you can find the standard deviation like this:
          • Standard deviation=SSEn1{ displaystyle { text {Standard deviation}} = { sqrt { frac { text {SSE}} {n-1}}}}Use SSE to determine the covariance. This article has focused on datasets that measure only a single value at a time. However, in many studies you may compare two separate values. For example, you want to know how those two values ​​relate to each other, not just to the mean of the data set. This value is the covariance.
            • The calculations for covariance are too detailed to be described here, except to note that you will use the SSE for each data type and then compare it. For a more detailed description of the covariance and the calculations involved, you can find articles on this topic on wikiHow.
            • As an example of the use of covariance, you could compare the age of the patients in a medical study with the effectiveness of a drug in lowering a fever temperature. Then you have one data set of ages and a second data set of temperatures. You will then find the SSE for each data set, and from there the variance, standard deviations and covariance.