V. Statistics
41. Statistics
Write data as data(…): separate the values by semicolons, spaces or new lines (data(1.5 2.5 3)). A table – a row per observation, a column per variable – goes row by row separated by semicolons; the first row may hold the variables' names. More conveniently: the grid key on the f(x) tab opens a table to fill in, paste into from the clipboard (cells from Excel or Google Sheets) or load from a CSV file, and the "As data" button inserts it for statistics – even a table bigger than the grid.
For one variable, a chip picks what to compute. Descriptive statistics: the arithmetic mean, the median, the mode, the quartiles (the medians of the lower and upper half), the range and the interquartile range, the sample (n − 1) and population (n) variance and standard deviation, the coefficient of variation and the outliers (outside Q₁ − 1.5·IQR and Q₃ + 1.5·IQR), with a box plot. Frequencies and histogram: the table of absolute, relative and cumulative frequencies – by values for whole numbers with few values, by classes otherwise (their count by Sturges' rule). z-scores: each value standardized by the data's mean and standard deviation, with its T-score.
Two variables (two columns) give correlation and regression: the sums, the covariance, Pearson's correlation coefficient r with the strength of the relationship in words, the least-squares regression line and the coefficient of determination r², with a scatter plot. Three or more variables get their descriptive statistics side by side with box plots.
Statistical inference from data: the confidence interval of the mean (chip “Confidence interval of the mean”, 90, 95 or 99 %) by the t distribution; the t-test (chip “t-test”) – one variable against the tested value μ₀, two variables as independent samples (Welch's test, or with equal variances) or paired values (the pairs' differences); the χ² test (chip “χ² test”) – one column of counts as a goodness-of-fit test to a uniform distribution, a table as a test of independence with Cramér's V. Under the chips you enter the significance level α, the alternative (two-sided, left-sided, right-sided) and μ₀. The steps: the hypotheses, the test statistic, the critical value and region, the p-value and the decision; the graph shows the distribution with the critical region shaded. Write two independent samples of different sizes as named columns – data(A = 23 25 28; B = 20 22 21 25).
Comparing groups: the chip "Rank test (Mann–Whitney, Wilcoxon, Kruskal–Wallis)" compares two groups by the Mann–Whitney test (with "Paired" paired values by Wilcoxon's test) and three or more groups by the Kruskal–Wallis test – by the values' ranks, without assuming a normal distribution; for small samples without ties the p-value is exact. The chip "ANOVA (analysis of variance)" compares the groups' means by one-way analysis of variance with the ANOVA table, the F-test and the effect size η². Write the groups in columns, of any lengths (named columns); the graph shows the groups' box plots and the test statistic's distribution. For the χ² test of one column of counts, the field "Expected shares" takes your own expected shares – 1:2:1, 0.25 0.5 0.25 or in percent.
The regression of two variables has a model choice under its chip: linear (with the test of the correlation's significance), quadratic (the least squares normal equations), exponential y = a·e^(bx), power y = a·x^b and logarithmic y = a + b·ln x (by linearization through logarithms) – with the coefficient of determination R² and a graph of the fitted curve. The “Statistics and psychometrics” form also has the confidence interval and t-tests from summary values (size, mean, standard deviation) – including the z-test with a known σ and the two-sample t-test.
The normal distribution is in the "Statistics and psychometrics" form (the "Applications" section of the home screen, the Statistics field): the probabilities P(X < x), P(X > x), P(a < X < b) and the quantile – the value below which a given share lies. The steps standardize, z = (x − μ)/σ, and use the distribution function Φ, a negative z as 1 − Φ(|z|) as in the tables; the graph shows the density with the area shaded.
How to enter it
data(3; 5; 7; 7; 9) | One variable – the values by semicolons, spaces or one under another. |
data(x y; 1 52; 2 58; 3 61) | A table row by row, the first row the variables' names (optional). |
data(x = 1 2 3 4; y = 2 4 5 4) | Named columns, each with its values. |
Examples
data(2; 4; 4; 4; 5; 5; 7; 9)


data(12 15 14 13 16 15 14 31)


data(1 2 2 3 3 3 3 4 4 5 1 3 2 4 3) Frequencies and histogram


data(12.5 14.1 15.8 17.2 18.9 21.3 22.0 23.7 25.1 26.4 28.8 31.2) Frequencies and histogram


data(2 4 4 4 5 5 7 9) z-scores


data(x y; 1 52; 2 58; 3 61; 4 70; 5 74; 6 79)


data(A B C; 12 15 9; 14 18 11; 11 16 10; 15 19 12; 13 17 10)


data(102 98 110 105 99 107 101 104 96 108) Confidence interval of the mean
data(102 98 110 105 99 107 101 104 96 108) t-test


data(A = 23 25 28 30 26 27; B = 20 22 21 25 19 24 23) t-test


data(x1 x2; 72 70; 75 73; 68 69; 80 76; 77 74; 74 71) t-test · Paired


data(8 12 9 11 6 14) χ² test


data(20 30; 25 15) χ² test


data(A = 23 25 28 30 26 27; B = 20 22 21 25 19 24 23) Rank test (Mann–Whitney, Wilcoxon, Kruskal–Wallis)


data(pred po; 72 70; 75 73; 68 69; 80 76; 77 74; 74 71; 79 72) Rank test (Mann–Whitney, Wilcoxon, Kruskal–Wallis) · Paired


data(A = 12 15 14 11 13; B = 16 18 17 15 19; C = 13 14 12 16 15) Rank test (Mann–Whitney, Wilcoxon, Kruskal–Wallis)


data(A = 12 15 14 11 13; B = 16 18 17 15 19; C = 13 14 12 16 15) ANOVA (analysis of variance)


data(30 50 20) χ² test · Expected shares 1:2:1


data(x y; 1 2.1; 2 3.9; 3 9.2; 4 15.8; 5 25.1; 6 36.2) Correlation and regression · Quadratic


data(x y; 0 2.0; 1 2.7; 2 3.7; 3 5.0; 4 6.8; 5 9.1) Correlation and regression · Exponential


model(ttest; find=test[one]; n=25[one]; mean=104[one]; sd=15[one]; mu0=100[one]; alpha=0.05[one]; alternative=greater; sigma=sample)![model(ttest; find=test[one]; n=25[one]; mean=104[one]; sd=15[one]; mu0=100[one]; alpha=0.05[one]; alternative=greater; sigma=sample)](img/statistics-form-ttest.png)
![model(ttest; find=test[one]; n=25[one]; mean=104[one]; sd=15[one]; mu0=100[one]; alpha=0.05[one]; alternative=greater; sigma=sample)](img/statistics-form-ttest-1.png)
![model(ttest; find=test[one]; n=25[one]; mean=104[one]; sd=15[one]; mu0=100[one]; alpha=0.05[one]; alternative=greater; sigma=sample)](img/statistics-form-ttest-2.png)
model(twosample; find=test[one]; n1=30[one]; mean1=52[one]; sd1=8[one]; n2=28[one]; mean2=47[one]; sd2=10[one]; alpha=0.05[one]; variances=welch; alternative=two)![model(twosample; find=test[one]; n1=30[one]; mean1=52[one]; sd1=8[one]; n2=28[one]; mean2=47[one]; sd2=10[one]; alpha=0.05[one]; variances=welch; alternative=two)](img/statistics-form-twosample.png)
![model(twosample; find=test[one]; n1=30[one]; mean1=52[one]; sd1=8[one]; n2=28[one]; mean2=47[one]; sd2=10[one]; alpha=0.05[one]; variances=welch; alternative=two)](img/statistics-form-twosample-1.png)
![model(twosample; find=test[one]; n1=30[one]; mean1=52[one]; sd1=8[one]; n2=28[one]; mean2=47[one]; sd2=10[one]; alpha=0.05[one]; variances=welch; alternative=two)](img/statistics-form-twosample-2.png)
model(normal; find=below[one]; mu=100[one]; sigma=15[one]; x=85[one])![model(normal; find=below[one]; mu=100[one]; sigma=15[one]; x=85[one])](img/statistics-normal-below.png)
![model(normal; find=below[one]; mu=100[one]; sigma=15[one]; x=85[one])](img/statistics-normal-below-1.png)
![model(normal; find=below[one]; mu=100[one]; sigma=15[one]; x=85[one])](img/statistics-normal-below-2.png)
model(normal; find=between[one]; mu=170[one]; sigma=8[one]; a=160[one]; b=185[one])![model(normal; find=between[one]; mu=170[one]; sigma=8[one]; a=160[one]; b=185[one])](img/statistics-normal-between.png)
![model(normal; find=between[one]; mu=170[one]; sigma=8[one]; a=160[one]; b=185[one])](img/statistics-normal-between-1.png)
![model(normal; find=between[one]; mu=170[one]; sigma=8[one]; a=160[one]; b=185[one])](img/statistics-normal-between-2.png)
model(normal; find=quantile[one]; mu=100[one]; sigma=15[one]; p=95[pct])![model(normal; find=quantile[one]; mu=100[one]; sigma=15[one]; p=95[pct])](img/statistics-normal-quantile.png)
![model(normal; find=quantile[one]; mu=100[one]; sigma=15[one]; p=95[pct])](img/statistics-normal-quantile-1.png)
![model(normal; find=quantile[one]; mu=100[one]; sigma=15[one]; p=95[pct])](img/statistics-normal-quantile-2.png)
Known limitations
- The quartiles are the medians of the halves (the school method); statistical software (Excel, SPSS) uses other formulas and may get slightly different values for small data.
- Comparing pairs of groups after ANOVA or the Kruskal–Wallis test (post hoc) and multi-way ANOVA aren't available yet – compare the pairs by a t-test or the Mann–Whitney test with Bonferroni's correction; nonlinear regressions are computed by linearization.
- Data are entered by hand, the grid or a CSV file only – the app doesn't recognize a table from a photo yet.