2ND · DATA · STAT
Statistics Calculator
Paste one column of numbers for descriptive statistics, or two for a regression. Mean, sample and population standard deviation, the sums of squares that produced them, all four models the BA II Plus fits, and predictions taken off the fitted curve.
- 1-VAR with frequencies
- Sx and σx side by side
- LIN · Ln · EXP · PWR fits
- r, R² and X′/Y′ predictions
Background
What these statistics are actually telling you
A column of numbers is hard to hold in your head. Descriptive statistics replace it with two figures: one for where the numbers sit and one for how far they spread. The mean is the balance point — the value the deviations cancel around — and the standard deviation is the typical distance from it. Between them they compress eight observations, or eight thousand, into something you can compare against another set.
The spread figure comes in two versions and the difference is not cosmetic. If your numbers are the whole population — every branch, all twelve months of one specific year — then dividing the squared deviations by n gives the right answer, and that is σx. If they are a sample and you want to say something about the population behind them, dividing by n gives an answer that is systematically too small, because the sample mean sits closer to your own data than the true mean does. Dividing by n − 1 corrects for it, and that is Sx. On the eight X values above, Sx is 7.1314 and σx is 6.6708 — a 6.5% gap that closes as the sample grows.
Two-variable statistics ask a different question: when x moves, does y move with it? The covariance answers it in the units of x times y, which is unreadable, so dividing by both standard deviations rescales it to the correlation coefficient r, which cannot leave −1 to +1. Squaring r gives R², the share of the variation in y that the fitted model accounts for. The advertising and sales figures loaded above have an R² of 0.998852, so 99.8852% of the movement in sales is tracked by the straight line and 0.1148% is not.
None of this establishes cause. A regression measures how two columns moved together in the data you happen to have; it has no opinion about which one drove the other, or whether a third thing drove both. That judgement is yours, and the arithmetic will happily fit a line through numbers that have nothing to do with each other.
The formulas
Every figure on this page, written out
One-variable statistics need three running totals: how many observations there are and the sum of the values and of their squares. Everything else is arithmetic on those three.
x̄ = ΣX / n
SS = ΣX² − (ΣX)² / n
Sx = √( SS / (n − 1) )
σx = √( SS / n )
SS is the sum of squared deviations. The long way is to subtract the mean from every value, square each difference and add them up; the short way above gets the same number from the two sums, which is why a calculator can report a standard deviation without keeping your data. With frequencies, n becomes Σf and every sum is weighted: ΣfX and ΣfX².
Two-variable work adds three more totals — ΣY, ΣY² and ΣXY — and builds the same kind of centred sums for the pair.
Sxx = ΣX² − (ΣX)² / n
Syy = ΣY² − (ΣY)² / n
Sxy = ΣXY − (ΣX · ΣY) / n
b = Sxy / Sxx
a = ȳ − b · x̄
r = Sxy / √( Sxx · Syy )
Ŷ = a + b · X X′ = (Y − a) / b
The slope is the covariance divided by the variance of x, which is why b carries units of y per unit of x, and why the intercept has to be whatever makes the line pass through (x̄, ȳ). The correlation is the same covariance scaled by both spreads, so it has no units at all and never exceeds 1 in magnitude.
The four models
Ln, EXP and PWR are the same straight line in disguise
The BA II Plus fits curves without ever leaving least squares. It takes the logarithm of one column, or both, fits a straight line to the transformed pair, then converts the intercept back. That is why all four models report an a, a b and an r, and why the r you see for Ln, EXP or PWR describes the fit after the transform rather than in the original units.
| Model | Equation | Line actually fitted | Requires |
|---|---|---|---|
| LIN | Y = a + b · X | Y against X | Nothing |
| Ln | Y = a + b · ln X | Y against ln X | Every X > 0 |
| EXP | Y = a · bX | ln Y against X | Every Y > 0 |
| PWR | Y = a · Xb | ln Y against ln X | Every X > 0 and Y > 0 |
The domain column is the practical constraint. A logarithm of zero or a negative number does not exist, so a single zero in X kills Ln and PWR and a single zero in Y kills EXP and PWR. The calculator on this page says which column and which model is at fault instead of returning an error and leaving you to guess; the hardware simply displays Error 4.
Reading the coefficients back needs care once a transform is involved. Under EXP, b is a growth factor rather than a slope: the fitted b of 1.031724 on the sample data means each extra unit of X multiplies Y by 1.031724, or adds 3.1724%. Under PWR, b is an elasticity — 0.573867 means a 1% rise in X lifts Y by about 0.5739%. Only under LIN and Ln does b carry units of y per unit of x.
Comparing models on r alone is a trap, because each r belongs to a different pair of columns. Two fits of the same data are only strictly comparable when they were fitted on the same scale. In practice, pick the model your quantity should follow — compounding money is exponential, diminishing returns are logarithmic, physical scaling laws are power — and use r to confirm the choice rather than to make it. The residual chart is the better check: a good model leaves residuals scattered around zero with no visible pattern, and a curved band of residuals means the shape is wrong however high r climbed.
On the hardware
Two worksheets: DATA holds the numbers, STAT does the work
Statistics is the one BA II Plus feature split across two worksheets. 2ND DATA is where the observations live, and 2ND STAT is where the results are read. Nothing is computed until you open STAT, so you can revisit DATA, fix a typo and come straight back to an updated answer.
-
2ND DATA, then 2ND CLR WORK
Clearing first is not optional. The DATA worksheet keeps its contents through power-off, and leftover pairs from the last question are the single most common cause of a wrong mean. 2ND CLR WORK wipes the set and resets the display to X01.
-
Key each value and press ENTER, moving with ↓
The prompts alternate X01, Y01, X02, Y02 and so on. In one-variable mode the Y field is the frequency, and it starts at 1, so you can press ↓ straight past it to enter a plain list. Type over any field to correct it; 2ND DEL removes a pair and 2ND INS inserts one.
-
2ND STAT, then 2ND SET to choose the model
2ND SET cycles 1-V, LIN, Ln, EXP and PWR in that order, and the mode shows on the top line. Switching models never touches your data — it refits the same pairs, so you can compare all four in a few keystrokes.
-
↓ through the results, and CPT for a prediction
The fields appear in the fixed order below. X′ and Y′ are both input-or-compute: key a value into one, then move to the other and press CPT to get the model's prediction.
| Field | What it holds | Shown in |
|---|---|---|
| n | Number of observations, or Σf with frequencies | Both |
| x̄ | Mean of the X column | Both |
| Sx | Sample standard deviation of X, dividing by n − 1 | Both |
| σx | Population standard deviation of X, dividing by n | Both |
| ΣX, ΣX² | Running totals kept for the formulas above | 1-V only |
| ȳ, Sy, σy | The same three figures for the Y column | Regression only |
| a, b | Intercept and slope of the fitted model | Regression only |
| r | Correlation coefficient, −1 to +1 | Regression only |
| X′, Y′ | Prediction in either direction — enter one, CPT the other | Regression only |
Two absences are worth knowing about. The BA II Plus reports no median, no mode and no quartiles — the median in the results above is computed here, not on the hardware, so an exam question asking for one expects you to sort the list by hand. And there is no R² field: square r yourself with the x² key while r is on the display.
The DATA worksheet holds up to 50 pairs, which is the real ceiling on hand entry. Beyond that, or whenever you would rather paste a column than key it, this page takes 200 rows and keeps the same field names, so the figures you quote match what the calculator would have shown. If you also need the keystrokes for a different worksheet, the full BA II Plus emulator runs the same sequences key by key.
Worked example
Eight quarters of advertising against sales
The figures loaded above are the ones this walkthrough uses: advertising spend of 10, 12, 15, 18, 20, 24, 27 and 30 thousand against sales of 105, 112, 128, 140, 152, 168, 182 and 195 thousand. Entering them gives ΣX = 156, ΣY = 1,182, ΣX² = 3,398, ΣY² = 182,030 and ΣXY = 24,670, and from those five totals everything else follows.
The means are x̄ = 19.5 and ȳ = 147.75. The centred sums are Sxx = 3,398 − 156² / 8 = 356, Syy = 182,030 − 1,182² / 8 = 7,389.5 and Sxy = 24,670 − (156 × 1,182) / 8 = 1,621. So the slope is 1,621 / 356 = 4.553371 and the intercept is 147.75 − 4.553371 × 19.5 = 58.959270.
Ŷ = 58.959270 + 4.553371 · X
r = 1,621 / √(356 × 7,389.5) = 0.999426
R² = 0.998852
Read the slope as an exchange rate: every extra thousand of advertising is associated with 4.5534 thousand of sales in this data. The intercept is not a forecast of sales at zero advertising — X = 0 is nine units below the smallest observation, so the line has no evidence there. It is simply the height that makes the line pass through (19.5, 147.75).
Predictions come from the X′ and Y′ fields. Keying 25 into X′ and computing Y′ gives 58.959270 + 4.553371 × 25 = 172.793539. Going the other way, a sales target of 160 needs (160 − 58.959270) / 4.553371 = 22.190315 of advertising. Both are interpolations inside the observed range of 10 to 30, which is the only place a fitted line deserves any trust.
The residuals — actual minus fitted — are 0.5070, −1.5997, 0.7402, −0.9199, 1.9733, −0.2402, 0.0997 and −0.5604. They sum to zero, as they must, and their squares total 8.4860, giving a standard error of the estimate of √(8.4860 / 6) = 1.189254. That is the figure to quote as the typical miss on a prediction, and it is far more useful than R² when someone asks how wrong the forecast might be.
Pressing 2ND SET three more times refits the same eight pairs under the other models, which takes seconds and is worth doing once so you can see how different the coefficients look while the data stays put.
| Model | a | b | r | R² |
|---|---|---|---|---|
| LIN | 58.959270 | 4.553371 | 0.999426 | 0.998852 |
| Ln | −92.256095 | 82.558830 | 0.988851 | 0.977826 |
| EXP | 78.638515 | 1.031724 | 0.994758 | 0.989543 |
| PWR | 27.264576 | 0.573867 | 0.997442 | 0.994891 |
LIN wins here, which is what the scatter plot suggested before any model was fitted: the points lie on a line, not a curve. Ln comes last because a logarithmic shape flattens as X grows and this data does not flatten. Note how differently the same relationship reads under each model — 4.5534 thousand of sales per thousand of advertising under LIN, 3.1724% growth per thousand under EXP, and an elasticity of 0.5739 under PWR — and how little the r values do to separate them. That is the argument for choosing on shape and residuals rather than on the fourth decimal of a correlation.
Switching to 1-V mode on the X column alone gives the descriptive half: mean 19.5, Sx 7.1314, σx 6.6708, sample variance 50.857143 and a range of 20. The coefficient of variation is 7.1314 / 19.5 = 36.57%, which is the figure to use when comparing spread across quantities measured in different units.
Troubleshooting
Six reasons a statistics answer comes out wrong
-
Yesterday's data is still in the worksheet
n is the tell. If you entered eight pairs and STAT says n = 13, the extra five are left over. 2ND DATA, 2ND CLR WORK, then start again — and check n first every single time, before reading any other field.
-
Sx quoted where σx was wanted, or the reverse
The two sit next to each other and differ by a factor of √(n / (n − 1)), so the answer looks plausible and is still marked wrong. Sample data — anything you are generalising from — takes Sx. A complete population takes σx. The gap is 6.5% at n = 8 and under 0.5% by n = 100.
-
Error 4 when you pick Ln, EXP or PWR
A transform hit a zero or a negative number. Ln and PWR need every X above zero; EXP and PWR need every Y above zero. Nothing about the model is broken — the data cannot be logged. Shift the column, drop the offending pair, or use LIN.
-
The Y column was read as a frequency
In 1-V mode the Y field means "how many times", not "the second variable". Enter two real variables while 1-V is selected and the calculator weights your X values by them. If a mean comes out far from where the data sits, this is usually why.
-
X′ and Y′ used in the wrong direction
Y′ predicts sales from spend; X′ predicts the spend needed for a sales figure. They are not reciprocals, and swapping them produces an answer that is wrong by a factor of roughly b². Key the value you know into its own field, then CPT the other.
-
A high r on data the model does not suit
Correlation measures straight-line agreement after any transform, so a clearly curved relationship can still post r above 0.98. Look at the residual chart: a smile, a frown or a fan means the shape is wrong, whatever r says.
Where to go next
Related worksheets and pages
- A fitted trend is usually the input to a valuation, not the answer. Once you have projected revenue, discount it with the NPV calculator or find the return the projection implies with the IRR calculator.
- If the growth rate matters more than the level, an EXP fit gives it directly — and the interest conversion calculator converts between that periodic growth and an effective annual figure.
- For a single before-and-after comparison rather than a whole column, the percent-change and margin arithmetic lives in the profit margin calculator.
- Comparing a level payment against an interest rate is a TVM calculator job, and splitting one into principal and interest is the amortization calculator.
- To practise the 2ND DATA and 2ND STAT keystrokes exactly as they appear in the exam room, run the full BA II Plus emulator, or read the study guides.
FAQ
Statistics questions, answered
The eight things people ask most about the DATA and STAT worksheets.
What is the difference between 1-VAR and 2-VAR on the BA II Plus?
1-VAR treats your data as one column of measurements and describes it: how many observations there are, where the centre sits and how widely the values spread around it. 2-VAR treats each observation as an (x, y) pair and measures the relationship between the two columns, returning a fitted equation, the correlation r and a prediction tool. You choose between them in the STAT worksheet by pressing 2ND STAT then 2ND SET until the mode you want appears on the display. Both modes read the same DATA worksheet, so the values you keyed in are not lost when you switch.
Why does the calculator report both Sx and σx?
They answer different questions. Sx is the sample standard deviation and divides the squared deviations by n − 1; use it when your numbers are a sample drawn from a larger population and you want to estimate that population’s spread. σx is the population standard deviation and divides by n; use it when your numbers are the entire population, such as the twelve monthly returns of one specific year. With eight observations the two differ by roughly 7%, and the gap shrinks as n grows. Exam questions almost always want Sx unless they say "population" outright.
How do I enter frequencies instead of repeating a value?
In 1-VAR mode the second column of the DATA worksheet is the frequency of the value beside it, so a value of 40 with a frequency of 3 counts as three observations of 40. On this page put the counts in the frequency box, one per line, lined up with the values. Leave the box empty and every value is counted once. Frequencies must be positive whole numbers; the calculator uses them as weights, so n becomes the sum of the frequencies rather than the number of rows you typed.
Which regression model should I pick?
Plot the data first, then let R² settle it. LIN is right when a scatter of the points looks like a band around a straight line. Ln suits data that rises quickly then flattens, EXP suits constant percentage growth such as compounding balances or unit sales in a young market, and PWR suits relationships where doubling x multiplies y by a fixed factor. Because all four models are fitted by least squares after transforming the data, you can run them in turn and compare R² directly on this page — the highest R² is the model that explains the most variation.
What does R² tell me that r does not?
r is the correlation coefficient and runs from −1 to +1: the sign tells you the direction of the relationship and the magnitude tells you how tightly the points cling to the fitted line. R² is simply r squared, so it discards the sign and lands between 0 and 1, but it gains a plain reading — it is the share of the variation in y that the model accounts for. An R² of 0.9989 means the fitted line explains 99.89% of the movement in y and leaves 0.11% to everything the model does not know about. Report r when direction matters and R² when you are defending the quality of a fit.
Can the exponential and power models handle zeros or negative numbers?
No, and this is the most common reason a regression fails. EXP fits by regressing ln y on x, so every y must be strictly positive. PWR regresses ln y on ln x, so both x and y must be strictly positive. Ln regresses y on ln x, so only x is restricted. A single zero or negative value in a restricted column makes the logarithm undefined, and the BA II Plus answers with an error rather than silently dropping the row. Either shift the data by a constant before fitting, drop the offending observation deliberately, or use LIN.
How do I get a prediction out of the fitted equation?
On the hardware you scroll the STAT worksheet to X′, key the x you care about, press ENTER, then press CPT with Y′ on the display to compute the prediction. Reverse the two fields to go the other way. This page does both: pick the direction, type the value and the answer appears at the top of the results with the equation used. Predictions inside the range of your data are interpolation and are usually trustworthy; pushing far beyond the largest x is extrapolation and assumes the relationship keeps its shape, which it often does not.
Why does my BA II Plus give a wrong answer after I re-enter data?
Almost always because the old observations are still in the DATA worksheet. Keying new values over the top only replaces the rows you actually reach, so a shorter data set leaves the tail of the previous one behind and n stays too high. Press 2ND DATA, then 2ND CLR WORK before every new problem and watch n on this page against the number of rows you typed. Also confirm the mode: 1-VAR reads the second column as frequencies, so pairs entered in the wrong mode inflate n dramatically.
Keep going
Related calculators
Same engine, same sign convention — pick the worksheet that matches your problem.
Interest Conversion Calculator
Nominal ↔ effective rates for any compounding frequency, plus continuous.
2ND · ICONVDepreciation Calculator
SL, SYD, DB and DBX schedules with remaining depreciable value.
2ND · DEPRDate Calculator
Days between dates on ACT or 30/360, or roll a date forward.
2ND · DATE