Dataplot Vol 2 Vol 1

# SUM OF SQUARES FROM MEAN

Name:
SUM OF SQUARES FROM MEAN (LET)
Type:
Let Subcommand
Purpose:
Compute the sum of squares from the mean of a variable.
Description:
The sum of squares from the mean has the formula:

$$\mbox{SSQ} = \sum_{i=1}^{n}{(X_{i} - X_{i})^{2}}$$

with $$\bar{X}$$ denoting the mean of the Xi.

You can also compute the difference of the sum of squares from the mean between two response variables. That is, compute the sum of squares from the mean for each variable and then compute the difference between these two values.

Syntax 1:
LET <par> = SUM OF SQUARES FROM MEAN <y>
<SUBSET/EXCEPT/FOR qualification>
where <y> is the response variable;
<par> is a parameter where the computed sum of squares from the mean is saved;
and where the <SUBSET/EXCEPT/FOR qualification> is optional.
Syntax 2:
LET <par> = DIFFERENCE OF SUM OF SQUARES FROM MEAN <y1> <y2>
<SUBSET/EXCEPT/FOR qualification>
where <y1> is the first response variable;
<y2> is the second response variable;
<par> is a parameter where the computed difference of the sum of squares from the mean is saved;
and where the <SUBSET/EXCEPT/FOR qualification> is optional.

This syntax computes the sum of squares from the mean of <y1> and <y2> and then computes the difference of the two sum of squares values.

Examples:
LET A = SUM OF SQUARES FROM MEAN Y1
LET A = SUM OF SQUARES FROM MEAN Y1 SUBSET TAG > 2
LET A = DIFFERENCE OF SUM OF SQUARES FROM MEAN Y1 Y2
Default:
None
Synonyms:
SUMS OF SQUARES FROM MEAN is a synonym for SUM OF SQUARES FROM MEAN
Related Commands:
 SUM OF SQUARES = Compute the sum of squares for a variable. MEAN = Compute the mean of a variable. STANDARD DEVIATION = Compute the standard deviation of a variable. ROOT MEAN SQUARE = Compute the root mean square error of a variable.
Applications:
Statistics
Implementation Date:
2013/2
Program:

LET Y1 = NORMAL RANDOM NUMBERS FOR I = 1 1 100
LET Y1 = 10 + 5*Y1
LET SSQM = SUM OF SQUARES FROM MEAN Y1
SET WRITE DECIMALS 4
PRINT "Sum of Squares from Mean = ^SSQM"

The following output is generated.
Sum of Squares from Mean = 2136.114616


NIST is an agency of the U.S. Commerce Department.

Date created: 03/08/2013
Last updated: 11/12/2015