Stats Without Walls Methods Guide

Stats Without Walls Methods Guide. Student edition: the methods of an introductory course, in plain words. Professional edition: the full set, with effect sizes, diagnostics and study designs. Switch at the top right; the choice is remembered.

How to use this guide

Every method here answers a question about data. Start from the question, not from the name of a test.

  1. Say the question in one sentence. "Do students who sleep more have higher GPAs?" "Did the training change mile times?" "Which patients survive longer?"
  2. Name what you measured. A number (minutes, dollars, a score), a yes or no, a category with more than two levels, an ordered rating (1 to 5), a count of events, or a time until something happened.
  3. Find the row in the table below, then follow the method's steps. Each method says what the data must look like, where it is in the app, what to tick, what to read on the card, and what to do if the assumptions fail.
In the app, T-Tests › Which test? asks three questions and opens the right dialog for the most common cases. This guide covers everything the app can do, and explains why.

Professional edition conventions: every result is reported with an effect size and an interval, not a p-value alone; assumptions are checked on the card, not assumed; multiple comparisons are adjusted (Tukey or Holm); and the design, not the software, decides whether a result can be called a cause.

Start from your question

Your questionWhat you measuredMethodIn the appIf assumptions fail
What does one variable look like?anythingDescriptives, frequency table, histogram or bar chartExploration › Descriptivesn/a
Is the mean of one group equal to a claimed value?numberOne-sample t testT-Tests › One Sample T-TestWilcoxon signed-rank against a constant; bootstrap interval
Is the proportion in one group equal to a claimed value?yes or noOne-proportion z test, or the binomial test (exact)Frequencies › One proportion: z testz needs np₀ and n(1 − p₀) ≥ 10; the exact test needs no assumption
Do the category counts match a claimed split?categoryChi-square goodness of fitFrequencies › N Outcomes: chi-square Goodness of fitcombine small categories
Do two different groups differ on average?numberIndependent-samples t test (Welch)T-Tests › Independent Samples T-TestMann-Whitney U; permutation test
Do two different groups differ in a proportion?yes or noTwo-proportion z test, or a 2 by 2 table with Fisher's exact testFrequencies › Two proportions: z testFisher's exact test (small counts)
Did the same people change between two measurements?numberPaired t testT-Tests › Paired Samples T-TestWilcoxon signed-rank or sign test
Did the same people change on a yes or no?yes or noMcNemar testAdvanced › McNemar test (paired yes or no)exact version is on the card
Do three or more groups differ on average?numberOne-way ANOVA with Tukey follow-upANOVA › One-Way ANOVAWelch's F; Kruskal-Wallis
Do three or more measurements of the same people differ?numberRepeated-measures ANOVAANOVA › Repeated Measures and Mixed ANOVAFriedman
Do two factors each matter, and do they interact?numberTwo-way ANOVAANOVA › Two-Way ANOVAtransform, or rank-based
Do groups differ after adjusting for a covariate?numberANCOVAANOVA › ANCOVAcheck the slopes test on the card
Do groups differ on several outcomes at once?several numbersMANOVAANOVA › MANOVAone ANOVA per outcome with Holm
Are two numeric variables related?two numbersPearson correlation and scatterplotRegression › Correlation MatrixSpearman (tick it on the same card)
Are two categorical variables related?two categoriesChi-square test of independenceFrequencies › Contingency Tables: Independent SamplesFisher's exact (2 by 2); combine categories
Can I predict a number from one other number?number from a numberSimple linear regressionRegression › Linear Regressionresidual plots on the card; transform
Can I predict a number from several variables?numberMultiple linear regressionAdvanced › Multiple Linear RegressionVIF, influence and residual checks on the card
My rows are nested in clusters (students in classes, repeated measures of the same people) and I have predictorsnumber, predictors, a grouping factorMixed-effects model (random intercept, optional random slope)Advanced › Mixed-Effects Model (nested or repeated data)repeated-measures ANOVA for balanced designs without covariates
Can I predict a yes or no?yes or noLogistic regression (odds ratios)Advanced › Logistic Regressionexact or penalized methods for separation (not in the app)
Can I predict a count of events?countPoisson or negative binomial regressionAdvanced › Count Regression: Poisson and Negative Binomialnegative binomial when overdispersed
Can I predict an ordered rating?ordered categoryOrdinal logistic regressionAdvanced › Ordinal Logistic Regressionmultinomial if proportional odds fails
Can I predict one of several unordered categories?categoryMultinomial logistic regressionAdvanced › Multinomial Logistic Regressioncombine sparse levels
Does a proportion rise or fall across ordered groups?yes or no by ordered groupCochran-Armitage trend testAdvanced › Cochran-Armitage trend testchi-square for any difference
Is there a trend or a season in a series over time?number per time pointTime series: decomposition, trend, forecastAdvanced › Time Seriesn/a
Do my questionnaire items measure one thing?several ratingsCronbach's alpha; exploratory factor analysisAdvanced › Reliability (Cronbach's alpha)drop or reverse items; EFA
Can many variables be summarized by a few?several numbersPrincipal component analysisAdvanced › Principal Component AnalysisEFA when the goal is latent traits
Are there natural groups of cases?several numbersk-means clusteringAdvanced › k-means Clusteringstandardize; try several k with the elbow plot
How long until an event, and what changes it?time and an event flagKaplan-Meier, log-rank, Cox regressionAdvanced › Survival Analysis: Kaplan-Meier, log-rank, Coxcheck proportional hazards by eye on the curves
How many people do I need?planningPower and sample size; margin of errorAdvanced › Power and Sample Sizen/a
Could a lurking variable explain my regression result?observational dataSensitivity analysis (Cinelli-Hazlett benchmark)Regression › Sensitivity to a lurking variablen/a
I do not trust the formula's assumptions at allanyBootstrap interval; permutation testAdvanced › Bootstrap confidence intervaln/a

Before any test

  1. One row per case, one column per variable. A group is a column of labels (Control, Treatment), not two columns of numbers. Repeated measurements of the same person are separate columns (week1, week4) in the same row for paired and repeated-measures methods, and one row per measurement for mixed models and grouped graphs; Data › Reshape: wide to long and Data › Reshape: long to wide convert between the two. Data › Merge with another table (join) brings in columns from a second file by an ID; Data › Group by and summarize makes a table of group means; Data › Clean rows (blanks, duplicates) turns NA codes into blanks and drops duplicates. Each card shows the R line that does the same.
  2. Check the types. The app guesses whether a column is a number or a category; Data › Set variable type fixes a wrong guess (a zip code is a category, a 1 to 5 rating is a number for means but a category for a bar chart).
  3. Look first. Exploration › Descriptives for every variable (every graph dialog's Appearance section gives titles, labels, a colorblind-safe palette, small multiples by a grouping column, axis ranges, reference lines and SVG export for a paper), then Graph › Histogram or Graph › Boxplot for numbers and Graph › Bar Plot for categories. Outliers, skew and odd values show up here, not in a p-value.
  4. Decide the comparison before you look at the test. One-sided or two-sided, which groups, which alpha (0.05 unless your field says otherwise). Changing these after seeing the result is how false findings are made.
  5. Know your design. Random assignment to groups (an experiment) supports "causes"; everything else supports "is associated with" until you argue otherwise (see section J).

A. Describe one variable

Descriptives and graphs

Use it for every variable before any test, and as the answer when the question is only "what does it look like".

  1. Exploration › Descriptives: pick the numeric columns; add a grouping column to describe each group separately. Tick Frequency tables for nominal and ordinal variables. Quartile method: the course's halves rule or R's type 7.
  2. Read mean and median together: far apart means skew. The SD is the typical distance from the mean; the IQR is the middle half.
  3. Graph › Histogram for shape, Graph › Boxplot by group for comparisons, Graph › Bar Plot or Graph › Pie Chart for categories, Graph › QQ Plot to judge normality.

Report: n, mean (SD) or median [IQR] for skewed data, and counts (percent) for categories. One table per paper is normal: "Table 1".

B. Compare groups

One group against a claimed value: one-sample t test

Use it when one numeric variable is compared with a known or claimed value (the mean commute is 30 minutes; the mean GPA is 3.0).

  1. T-Tests › One Sample T-Test. Data: from a column, or type the mean, SD and n. Enter the Test value; choose the hypothesis direction.
  2. Tick Confidence interval and Effect size (Cohen's d).
  3. Read: t, df and p; the interval for the mean; the conclusion line names H₀ and Hₐ and the decision at α.

Assumption: roughly normal data, or n of 30 or more. The card says which applies. Otherwise Nonparametric › Wilcoxon signed-rank and sign test (paired) with "compare variable 1 with a constant".

Report: t(39) = 2.14, p = .039, d = 0.34, 95% CI [0.02, 0.61] (the app writes this line).

One proportion against a claimed value: z test, or the exact binomial test

  1. Frequencies › One proportion: z test when the conditions hold: np₀ and n(1 − p₀) both at least 10. The card checks them, shows SE₀ = √(p₀(1 − p₀)/n), z = (p̂ − p₀)/SE₀, the p-value, and the exact binomial p-value underneath as a check. Data: a yes or no column (name the level to test), or type the count of successes and n. Enter the Test value (the claimed proportion).
  2. Frequencies › 2 Outcomes: Binomial test when the conditions fail, or whenever you want the exact answer first: the exact test needs no sample-size condition. The same dialog can show the z test underneath.
  3. Tick Confidence intervals; the Interval method offers Wilson (recommended) and the course's Wald. Read the p-value and the interval.

Category counts against a claimed split: chi-square goodness of fit

  1. Frequencies › N Outcomes: chi-square Goodness of fit. Data: a category column, or typed counts.
  2. Expected: Equally likely, or type the proportions (or counts) in the level order shown.
  3. Read χ², df and p, and the check that every expected count is at least 5; combine small levels if not.

Two different groups, a number: independent-samples t test

Use it when one numeric outcome is compared between two separate groups (treatment and control; men and women; two campuses).

  1. Data: one numeric column and one grouping column with exactly two levels (or two numeric columns, one per group; or typed means, SDs and n).
  2. T-Tests › Independent Samples T-Test. Welch's t (unequal variances) is the default and the right default; tick Student's pooled t only if the course asks for it.
  3. Tick Mean difference, Confidence interval, Effect size (Cohen's d) and Descriptives plots.
  4. Read: the difference and its interval first, then t, df and p, then the conclusion. The assumption lines report sample sizes and shape.

If the data are skewed with small groups: Nonparametric › Mann-Whitney U (two groups). With no assumptions at all: Advanced › Permutation test (design: two independent groups).

Report: t(37.2) = 2.46, p = .019, d = 0.78, 95% CI of the difference [0.9, 9.6]. Welch's df is fractional; that is correct.

Two different groups, a yes or no: two-proportion z test or a 2 by 2 table

  1. Frequencies › Two proportions: z test. Data: a yes or no column and a two-level group column (name the success level), or type successes and n for each group.
  2. Read the difference in proportions with its interval, z and p. The card checks that each group has at least 10 successes and 10 failures.
  3. Small counts: Frequencies › Contingency Tables: Independent Samples with the same two columns; tick Fisher's exact test (2 by 2) and choose its direction. Tick Odds ratio and relative risk (2 by 2) for the risk ratio and odds ratio with intervals; relative risk needs a cohort (groups defined before the outcome), the odds ratio is valid in case-control designs too.

The same people measured twice: paired t test

Use it for before and after, pre-test and post-test, or matched pairs. The analysis is of the differences.

  1. Data: two numeric columns, one row per person (before, after).
  2. T-Tests › Paired Samples T-Test; tick Confidence interval, Effect size and Histogram of differences.
  3. Read the mean difference and its interval, then t, df = n − 1 and p. The histogram of differences is the assumption check.

Skewed differences or ratings: Nonparametric › Wilcoxon signed-rank and sign test (paired). A yes or no measured twice: Advanced › McNemar test (paired yes or no), which uses only the people who changed.

Running an independent-samples test on paired data throws away the pairing and usually hides a real change. If each row is one person measured twice, it is paired.

Three or more different groups: one-way ANOVA

  1. Data: one numeric column and one grouping column with three or more levels.
  2. ANOVA › One-Way ANOVA. Keep Assume equal (Fisher's) and add Don't assume equal (Welch's); tick Post-Hoc Tests: Tukey, Descriptives table, Descriptives plots and Levene's test of equal variances.
  3. Read F, df and p for "any difference", then the Tukey table for which pairs differ (its p-values are already adjusted for the number of comparisons). η² on the APA line is the share of variance explained.
  4. If Levene's p is small or the largest SD is more than twice the smallest, read Welch's F instead.

Skewed data or ordinal ratings: ANOVA › Kruskal-Wallis (three or more groups).

Report: F(3, 36) = 4.21, p = .012, η² = .26, then each Tukey pair that differs with its adjusted p and mean difference.

The same people measured three or more times: repeated-measures ANOVA

  1. Data in wide form: one column per time or condition (week1, week4, week8), one row per person. Optionally a between-subjects group column for a mixed design.
  2. ANOVA › Repeated Measures and Mixed ANOVA: list the Repeated measures columns, in order; tick Pairwise paired t-tests with Holm correction.
  3. Read the within-subjects F (with the sphericity note), the group and interaction rows in a mixed design, and the Holm-adjusted pairs.

Ratings or skewed data: ANOVA › Friedman (nonparametric repeated measures), with Kendall's W as the effect size.

Two factors at once: two-way ANOVA

  1. Data: one numeric outcome and two categorical factors (teaching method by campus).
  2. ANOVA › Two-Way ANOVA; keep Include the A x B interaction.
  3. Read the interaction row first. If it is significant, the effect of one factor depends on the other: describe cell means, do not interpret the main effects alone. If not, read each main effect.
  4. Then the estimated marginal means (emmeans): each level's model-based mean averaged over the other factor with equal weights, with Tukey-adjusted pairwise comparisons, which say which levels differ. With unequal cell sizes they are the means to report, not the raw ones.

Groups after adjusting for a covariate: ANCOVA

  1. Data: a numeric outcome, a group column, and one or more numeric covariates (a pre-test score, age).
  2. ANOVA › ANCOVA; tick Pairwise comparisons of the adjusted means (Holm adjusted) and the scatterplot with parallel lines.
  3. Read the homogeneity-of-slopes check first (a significant group by covariate interaction means ANCOVA's parallel-lines assumption fails; report the interaction model instead). Then the group F with partial η², the adjusted means and the Holm pairs.
A pre-test as covariate is the standard analysis of a pre-post experiment with a control group; it beats a t test on gain scores for power.

Several outcomes at once: MANOVA

  1. Data: two or more numeric outcomes and one group column.
  2. ANOVA › MANOVA; tick Follow-up: one-way ANOVA on each outcome.
  3. Read Pillai's trace (most robust) with its F and p; then the follow-up ANOVAs to see which outcomes carry the difference.

C. Relationships between two variables

Two numbers: correlation

  1. Graph › Scatter Plot first. A relationship that is curved, or driven by one point, is not a correlation question.
  2. Regression › Correlation Matrix: pick the variables; tick Pearson, Report significance and Scatter plots (pairs). Add Spearman for ratings, ranks or outliers.
  3. Read r (direction and strength, −1 to 1), its p for "different from zero", and the scatterplot. r² is the share of variance shared.
Correlation is not causation. A third variable can produce a correlation between two others (ice cream and drowning share summer). For an observational regression, section J quantifies how strong such a variable would have to be.

Two categories: chi-square test of independence

  1. Data: two category columns (major by employment), or a typed table of counts.
  2. Frequencies › Contingency Tables: Independent Samples; tick chi-square, Observed counts, Expected counts and Row percentages (the percentages are what you interpret).
  3. Read χ², df = (rows − 1)(columns − 1) and p; the card checks that every expected count is at least 5. For a 2 by 2 table with small counts tick Fisher's exact test (2 by 2).

Effect size: for a 2 by 2 table report the risk ratio or odds ratio with its interval (tick Odds ratio and relative risk); for larger tables describe the row percentages that differ most.

A number across groups

That is a group comparison: see two groups or three or more groups. T-Tests › Which test? routes it.

D. Predict an outcome

A number from one number: simple linear regression

  1. Regression › Linear Regression: outcome y and predictor x. Tick Confidence interval for coefficients, R and R squared (Model Fit), Residual plots and Q-Q plot of residuals. Enter values under Predict at x = to get predictions with intervals; tick the bands on the graph.
  2. Read the equation ŷ = b₀ + b₁x, the slope's interval and p (H₀: β₁ = 0), and R². The residual plot should be a shapeless cloud; a curve or a fan means the line is the wrong model or the spread changes with x.
  3. Predict only inside the range of x you observed.

Report: b = 0.082, 95% CI [0.03, 0.13], t(38) = 3.21, p = .003, R² = .21; say the units ("each extra hour of study predicts 0.08 GPA points").

A number from several variables: multiple linear regression

  1. Data: a numeric outcome, numeric predictors, and categorical predictors (dummy coded by the app; the most frequent level is the reference unless you name another under Model terms, R's relevel).
  2. Advanced › Multiple Linear Regression. Tick VIF (collinearity), Influence diagnostics, Residual plot and Q-Q plot of residuals. Under Model terms, add squared terms, interactions typed as a * b (numeric or categorical, with both main effects, as R does) and reference levels only with a reason.
  3. Read each coefficient as "holding the others fixed", with its interval; adjusted R² for fit; VIF above 5 means two predictors say the same thing; Cook's distance flags cases that drive the fit.
  4. Compare nested models with the nested F test option when deciding whether a block of predictors earns its place. Backward elimination is shown as a teaching demo, not a recommendation.

A yes or no from predictors: logistic regression

  1. Data: a two-level outcome column (say which level is modelled as 1), numeric and categorical predictors.
  2. Advanced › Logistic Regression. Model terms (interactions, squared terms, reference levels) works as in multiple regression.
  3. Read the odds ratios (exp(b)) with intervals: an OR of 1.5 means the odds of the outcome multiply by 1.5 per unit of the predictor, others fixed. The model χ² against the intercept-only model tests the model as a whole; the pseudo R² family (McFadden, Cox-Snell, Nagelkerke, Tjur) are rough fit indices.
  4. Judge the model two ways, as a reviewer will. Discrimination: the ROC curve and the AUC with its interval (0.7 acceptable, 0.8 good, 0.9 excellent), and the classification table at your cutoff and at Youden's best cut (sensitivity, specificity, precision). Calibration: the Hosmer-Lemeshow test and the decile plot; here a large p is the good outcome. Tick Deviance residuals plot to see badly fitted rows.
Ten events per predictor is a working minimum, and the card counts them. If a predictor separates the outcome perfectly, the coefficient runs away; the card warns, and Firth's penalized logistic regression (R: logistf) is the fix.

Report: χ²(3, N = 240) = 41.2, p < .001; Nagelkerke R² = .21; AUC = .78, 95% CI [.72, .84]; Hosmer-Lemeshow χ²(8) = 6.1, p = .64 (the app writes this line), then the odds ratios with intervals.

Rows nested in clusters: mixed-effects model

Use it when observations are not independent: students within classes, patients within clinics, repeated measurements of the same people over days. An ordinary regression treats every row as independent and overstates its precision; a mixed model gives each cluster its own intercept (and optionally its own slope) and tests the predictors against the right amount of information.

  1. Data in long form: one row per observation, a numeric outcome, the predictors, and a column naming the cluster (subject, class, school). At least 3 clusters; 10 or more for a trustworthy between-cluster variance.
  2. Advanced › Mixed-Effects Model (nested or repeated data): outcome, fixed-effect predictors, the grouping factor; add a random slope only for a predictor measured within clusters (day within subject) when its effect plausibly varies by cluster. Keep REML; switch to ML only to compare models that differ in fixed effects.
  3. Read the fixed effects with their Satterthwaite df and p, then the random effects table (between-cluster variance, residual variance, the intercept-slope correlation), the ICC (the share of variation that lies between clusters), marginal and conditional R², and the likelihood-ratio test that says whether the clusters matter.
  4. Look at the caterpillar plot: clusters far from zero are the ones that differ from the overall intercept.
The app's fit is lme4's (REML, profiled deviance) with lmerTest's Satterthwaite degrees of freedom; on the sleepstudy data it reproduces R's output to four decimals. Report as: b = 10.47, SE = 0.80, t(161.0) = 13.02, p < .001; ICC = .40.

A yes/no or count outcome within clusters. Advanced › Mixed-Effects Model for yes/no or counts (glmer) fits the logistic or Poisson version with a random intercept per cluster (lme4's glmer, Laplace approximation): odds or rate ratios that hold within a cluster, the between-cluster variance, the ICC on the latent (logit) scale, a likelihood-ratio test for the random intercept, and the cluster effects. The outcome can be a yes/no column, successes out of trials (one row per group of cases) or a count with an exposure. On lme4's cbpp data the app reproduces glmer's estimates, variance, deviance and AIC to three decimals; the standard errors are within 1.5 percent (lme4's own two methods differ by about as much).

Report: the fixed effect with its df and interval, the variance components, the ICC, both R² values, the number of clusters and observations, and the estimation method.

A count of events: Poisson and negative binomial regression

  1. Data: a count outcome (calls per shift, infections per ward, citations per officer) and predictors. An exposure that varies (hours, population, months of service) goes in the Exposure box: log(exposure) enters as an offset with a fixed coefficient of 1, so the model is for the rate, as R's offset(log(exposure)). Never divide the counts yourself before the test.
  2. Advanced › Count Regression: Poisson and Negative Binomial; run Poisson, then read the dispersion check. If the variance is well above the mean, switch Model to negative binomial. Model terms (interactions, squared terms, reference levels) works as in multiple regression.
  3. Read rate ratios exp(b): the multiplicative change in the expected count (or rate, with an exposure) per unit of the predictor.
Checked against R: on the ships sample (MASS), incidents by type, year and period with months of service as the exposure, the app reproduces glm's coefficients, standard errors and residual deviance (38.695 on 25 df) to four decimals.

An ordered rating: ordinal logistic regression

  1. Data: an ordered outcome (poor, fair, good, excellent); type the levels from lowest to highest exactly as in the data.
  2. Advanced › Ordinal Logistic Regression.
  3. Read one odds ratio per predictor (the proportional-odds assumption: the same effect at every cut). If that assumption is doubtful, fit the multinomial model and compare.

Several unordered categories: multinomial logistic regression

  1. Advanced › Multinomial Logistic Regression; choose the baseline level.
  2. Read one equation per level against the baseline; exp(b) is a relative risk ratio for that level.

A proportion across ordered groups: Cochran-Armitage trend test

  1. Data: a yes or no outcome and an ordered group (dose, age band, year).
  2. Advanced › Cochran-Armitage trend test; list the group levels in order.
  3. Read the trend z and p: a linear rise or fall in the proportion, which is more powerful than the chi-square for "any difference" when the order matters.

E. Change over time

Before and after

Two measurements of the same units: the paired t test (numbers), Wilcoxon (ratings), McNemar (yes or no). Three or more measurements: repeated-measures ANOVA or Friedman. With a control group, ANCOVA on the post-test with the pre-test as covariate.

A series over time: trend, season, forecast

  1. Data: one row per time point in order, a numeric column; a date or period column is optional.
  2. Advanced › Time Series. Set the Seasonal period (12 monthly, 4 quarterly, 7 daily). Tick Decomposition, Autocorrelation (ACF and PACF), Linear trend and Durbin-Watson and the Holt forecast with the steps ahead you need.
  3. Read the decomposition (trend, seasonal, remainder), the trend slope per period, and the forecast with its band. Durbin-Watson near 2 means the residuals are not autocorrelated; far from 2 means the simple trend line understates uncertainty.
A t test comparing "the first half of the years with the second half" ignores that the points are not independent. Use the trend test on the Time Series card instead.

F. Scales and reliability

Do the items of a questionnaire hang together: Cronbach's alpha

  1. Data: one column per item of one scale (3 or more), same direction of scoring; list reverse-keyed items and the app flips them.
  2. Advanced › Reliability (Cronbach's alpha).
  3. Read α (0.70 acceptable, 0.80 good for research, 0.90 for decisions about individuals), the item-total correlations, and alpha if each item is dropped: an item that raises alpha when removed does not belong.

How many things do the items measure: exploratory factor analysis

  1. Advanced › Exploratory Factor Analysis: pick the items, set the number of factors (start from the eigenvalues above 1 that PCA shows), keep varimax, hide loadings below 0.30.
  2. Read the rotated loadings: each item should load on one factor. Name the factors from their items; compute alpha for each factor's items separately.

G. Structure in many variables

Summarize many measurements: principal component analysis

  1. Advanced › Principal Component Analysis on 3 or more numeric variables (standardized internally).
  2. Read the eigenvalues and cumulative percent of variance; keep components above 1 or until about 70 to 80 percent; read loadings to name them. Varimax makes them easier to name.

Find natural groups of cases: k-means clustering

  1. Advanced › k-means Clustering: numeric variables, standardized (keep the tick), a seed for a repeatable answer, and the Elbow plot for k = 1 to 8.
  2. Choose k at the elbow; read cluster sizes and centers; tick Add the cluster labels to the data to describe the clusters with Descriptives by group.
  3. Clusters are a description, not a test: different seeds or variables give different clusters.

H. Time to an event

Kaplan-Meier curves, the log-rank test and Cox regression

  1. Data: one row per subject with the time observed, an event column (say which level means the event happened; the others are censored: still alive, still enrolled, lost to follow-up), an optional group, and predictors for the Cox model.
  2. Advanced › Survival Analysis: Kaplan-Meier, log-rank, Cox; tick the Risk table and the Confidence band.
  3. Read the median survival per group with its interval, the log-rank χ² and p for a difference between curves, and the Cox hazard ratios exp(b) with intervals: a hazard ratio of 0.6 means a 40 percent lower event rate at every moment, others fixed.
  4. Check proportional hazards by eye: the curves should not cross.
Censoring is why a t test on "days survived" is wrong: the patients still alive at the end of the study have no number to average.

I. Plan a study

How many people do I need?

  1. For a survey estimate: distrACTION › Sample size for a margin of error. Pick a mean or a proportion, the margin of error you can accept, and a guess for p (0.5 is the safe guess) or s.
  2. For a test: Advanced › Power and Sample Size. Pick the test, the effect size you want to detect (a difference that would matter, not the one you hope for), α, and a target power of 0.80 or 0.90; read n per group. Or enter n and read the power you have.

Pilot data give the SD; the literature gives the smallest effect worth finding. Plan for drop-out by inflating n. A study that is underpowered cannot distinguish "no effect" from "too small to see", which is the most common reason a null result is uninformative.

When the formula's assumptions are doubtful

  1. Advanced › Bootstrap confidence interval: an interval for a mean, median, SD, proportion, correlation or difference from resampling, no normality needed. Set a seed so the answer repeats.
  2. Advanced › Permutation test: a p-value for a difference between groups, or a correlation, by reshuffling labels. The null distribution is built from your own data.
  3. Advanced › Bayesian Inference (conjugate priors): a posterior interval for a proportion or a mean given a prior; useful when a prior is honest (a previous study) and when the question is "how probable is the effect larger than x".

J. Causal questions with observational data

Does X work through M: mediation

  1. Data: an outcome Y, a predictor or treatment X (a two-level group coded 0/1), a mediator M measured after X and before Y, and any covariates.
  2. Regression › Mediation (indirect effect through a mediator); keep 2000 or more bootstrap resamples and set a seed for a report.
  3. Read path a (X to M), path b (M to Y holding X), the direct effect c′ and the indirect effect a × b with its percentile bootstrap interval; the Sobel test is given for completeness but the bootstrap interval is the one to report. The share mediated is a × b over the total effect c.
  4. State the assumptions the card names: temporal order, and no unmeasured variable driving both M and Y (sequential ignorability). The sensitivity analysis below is the honest companion.

Report: indirect effect = 0.12, 95% bootstrap CI [0.04, 0.23] (5000 resamples); direct effect c′ = 0.31, p = .004; 28% of the total effect mediated.

Could a lurking variable explain the result: sensitivity analysis

A regression on observational data adjusts for the variables you measured. The question a reviewer asks is how strong an unmeasured variable would have to be to overturn the result. The Cinelli-Hazlett benchmark answers it in the units of a variable you did measure.

  1. Fit the regression you report: outcome, the treatment or exposure of interest, and the covariates (categorical ones dummy coded).
  2. Regression › Sensitivity to a lurking variable: name the treatment and a benchmark covariate (the strongest one you have); try multiples of it.
  3. Read the robustness value: the share of residual variance a lurking variable would need to explain, of both treatment and outcome, to bring the estimate to zero (and, separately, to make it non-significant). Then the benchmark rows: a variable "as strong as female" moves the estimate to the value shown. The contour plot shows the same thing for every strength.
  4. Write the conclusion the card gives: "a confounder would need to be k times as strong as the strongest observed covariate to explain the result away".
This does not prove causation. It states exactly how much hidden confounding the finding can survive, which is the honest form of a causal claim from observational data.

By study design

DesignTypical questionUsual plan in the app
Weighted or complex survey (sampling weights, strata, clusters)How common is X in the population the sample was drawn from?Advanced › Survey estimates with weights (design-based) for means and proportions with design-based standard errors, the design effect and the effective sample size (R's svydesign and svymean). Plain descriptives describe only the respondents; the weighted estimates describe the population.
Cross-sectional survey (one time, one sample)How common is X; is X associated with Y?Descriptives and frequency tables with Wilson intervals (Binomial test) → Contingency Tables for category by category → Correlation Matrix for number by number → Multiple or Logistic Regression to adjust for covariates → Reliability for any scale you built.
Randomized experiment (two or more arms)Does the treatment change the outcome?Descriptives by arm as a balance check → Independent Samples T-Test or One-Way ANOVA with Tukey (numbers), Two proportions or Contingency Tables (yes or no) → ANCOVA with the baseline as covariate when there is a pre-test → Power and Sample Size before you start.
Pre-post, one groupDid it change?Paired Samples T-Test (or Wilcoxon; McNemar for yes or no) → Repeated Measures ANOVA for three or more time points, or the Mixed-Effects Model when time points are uneven or covariates matter. Without a control group, say "changed", not "caused".
Clustered or longitudinal (students in classes; people measured many times)What predicts the outcome, allowing for the clusters?Descriptives by cluster → Mixed-Effects Model with the cluster as the grouping factor (random slope for a within-cluster predictor such as time) → ICC and the likelihood-ratio test to show the clustering matters → Sensitivity to a lurking variable for any causal reading.
Cohort (follow groups forward)Does exposure raise the risk?Contingency Tables with Odds ratio and relative risk (relative risk is valid here) → Logistic or Count Regression to adjust → Survival Analysis when time to event matters → Sensitivity to a lurking variable.
Case-control (sample by outcome, look back)Were cases more exposed?Contingency Tables with the odds ratio only (relative risk is not estimable) → Logistic Regression to adjust → Sensitivity to a lurking variable.
Quality and processIs the process on target and stable?Descriptives and QQ Plot → Variance tests for spread against a specification → One Sample T-Test against the target → Time Series for drift and autocorrelation → Power and Sample Size for sampling plans.
Program evaluation, public safetyDid the program reduce incidents?Descriptives by period and area → Count Regression for incidents (negative binomial if overdispersed) → Time Series for trend and seasonality → Two proportions or Cochran-Armitage for rates across ordered periods → Sensitivity to a lurking variable for any causal reading.
Instrument developmentDoes my questionnaire work?Descriptives per item → Reliability (Cronbach's alpha) → Exploratory Factor Analysis → alpha per factor → Correlation Matrix of factor scores with criterion measures.

Reporting checklist

Results › Script: every step, with the R code lists every analysis on the page with the choices behind it and the R call that does the same, for the methods section or for moving the work to R.

  1. The question in one sentence, and H₀ and Hₐ in symbols.
  2. The method and why it fits (what was measured, how many groups, paired or not).
  3. The descriptives: n, mean and SD, or counts and percents, for each group.
  4. The result line the app writes (APA style), with the test statistic, df, p and the effect size.
  5. The decision at α and a plain-English sentence about the data, not about the test.
  6. The assumption check and what you did about it.
  1. Design: how units were sampled or assigned, the time frame, and what was pre-registered or decided in advance.
  2. Variables: how each was measured, the levels of every categorical variable, how missing data were handled, and n at each stage.
  3. Descriptives: Table 1 by group with n, mean (SD) or median [IQR], counts (percent).
  4. Model or test: the exact method and software (Stats Without Walls, version from the About line), assumption checks and their result, and every alternative considered.
  5. Results: estimate, interval and p for every planned comparison; effect sizes; multiple-comparison adjustment named; exact p to three decimals (p < .001 below that), never "p = 0.000".
  6. Limitations: power, confounding (with the sensitivity analysis if observational), generalizability.
  7. Reproducibility: Results › Save session (data + results) or Results › Share link (data + analyses) so a reader can rerun every card.

Glossary

Short definitions. In the app, the Ask button answers these and many more in plain words ("what is a p-value", "SE or SD", "what is an odds ratio", "explain my result"), with a Learn demo where one exists.

α (alpha)The false-positive rate you accept, usually 0.05. Reject H₀ when p ≤ α.
Confidence intervalThe range of values for the population quantity that the data support at the stated level; width shows precision.
Effect sizeHow big the difference or relationship is, in standard units (Cohen's d, r, η², odds ratio). A p-value says whether; an effect size says how much.
Independent vs pairedIndependent: different units in each group. Paired: the same units measured twice, or matched.
NonparametricA test on ranks rather than values; no normality needed; less power when normality holds.
p-valueThe probability of data at least this extreme if H₀ were true. Not the probability that H₀ is true.
PowerThe probability of detecting an effect of a given size; 0.80 is the usual target.
OverdispersionCounts whose variance exceeds their mean; the Poisson model understates uncertainty, the negative binomial fixes it.
Proportional hazardsThe Cox model's assumption that the hazard ratio is constant over time; crossing survival curves violate it.
Robustness valueThe strength an unmeasured confounder needs, as a share of residual variance in both treatment and outcome, to explain a result away.
Welch's tThe two-sample t test that does not assume equal variances; the right default.

Every menu path in this guide names an item in the app as written. Open the user guide for the screen, data handling and each card's options.