10 Statistics
SpicyRPN accumulates observations and calculates averages, sample standard deviations, and a straight-line fit. Enter each observation once, then request as many results as you need from the stored totals. You can add another observation or remove a known incorrect one without starting the whole calculation again.
In RPN, three statistics keys occupy the fixed row beside STO and RCL. In ALG, orange FUNC, labeled STAT, opens labeled worksheets. Both modes use the same six accumulators, retained across mode changes and relaunch. Neither mode stores the original sample list, so removing an observation requires its original coordinates.
RPN readers can follow the key sequences below. ALG readers should start with section 10.10 for worksheet entry, then use the sections on means, deviations, regression, and estimation for the shared formulas and interpretation. Worksheet fields replace the RPN entry sequences.
In the RPN instructions, X is the current stack position labeled S0 in the full-stack view, and Y is S1. Last X and Last Y are separate saved operands. Lowercase \(x,y\) name an observation’s coordinates; ALG’s X and Y fields are named worksheet inputs, not RPN stack positions.
Clearing with an unfinished entry
10.2 Enter observations in the right order
Single-variable observations
10.3 What the six accumulators retain
10.4 Correct or remove an observation
10.5 Means and weighted means
10.6 Sample standard deviations
10.7 Fit a straight line
10.8 Estimate a response and read correlation
10.9 Inspect the totals and preserve useful results
10.10 Statistics worksheets in ALG
10.11 Stack effects, errors, and numerical limits
Large offsets and small variation
10.1 Prepare the statistical bank
The statistical bank is separate from the stack, ordinary memories, and financial registers. Clearing the stack does not remove observations. Before a new data set, clear the statistics explicitly with f \(\Sigma +\), selecting the orange \(\mathrm {CL}_{\Sigma }\) legend. This removes all six accumulators and turns off STAT. It leaves the committed stack, both Last registers, ordinary memories, and financial data intact.
The three keys and their alternate functions are collected in table 10.1. Press the indicated shift and then the main key; an alternate legend is not a separate button.
| Main key | Orange function |
Blue function |
| \(\Sigma +\): add sample | \(\mathrm {CL}_{\Sigma }\): clear statistics |
\(\Sigma -\): remove sample |
| \(\bar {x}\): means | Weighted mean, labeled \(\overline {xw}\) |
SD: sample standard deviations |
| L.R.: linear regression | \(\hat {y}\): estimate and correlation |
\(\mathrm {RCL}_{\Sigma }\): copy accumulators |
For this chapter’s examples, use RPN, real mode (COMPLEX off), a fixed stack of 5, 600 working digits, and FIX 4. The setup procedures are in section 3.1 and section 5.2. Angle units, payment timing, date order, and previous financial-register contents do not affect these examples. Begin with no active shift, pending command, or open tool. Each independent data set below starts with f \(\Sigma +\) to clear statistics and f CLEAR to clear the stack; CLEAR is the orange function of \(1/x\).
Clearing with an unfinished entry
The dedicated \(\mathrm {CL}_{\Sigma }\) command first finishes a number that is still being entered, then clears the bank. It does not erase that number. To preserve the unfinished entry exactly as typed, use the statistics group of MCLR; its selectors and cancellation rules are in section 6.10. Both methods leave earlier accumulator copies in ordinary memory intact.
10.2 Enter observations in the right order
Adding or removing a pair requires both X (S0) and Y (S1) positions; a single-position unlimited stack needs another operand first. Both \(\Sigma +\) and \(\Sigma -\) require finite real components in X and Y. NaN or either infinity produces Statistics samples must be finite. The commands also check all six existing totals and all six proposed totals; a nonfinite total, including overflow while updating the sums, produces Statistics totals must be finite. Either error leaves the statistical bank unchanged: no part of the pair is added or removed, and the Last registers are not replaced. Any number being typed is finished before these checks, as with other statistics commands.
A paired observation has an \(x\)-value and a \(y\)-value. At the moment you press \(\Sigma +\), put \(x\) in X/S0 and \(y\) in Y/S1. The usual key sequence therefore enters the y-value first, the reverse of the written pair \((x,y)\):
\(y\) ENTER \(x\) \(\Sigma +\)
ENTER finishes the first number; starting the second lifts the first into Y. The statistics key finishes the second number and records the pair. For regression, \(x\) is the explanatory or independent variable, and \(y\) is the response to be fitted.
After addition, X (display S0) contains the new sample count, not the entered \(x\). Y and all deeper stack positions stay in place. The original pair is saved in Last X and Last Y. Entry of the next pair can begin immediately; no extra ENTER is needed after \(\Sigma +\).
Each successful press adds one pair, including a pair containing zero. It does not read a frequency from Y: that value is the second coordinate, or a weight only when you later request weighted mean. Pressing \(\Sigma +\) repeatedly is not a way to repeat the original sample, because the first press replaced its \(x\) with the count. Re-enter the pair for each additional occurrence.
Single-variable observations
For one-variable work, put the observation in X and use zero for Y. The \(x\)-mean and \(x\)-standard deviation then describe the intended data; the \(y\)-mean and deviation are zero. Enter 0 ENTER before each observation to make that convention explicit. Merely clearing the stack once does not ensure that Y stays zero as later digits lift previous counts and results.
Accumulate three measurements
Use the chapter’s prepared RPN settings, including real mode, fixed depth 5, 600 working digits, FIX 4, and no pending prefix. Enter measurements 8, 10, and 12:
f \(\Sigma +\) f CLEAR
Continue with |
Count in X |
0 ENTER 8 \(\Sigma +\) |
1.0000 |
0 ENTER 10 \(\Sigma +\) |
2.0000 |
0 ENTER 12 \(\Sigma +\) |
3.0000 |
STAT is present. Press \(\bar {x}\). The mean in X is 10.0000; Y shows 0.0000. The check is \((8+10+12)/3=10\). The measurements remain accumulated after the mean is calculated.
Statistics uses real components even with complex mode on. A pair of complex stack operands does not become four coordinates or one complex observation. Nonzero imaginary data produces the real-only warning in complex mode; use deliberate real inputs for this chapter. New Last operands retain both components only with CMPLX on; with it off, their imaginary components are zero. See section 8.7 and section 6.5 for these distinctions.
10.3 What the six accumulators retain
The calculator retains a count and five sums. It does not maintain a sample list that you can scroll through, select by observation number, or recover in its original order. Keep the original observations when you may need to check, replace, or recompute them. The totals are enough for the functions in this chapter, but are not a substitute for the source data.
| Accumulator | Copy destination | Meaning |
| \(n\) | R4 | Number of pairs added, less pairs removed. |
| \(\sum x\) | R5 | Sum of first coordinates. |
| \(\sum x^2\) | R6 | Sum of squared first coordinates. |
| \(\sum y\) | R7 | Sum of second coordinates, or total weight. |
| \(\sum y^2\) | R8 | Sum of squared second coordinates. |
| \(\sum xy\) | R9 | Sum of the products within each pair. |
The count \(n\) in this table is independent of the financial n register. Entering observations does not change a loan’s period count or the cash-flow selector. Nor do the running sums occupy ordinary R4–R9 while data is being entered; those destinations are used only by the explicit copy command below.
\(\Sigma +\) adds 1 to \(n\), adds \(x\) and \(y\) to their sums, and adds \(x^2\), \(y^2\), and \(xy\) to the remaining sums. Its blue inverse, \(\Sigma -\), subtracts those same contributions. A negative observation is a valid value: adding \(-3\) contributes \(-3\) to \(\sum x\) and 9 to \(\sum x^2\). It does not remove a previously entered positive 3.
STAT reports occupied statistical storage, including zeros. Removing the final observation can leave all six values zero while STAT remains present. Only an explicit statistics clear removes that occupancy. Conversely, the flag alone does not establish a positive count or valid data. The bank and its flag survive mode changes and relaunches; see chapter 6 and chapter 14.
10.4 Correct or remove an observation
Before pressing \(\Sigma +\), use ordinary entry correction if you have mistyped a digit. After a pair has been added, changing the display does not change its contribution to the sums. To correct an accepted observation, re-enter the incorrect pair and press g \(\Sigma +\), selecting \(\Sigma -\). Then enter the correct pair with unshifted \(\Sigma +\). The order remains \(y\), ENTER, \(x\) for removal as well as addition. Remove both coordinates even if only one was wrong.
Removal returns the reduced count in X, preserves Y and deeper stack positions, and saves the removed pair in the Last registers. The calculator rejects removal when the count is already zero. It cannot check that the pair you subtract was actually entered, because it holds accumulators rather than an observation history. An incorrect subtraction can corrupt the sums without producing an immediate error.
Replace an accepted pair
Use real RPN, fixed depth 5, 600 working digits, FIX 4, and no pending prefix. Suppose the intended pairs are \((1,2),(2,4),(3,5),(4,8)\), but the last \(y\) is entered as 9. Reproduce the mistake with:
f \(\Sigma +\) f CLEAR
2 ENTER 1 \(\Sigma +\) 4 ENTER 2 \(\Sigma +\)
5 ENTER 3 \(\Sigma +\) 9 ENTER 4 \(\Sigma +\)
The count is 4.0000. Subtract the wrong pair:
9 ENTER 4 g \(\Sigma +\)
The count becomes 3.0000. Add the correct pair:
8 ENTER 4 \(\Sigma +\) \(\bar {x}\)
After addition the count is 4; after mean, X shows 2.5000 and Y shows 4.7500. The second-coordinate total is now \(2+4+5+8=19\), as intended.
If the incorrect pair was just added and neither Last register has since changed, you can retrieve that exact pair instead of retyping it. Use CLEAR, not CLx: CLx would overwrite Last X with the displayed count. Press f CLEAR, then blue LAST Y, blue LAST X, and blue \(\Sigma -\). In physical key locations the sequence is:
f \(1/x\) g \(1/x\) g \(x\leftrightarrow y\) g \(\Sigma +\)
CLEAR discards the working stack but preserves the bank and both saved operands. The recalls put the saved \(y\) in Y and the saved \(x\) in X, ready for removal. This method recovers the most recently saved operands, not an arbitrary earlier observation; section 2.9 explains that limit.
Adding and then subtracting floating-point contributions need not restore every accumulator bit for bit. For a data set with many corrections, or whenever you cannot identify the original mistake, clear statistics and re-enter the verified source observations.
10.5 Means and weighted means
The unshifted \(\bar {x}\) key calculates both arithmetic means:
There must be at least one observation. The result in X (S0) is \(\bar {x}\), and the result in Y (S1) is \(\bar {y}\). The calculator lifts both results ahead of the old stack rather than replacing its first two values. On a fixed stack, the two deepest values are therefore lost. Neither mean changes the accumulated data.
Orange \(\bar {x}\) calculates the weighted mean of the \(x\)-values, treating their paired \(y\)-values as weights:
Enter each weight first, ENTER, then its value, and press \(\Sigma +\). The weighted-mean command returns one value by replacing X (S0); it preserves Y and deeper positions. It requires at least one entered pair and a nonzero sum of weights.
Average values with different frequencies
Use real RPN, fixed depth 5, 600 working digits, FIX 4, and no pending prefix. Values 10, 20, and 40 occur with frequencies 2, 3, and 1. Enter each frequency as the \(y\)-weight:
f \(\Sigma +\) f CLEAR
2 ENTER 10 \(\Sigma +\)
3 ENTER 20 \(\Sigma +\)
1 ENTER 40 \(\Sigma +\) f \(\bar {x}\)
The weighted mean is 20.0000, since
Only three pairs were entered, so the statistical count is 3, not 6. Pressing unshifted \(\bar {x}\) afterward instead gives 23.3333, the unweighted average of 10, 20, and 40, with 2.0000, the mean weight, in Y.
Weights may be fractional or signed; the calculator applies the same quotient. For an ordinary weighted average, choose the nonnegative weights appropriate to the problem. Signed weights can produce a result outside the range of the entered values, and weights that sum to zero are rejected. A zero weight still adds one pair to \(n\) and contributes its \(x\) to the unweighted sums, even though its contribution to the weighted numerator is zero.
The weighting interpretation belongs only to weighted mean. SD and linear regression continue to treat each entered pair as one equally weighted observation. In particular, SD on the three frequency pairs above is not the deviation of the six expanded observations. To use ordinary sample SD for frequency data, enter each actual occurrence with the single-variable convention, or use an appropriate separate formula.
10.6 Sample standard deviations
At least two observations are required for SD. Press g \(\bar {x}\) to select it. It returns the \(x\)-sample deviation in X (S0) and the \(y\)-sample deviation in Y (S1), lifting two values in the same way as the means. The formulas are
The divisor is \(n-1\), so these are sample standard deviations, not population standard deviations. Each result has the same units as its observations. Constant observations are permitted and have deviation zero; both coordinates are evaluated by the command.
Find the spread of three measurements
Use real RPN, fixed depth 5, 600 working digits, FIX 4, and no pending prefix. Enter the complete single-variable set again:
f \(\Sigma +\) f CLEAR
0 ENTER 8 \(\Sigma +\) 0 ENTER 10 \(\Sigma +\)
0 ENTER 12 \(\Sigma +\) g \(\bar {x}\)
The results are 2.0000 in X and 0.0000 in Y. Relative to mean 10, the \(x\)-deviations are \(-2,0,2\), so \(s_x=\sqrt {(4+0+4)/(3-1)}=2\).
If these three values constitute the entire population you intend to describe, its standard deviation instead uses divisor 3. Convert a sample deviation to a population deviation by \(\sigma _x=s_x\sqrt {(n-1)/n}\). Show the Scientific panel for the square-root key if needed; changing panels does not disturb the waiting deviation. Continuing directly from the preceding example, with the same settings and no pending prefix, press:
3 ENTER 1 \(-\) 3 \(\div \) \(\sqrt {x}\) \(\times \)
The result is 1.6330, from \(2\sqrt {2/3}\). This is an explicit calculation, not a setting that changes what SD returns.
10.7 Fit a straight line
The unshifted L.R. key fits the line \(\hat {y}=a+bx\) to the accumulated pairs by ordinary least squares in the \(y\) direction. It returns slope \(b\) in X (S0) and intercept \(a\) in Y (S1). The intercept is the fitted value at \(x=0\); the slope is the change in fitted \(y\) per unit change in \(x\). Both results are lifted ahead of the previous stack. L.R. uses the stored pairs, not the two values currently displayed.
At least two pairs are needed, and the \(x\)-values must not all be equal. Constant \(y\)-values are allowed: their fitted line is horizontal. Reversing the two coordinates fits a different regression; it is generally not the inverse of the original fitted line.
The underlying totals make the calculation explicit. Define
Then
The quantity \(M\) must be positive for a usable fitted slope. These are unweighted formulas; the \(y\)-coordinate is the response, not a weight as it is for the weighted-mean command.
Fit four paired observations
Use real RPN, fixed depth 5, 600 working digits, FIX 4, and no pending prefix. Fit \((x,y)=(1,2),(2,4),(3,5),(4,8)\):
f \(\Sigma +\) f CLEAR
2 ENTER 1 \(\Sigma +\) 4 ENTER 2 \(\Sigma +\)
5 ENTER 3 \(\Sigma +\) 8 ENTER 4 \(\Sigma +\) L.R.
The slope in X is 1.9000; the intercept in Y is 0.0000. The fitted line is \(\hat {y}=1.9x\). The totals give \(M=20\), \(P=38\), \(\sum x=10\), and \(\sum y=19\), so the slope is \(38/20\) and the intercept is \((20\times 19-38\times 10)/(4\times 20)=0\).
The same stored data can supply means and deviations without re-entry. After the fit above, unshifted \(\bar {x}\) returns 2.5000 in X and 4.7500 in Y. Blue \(\bar {x}\) then returns 1.2910 and 2.5000, respectively. Each request pushes another pair of results; inspect the stack or store useful values before requesting more results on a small fixed stack.
10.8 Estimate a response and read correlation
The combined estimate-and-correlation operation requires at least two observations and positive variance in both coordinates. If all \(y\)-values are identical, L.R. can still return the horizontal line, but the estimate key rejects the combined result because correlation is undefined. Use the line’s constant intercept for its fitted response in that case. There is no separate key that estimates \(x\) from \(y\); choose and enter the explanatory coordinate before fitting the model you need.
To estimate \(y\) for a chosen \(x\), put that new \(x\) in X and press f L.R., selecting the orange \(\hat {y}\) legend. You do not need to press unshifted L.R. first. The command calculates from the current accumulators, consumes the input \(x\), and returns two values: the fitted \(\hat {y}\) in X (S0) and correlation \(r\) in Y (S1). The old Y moves to S2. It does not add the requested point to the data.
Correlation is
with \(M,N,P\) defined in section 10.7. For valid finite data, its mathematical range is \(-1\) through 1. A positive value indicates that larger \(x\) tends to accompany larger \(y\); a negative value indicates the opposite direction. Perfect increasing and decreasing straight lines have \(r=1\) and \(r=-1\). A value near zero indicates little linear association, but does not rule out a nonlinear relationship.
Interpolate and extrapolate from the fitted data
Use the exact four-pair data set and RPN settings prepared in section 10.7; if necessary, repeat its complete entry sequence. The bank must contain just those four pairs. With no pending shift or command, press:
f CLEAR 2.5 f L.R.
The estimated response is 4.7500 in X, and correlation is 0.9812 in Y. This evaluates \(1.9\times 2.5\) within the observed range of \(x\). For a second request, press:
f CLEAR 5 f L.R.
The estimate is 9.5000, with the same correlation 0.9812. The value 5 lies beyond the observed range 1 through 4, so this second request extrapolates the fitted line. Neither request changes the count of four observations.
The example’s correlation is \(38/\sqrt {1500}\), approximately 0.9811557810. Correlation belongs to the stored data and therefore does not depend on the new \(x\) supplied for an estimate. The function does not provide a confidence interval, prediction interval, or a test that a straight line is suitable. A high correlation also does not make extrapolation reliable or establish a causal relationship.
10.9 Inspect the totals and preserve useful results
\(\mathrm {RCL}_{\Sigma }\) copies all six accumulators into ordinary R4–R9 in the order shown in table 10.2. This overwrites those six registers. Preserve anything needed from them before copying, then press g L.R. to select the command. Ordinary R0–R3 and the statistical bank itself are unchanged. Like any memory write, this copy includes both components with CMPLX on and only the real component with CMPLX off; it never strips a component from the source statistical bank.
The copy finishes an active numeric entry, but does not move stack values or change either Last register. It does not place six totals directly on the stack. Use ordinary RCL and a digit to read an individual copied value. Those later recalls have the ordinary lift and Last X effects described in chapter 6.
Check all six totals for the four-pair data set
Use real RPN, fixed depth 5, 600 working digits, FIX 4, and no pending prefix. Prepare exactly the four pairs with the complete sequence in section 10.7. This example deliberately replaces R4–R9. Press g L.R., then use each recall below to inspect the copied total:
| Keys | Total | Display |
| RCL 4 | \(n\) | 4.0000 |
| RCL 5 | \(\sum x\) | 10.0000 |
| RCL 6 | \(\sum x^2\) | 30.0000 |
| RCL 7 | \(\sum y\) | 19.0000 |
| RCL 8 | \(\sum y^2\) | 109.0000 |
| RCL 9 | \(\sum xy\) | 57.0000 |
Each recall displays the indicated value while preserving its ordinary memory copy. MEM is present as well as STAT. For example, the final total is \(1(2)+2(4)+3(5)+4(8)=57\).
These are snapshots of the totals at the time of copying. Adding or removing a sample afterward does not refresh them; press \(\mathrm {RCL}_{\Sigma }\) again when you want current copies. Editing R4–R9 likewise does not edit the statistical bank. There is no inverse keyboard command that loads these six ordinary memories back into the accumulators.
Copying an empty statistical bank stores six zeros and lights MEM, but does not light STAT. Clearing statistics later leaves the copies intact. In ALG, Recall summations both displays the six labeled totals and copies their real components to R4–R9. Ordinary RCL can then use those copies in an expression. Unlike RPN’s copy command, the ALG worksheet projects the totals to real values even with CMPLX on; the source statistical bank is unchanged.
10.10 Statistics worksheets in ALG
Select ALG and press orange FUNC for STAT. Choose the required operation in the worksheet. The main expression remains suspended; all fields, result selections, and unfinished edits are saved. The field controls follow section 4.12: equals evaluates a field, ENTER accepts it, and the named action performs the operation. Successful equals and ENTER also update ANS with the field value; neither operation adds or removes a sample by itself. On the first visit, the sample’s X field starts from a valid displayed operand and Y starts at zero. Later visits retain the accepted coordinates and any unfinished edits, so check both fields when starting another data set.
Operation |
Inputs |
Outputs |
Add or remove sample |
X and Y (use Y = 0 for one-variable data) |
Updated sample count. |
Means |
Existing bank |
Mean X and Mean Y. |
Weighted mean |
Existing bank; Y supplies weights |
Weighted mean. |
Sample standard deviations |
Existing bank |
Standard deviation X and Y. |
Linear regression |
Existing bank |
Slope, Intercept, and Correlation when defined. |
Estimate Y |
X to estimate; existing bank with nonzero X and Y variance |
Estimated Y and Correlation. |
Recall summations |
Existing bank |
Count and all five sums, also copied into R4–R9. |
Clear statistics |
None |
Cleared count; removes the six accumulators. |
Accepting one coordinate does not add or remove a sample. Both finite coordinates, the existing totals, and every updated total must validate before ADD SAMPLE or REMOVE SAMPLE writes the bank. A failed sample operation leaves all six accumulators unchanged. Removal uses the same X and Y as the original sample; it cannot verify that those coordinates were actually present, because individual samples are not retained.
Each successful calculation updates ANS with its declared primary output: the sample count, Mean X, weighted mean, Standard deviation X, Slope, or Estimated Y, respectively. Recall summations and Clear statistics use the count as their primary output too. Selecting another output does not change ANS. Use value inserts the selected result into the main expression. For a constant Y series, a valid regression can have slope zero and a finite intercept while correlation is undefined; ALG keeps the valid outputs and omits correlation.
To enter the pair \((X,Y)=(2,5)\), choose the add-sample worksheet, accept X as 2 and Y as 5, then ADD SAMPLE. Repeating ADD SAMPLE deliberately adds another copy of that pair. To correct it, choose remove sample and accept the original 2 and 5 before REMOVE SAMPLE, then add the corrected pair. To abandon an unaccepted coordinate edit, use CANCEL; previously accepted fields and completed sample operations remain.
10.11 Stack effects, errors, and numerical limits
The RPN functions share one data bank but have different stack effects. Table 10.4 summarizes successful commands after any active numeric entry has finished. A pair result is ordered with the first value in X (S0) and the second in Y (S1). On an unlimited stack, two-result queries add two positions; estimation consumes one input and adds two results, for a net increase of one. On a fixed stack, each lift discards a deepest value as usual. Where a command saves old Y, it does so only if that stack position exists; with only one unlimited-stack operand, Last Y is preserved.
Command | Stack effect | Last registers |
\(\Sigma +\), \(\Sigma -\) |
Replace X with count; leave Y and deeper values in place. |
Save old X and Y. |
Means |
Lift \(\bar {x}\) in X, \(\bar {y}\) in Y; old X moves to S2. |
Save old X and Y. |
Weighted mean |
Replace X; leave deeper values in place. |
Save old X; preserve Last Y. |
SD |
Lift \(s_x\) in X, \(s_y\) in Y; old X moves to S2. |
Save old X and Y. |
L.R. |
Lift slope in X, intercept in Y; old X moves to S2. |
Save old X and Y. |
Estimate |
Consume input X; return \(\hat y\) in X, \(r\) in Y; old Y moves to S2. |
Save input X; preserve Last Y. |
Clear or copy sums |
No movement of committed stack values. |
Preserve both. |
The Last registers contain the old working operands, not a backup of the six accumulators. A mean, SD, or L.R. request can therefore replace the pair saved by the most recent sample addition. Use the explicit re-entry correction method if those saved operands have changed.
Operation or message | Check |
Statistics samples must be finite |
Replace NaN or infinity in the real component of X or Y. The rejected pair has not changed the bank. Imaginary components are not sample coordinates. |
Statistics totals must be finite |
An existing total is nonfinite, or the proposed update overflows. All six totals are retained. Clear and re-enter data if the existing bank is nonfinite. |
Removal from empty data |
At least one pair must remain before \(\Sigma -\). A positive count still cannot prove that the particular removed pair was entered. |
Mean or weighted mean with no data |
Enter at least one pair. |
Weights sum to zero |
Inspect the entered \(y\)-weights and their signs; their sum must be nonzero. |
SD, regression, or estimation needs two points |
Enter at least two pairs, rather than one pair with a large weight. |
X has zero variance |
The \(x\)-coordinates cannot all be equal for a regression or estimate. |
Y has zero variance |
Correlation needs varying \(y\), even though a horizontal fitted line can be calculated by L.R. |
Negative variance |
Check for an unmatched removal, damaged totals, or cancellation from insufficient working precision. |
A statistics-domain failure leaves the accumulated bank and committed stack values unchanged. A number being typed may already have been accepted before the error was found. Check ENTRY before using backspace; it may now act as CLx instead of deleting a digit. Correct the input or data and retry.
Large offsets and small variation
Statistics calculates with the current working precision; changing the display does not improve the stored sums. To recompute at a higher precision, select it first, clear statistics, then re-enter the original observations. Increasing precision cannot recover detail already lost from the accumulators; see chapter 5.
The variance and regression formulas subtract large, potentially nearly equal quantities such as \(n\sum x^2\) and \((\sum x)^2\). When observations have a large common offset but differ only slightly, those terms can lose the small difference that contains the variance. The current calculation uses these raw sums; it is not a centered streaming variance algorithm. Cancellation can produce an inaccurate small variance, zero, or a negative value that triggers an error. More displayed digits alone cannot distinguish these cases.
Choose adequate working precision before accumulation, and compare a sensitive result after recomputing from the original data at a higher setting. Another useful mathematical approach is to subtract a known common offset from the observations before entering them. Subtracting a constant leaves standard deviation unchanged; add the offset back to the calculated mean. For regression, keep track of any shifts in both coordinates when interpreting the intercept and supplying a new point. Chapter 5 explains cancellation and retained values in more detail.
The finite-value checks protect sample addition and removal; they do not establish that the data or the resulting statistical interpretation is correct. A saved bank already containing nonfinite totals cannot accept another addition or removal. ALG additionally rejects nonfinite stored totals before any statistical query, and rejects nonfinite computed outputs. Its Clear statistics action remains available even for a contaminated bank. Clear such a bank and re-enter verified observations. If finite totals cannot be trusted, check the simple causes first: swapped coordinates, a forgotten statistics clear, an incorrect pair removed with \(\Sigma -\), weights mistaken for counts, or a sample deviation mistaken for a population deviation.