Skip to content

The outcome and predictor matrix

Two facts pick most tests: what kind of outcome you measured, and what you are comparing it across. Read the matrix once and you can place most methods.

Applied ~10 min8 steps

What runs in CodeSplash

You will be able to

  • Classify outcomes as continuous, binary, count, ordinal or time to event
  • Use the outcome and predictor to narrow down to a method
  • Explain why the matrix chooses a starting point, not the final answer

Read first

01

First, what did you measure?

Read

The type of the outcomeVariable typesWhether a column holds numbers, categories, ordered categories, yes/no values, dates or text; it decides which methods fit. sets the family of methods.

OutcomeLooks like
ContinuousBlood pressure, revenue, time on page
BinaryConverted or not, alive or dead
CategoricalBlood type, product chosen
OrdinalA 1–5 rating, mild/moderate/severe
CountComplaints per month, seizures per year
Time to eventDays until churn, with some still waiting

Watch out for numbers that aren't continuous. A 1–5 rating stored as an integer is ordinal. Hours until an event, where some haven't happened, are not ordinary numbers either: those rows are censoredCensoringFollow-up ended before the event happened, so you only know the event time is later than observed..

02

Continuous outcomes

Read
AcrossMethod
One sample against a valueOne-sample t
Two groupsWelch's t, Mann–Whitney
Several groupsANOVA, Kruskal–Wallis
A continuous variableCorrelation, simple regression
Several predictorsMultiple regression

Each row has a parametric version and a robust or rank-based partner. The choice between them is a Step 3 question, not a Step 1 one.

03

Other outcomes

Read
OutcomeTwo groupsWith several predictors
BinaryTwo-proportion z, FisherLogistic regression
CategoricalChi-squareMultinomial regression
OrdinalMann–WhitneyOrdinal regression
CountPoisson rate testPoisson or negative binomial
Time to eventLog-rankCox regression

Read across a row, and you see that the second column is the third column with one binary predictor.

04

Find the pattern

Predict

Predict first

A yes/no outcome, with age and smoking as predictors, and everyone followed for the same length of time. Which regression?

Logistic regressionCox regressionLinear regression
Reveal

Logistic. The outcome is binary and the follow-up is complete. If follow-up varied and some people had not yet had the event, time to event would be the better framing: Cox.

05

Where the matrix stops

Read

The matrix gives you a starting point. Three things can overrule it:

  • Design. Pairs, repeats and clusters change the method in every cell.
  • Assumptions. A check may send you to a robust partner.
  • Your actual question. Do you want the mean, a median, or a difference anywhere in the distribution?

So read the matrix as "this is where to start thinking". The Test Chooser combines all of this with facts from your own columns.

Continuous outcome: linear regression · Statistics Guide
06

Use the matrix

Checkpoint

Check yourself

Monthly complaint counts per store, with stores open for different numbers of days. You want to compare two regions. Where do you start?

Show the answer

Answer: b

Counts with differing exposure call for rates. In CodeSplash, the Compare card's Exposure (time at risk) role routes you to rates.poisson.

Check yourself

Customers rate support from 1 to 5, and you want to compare two teams. Which is the most defensible starting point?

Show the answer

Answer: a

An ordered scale has rank information without equal spacing. A t test is often used and can be reasonable, but ordinal methods make no spacing assumption.

Check yourself

Patients are followed from surgery. Some die during the study, and others are alive at the end. Your outcome is survival. Which family?

Show the answer

Answer: c

The patients still alive have censored times. Dropping or ignoring them biases the result, and logistic regression throws away when the events occurred.

07

See it in your data

In the app

Open Academy → Key and switch to Tables to browse the guide's branches as lists. Then bring a real column to the Test Chooser, and see which of these cells it lands on.

08

Recap

Recap
  • Outcome type and what you compare across pick the starting cell.
  • Every cell has a robust or rank-based partner, for Step 3.
  • Design, assumptions and the exact question can all overrule the matrix.

Concepts in this lesson