Super calculator: probabilities, critical values and quick stats
The super calculator is a calculator panel beside the worksheet for quick answers: a probability, a critical value, the mean of a column, a confidence interval by hand, a unit conversion. You type one line at a time, the answer appears as you type, and each line goes into a history you can scroll back through. It reads the worksheet but never changes it, so you can try things freely.
When to use it
- You need a critical value such as t for 95% confidence with 11 degrees of freedom, or z for 99%.
- You want the share of parts beyond a limit under a normal model, in percent or parts per million.
- You want a column's mean, standard deviation or count without running a full analysis.
- You are checking a hand calculation, a number in a report or a result from another program.
- You need a small chain of calculations with named intermediate results, such as a confidence interval or a capability index.
To put results into the worksheet as a new column, use Calc › Calculator instead.
How to do it in StatLab
- Open it with Calc › Super calculator or Ctrl+K. It docks to the right of the worksheet (above it on a phone).
- Type an expression, such as
NORMINV(0.975)orMEAN(Fill). The answer appears under the box as you type, or a message says what is wrong and where. - Press Enter. The line and its answer join the history, and the box empties.
- Press ↑ and ↓ to bring back earlier lines to fix or reuse them.
- Copy puts an answer on the clipboard at full precision (15 significant digits); the history shows up to 12. Clear empties the history and variables. Esc or × closes the panel.
It uses the same formula language as the calculator, plus:
- Variables.
name = formulastores an answer under a name for later lines.:=andLET name = …work too. ansalways holds the last answer, soans * 1000carries it on.- Columns as values. A formula that works row by row, such as
Fill - 500, gives a whole column. Store it in a variable and use column functions on it:d = Fill - 500, thenMEAN(d).
Useful functions: NORMCDF(x, mean, sd), NORMINV(p, mean, sd), TCDF(x, df), TINV(p, df), CHISQCDF, CHISQINV, FCDF, FINV, BINOMPDF, BINOMCDF, POISSONPDF, POISSONCDF, FACT, COMBIN, and the column functions MEAN, STDEV, N, NMISS, MIN, MAX. The …CDF functions give the lower-tail probability, and the …INV functions take one.
Example
A filling line puts jam into jars labeled 500 g; the plant's lower limit is 497 g. A technician weighs twelve jars and types them into a column named Fill:
| Fill (g) | |||||
|---|---|---|---|---|---|
| 502.1 | 499.4 | 501.3 | 503.0 | 500.2 | 498.7 |
| 501.8 | 502.6 | 500.9 | 499.8 | 501.5 | 502.4 |
The quality engineer opens the super calculator and works through three questions, one line at a time:
| Line | Answer |
|---|---|
m = MEAN(Fill) | 501.141666667 |
s = STDEV(Fill) | 1.36212289749 |
size = N(Fill) | 12 |
t = TINV(0.975, size - 1) | 2.20098516009 |
half = t * s / SQRT(size) | 0.865451599487 |
m - half | 500.276215067 |
m + half | 502.007118266 |
lsl = 497 | 497 |
NORMCDF(lsl, m, s) | 0.00118054849169 |
ans * 1000000 | 1180.54849169 |
(m - lsl) / (3 * s) | 1.01353230174 |
Where is the process centered? The mean is 501.14 g. Lines 4 to 7 build a 95% confidence interval for the mean:
x̄ ± t(0.975, n − 1) · s / √n = 501.14 ± 2.201 × 1.362 / √12 = 501.14 ± 0.87 gSo the true average fill is most likely between 500.28 and 502.01 g.
How many jars fall below 497 g? If fill weights follow a normal distribution with this mean and standard deviation, the share below 497 g is 0.00118, about 1,181 jars per million.
How much margin is there? The last line is the distance from the mean to the lower limit in units of three standard deviations, 1.01. Because s is the overall sample standard deviation, this is the lower performance index Ppl (see Cp, Cpk, Pp and Ppk). Values near 1 mean the lower tail is close to the limit.
How to read the results
- The history shows 12 significant digits. Round for your report, but copy with Copy when you need the full value elsewhere.
- A column answer shows how many values it has and the first few, such as 12 values: 2.1, -0.6, ….
- The Variables list shows what you stored. Click a name to put it in the box.
- Probabilities from
NORMCDFare model answers. They are only as good as the normal model behind them; twelve jars cannot prove the tail is normal.
Common mistakes
- Naming a variable after a function.
n = N(Fill)gives an error, becauseNis the count function and names ignore case. The same goes formean,piandans. Usesize,avgand so on. - Giving
TINVa two-tailed α. Some printed tables and spreadsheet functions take the two-tailed α (0.05 for 95%). StatLab'sTINVtakes the lower-tail probability:TINV(0.975, 11)gives 2.201, whileTINV(0.05, 11)gives −1.796, the 5th percentile. - Comparing with
=at the start of a line.x = 5stores 5 in x. To test whether x equals 5, writex == 5. - A variable hiding a column. If you store a variable called
Fill, bareFillnow means the variable. Write'Fill'orC1to reach the column. - Confusing σ estimates.
STDEVis the overall sample standard deviation. Control chart and Cpk calculations use a within-subgroup estimate, which can be smaller.
Frequently asked questions
Does the super calculator change my worksheet?
No. It reads columns but never writes to them. To get a column of results into the worksheet, press Copy on that line and paste into a column, or use Calc › Calculator….
Is my calculation history saved?
Yes, in this browser, until you press Clear. It keeps the most recent 200 lines. It is not part of the project file.
How do I get z for a one-sided 95% limit?
NORMINV(0.95) gives 1.64485362695. For two-sided 95%, use NORMINV(0.975), which gives 1.95996398454.
Can I use probabilities for discrete counts?
Yes. BINOMCDF(1, 50, 0.02) gives 0.735771394462, the chance of at most one defective in a sample of 50 when 2% are defective. 1 - POISSONCDF(3, 1.2) gives 0.0337689681857, the chance of four or more events when the average is 1.2.