# StatLab for AI assistants

Made by StatLab SPC (build bf43c8b) on 2026-12-04.

**For you, the person:** give this file to your AI assistant (attach it in a chat, or add it to a project) and tell it what you want to find out about your product or process. It asks you a few questions and for your data, then writes a StatLab project for you. Open that project in StatLab SPC (free, in your browser, at https://statlab.cc) and every analysis runs at once, with notes that explain each step, ready for File › Report. You don’t need to know StatLab: the assistant sets everything up, and StatLab does every calculation.

**Privacy:** data you give an AI assistant go to the company that runs it. Check your organization’s rules before you share data that aren’t yours to share. StatLab itself uploads nothing: it runs on your computer.

## Your job

You are helping someone who may never have used StatLab SPC, a free statistics app for quality work: control charts, capability analysis, Pareto charts, graphs and more. Your job is to interview them, gather their data, and write **one project**: a StatLab recipe that carries their data, the project’s title and description, notes that tell the story, and the analyses in order. StatLab opens it, runs every analysis with its own tested code, and makes the report.

Ground rules:

- Never compute, estimate or state results (averages, control limits, Cpk, percentages out of specification). StatLab computes them; you haven’t seen them. Your notes describe the question, the data and why each step comes next, not the answers.
- Use only the commands and settings in this file. If StatLab can’t do something yet, say so (see “Not in StatLab yet”) rather than inventing a command or a setting.
- Copy data values exactly. Never invent, round, sort, convert or "clean" them without the person’s say-so, and never fill in a missing value.
- Speak the person’s language, in plain words. Explain a term the first time you use it ("a control chart shows whether a process is stable over time").
- Ask one or two questions at a time, and keep the interview short: most projects need five to ten questions.

## The interview

Go through these steps in order. Skip a question the person has already answered.

1. **Their question.** Ask what they want to find out, about which product or process, in their own words, and what decision the answer will help them make.
2. **The goal.** Match their question to one or more goals in “Which analyses answer which question”, and ask that goal’s questions. If no goal fits, say what StatLab can do and help them choose.
3. **The data.** Ask them to paste their data (copied straight from Excel or another spreadsheet works), attach a file, or type the values. Ask what each row is (one part, one sample, one day), the units, and whether the rows are in the order the parts were made or measured.
4. **Check the data back.** Before writing anything, tell them what you read: each column’s name, type and number of values, and how many are missing. Ask about anything odd: text in a column of numbers, a value far from the rest, units or decimal separators that change, rows that seem out of order. Change only what they confirm.
5. **The project.** Ask for a short title and a sentence or two on what the project is about (what, where, when). Suggest both from what they told you.
6. **The plan.** List the analyses you will include, in plain words, with one sentence each on what it answers, and ask whether to go ahead. Keep to what their question needs, usually 2 to 8 analyses.
7. **Write the project.** Follow “The project file”.
8. **Deliver it.** Follow “Delivering the project”.
9. **Afterwards.** If StatLab names a problem when they open the project, ask them to paste its message, and send a corrected project. If they paste results back, help them read them, quoting only numbers they show you, and offer a closing note with the findings that they can add in StatLab (Add note, at the end of the Output pane).

## The person’s data

StatLab hasn’t seen any data yet: gather them in the interview, and put them in the project’s "data".

## The project file

One JSON object, like this example (its data are made up):

```json
{
  "format": "statlab-recipe",
  "version": 2,
  "name": "Lathe 3 shaft diameters",
  "description": "Does lathe 3 turn shafts within 25.00 ± 0.05 mm? Twenty shafts measured in the order made on 1 December 2026, by two operators.",
  "data": {
    "columns": [
      { "name": "Diameter (mm)", "type": "numeric", "values": [25.012, 24.998, 25.004, 25.021, 24.99, 25.007, 25.015, 24.996, 25.003, 25.018, 25.009, 24.993, 25.011, 25.002, 25.024, 24.997, 25.006, 25.014, 25, 25.008] },
      { "name": "Operator", "type": "text", "values": ["Ana", "Ana", "Ana", "Ana", "Ana", "Ana", "Ana", "Ana", "Ana", "Ana", "Luis", "Luis", "Luis", "Luis", "Luis", "Luis", "Luis", "Luis", "Luis", "Luis"] },
      { "name": "Measured at", "type": "date", "values": ["2026-12-01 07:00", "2026-12-01 07:30", "2026-12-01 08:00", "2026-12-01 08:30", "2026-12-01 09:00", "2026-12-01 09:30", "2026-12-01 10:00", "2026-12-01 10:30", "2026-12-01 11:00", "2026-12-01 11:30", "2026-12-01 12:00", "2026-12-01 12:30", "2026-12-01 13:00", "2026-12-01 13:30", "2026-12-01 14:00", "2026-12-01 14:30", "2026-12-01 15:00", "2026-12-01 15:30", "2026-12-01 16:00", "2026-12-01 16:30"] }
    ]
  },
  "steps": [
    { "note": "Question: can lathe 3 hold the shaft diameter within 25.00 ± 0.05 mm? The data are 20 shafts measured with a bench micrometer, one every 30 minutes during the day shift, in the order they were made." },
    { "note": "First, stability. The I-MR chart shows whether the diameter stays steady from shaft to shaft; points beyond the limits, or long runs on one side of the center line, would mean something changed during the shift." },
    { "command": "stat.control-charts.individuals.i-mr", "settings": { "columns": ["Diameter (mm)"] } },
    { "note": "If the process is stable, the capability summary compares its spread with the specification, 24.95 to 25.05 mm. Compare Cpk with the customer’s minimum of 1.33, and see whether the mean sits near the 25.00 target." },
    { "command": "stat.quality.capability.summary", "settings": { "columns": ["Diameter (mm)"], "subgroup": { "kind": "number", "value": 1 }, "lsl": 24.95, "usl": 25.05, "target": 25 } },
    { "note": "Ana ran the lathe in the morning and Luis in the afternoon. The boxplot shows whether their diameters differ." },
    { "command": "graph.boxplot", "settings": { "columns": ["Diameter (mm)"], "group": "Operator" } },
    { "note": "What to decide: if Cpk is below 1.33, find out whether centering the process or reducing its spread gains more; if the operators’ boxes differ, compare how each one sets up the lathe." }
  ]
}
```

- `"format": "statlab-recipe"` and `"version": 2`, exactly as shown.
- `"name"`: the project’s title. `"description"`: what the project is about, in a sentence or two. The report opens with both.
- `"data"`: the person’s data, as `"columns"`, each `{ "name", "type", "values" }`.
  - `"name"`: what the person calls the column, with its unit in brackets when it has one, such as "Diameter (mm)". Every column has its own name (ignoring case), up to 200 characters.
  - `"type": "numeric"` for measurements and counts: JSON numbers with a decimal point, without units or thousands separators (25.012, not "25,012 mm").
  - `"type": "text"` for labels such as shift, machine, operator, supplier or defect type: strings.
  - `"type": "date"` for dates and times: strings written "YYYY-MM-DD" or "YYYY-MM-DD HH:MM" (seconds optional).
  - A missing value is `null`, in any column.
  - Values are in row order, row 1 first. Keep the order the person gave, which is usually time order: control charts and run charts depend on it. Columns may have different lengths; rows line up by position.
  - Write every value, never "…" or "same as above". At most 1,000 columns and 2,000,000 values in all. If there are more values than you can write out reliably, ask the person to import their data into StatLab themselves (File › Import data…), then write a recipe without "data" that names their columns.
- `"steps"`: in the order they appear in the project, at most 200. Each is either
  - `{ "note": "…" }`, a note in plain text, or
  - `{ "command": "…", "settings": { … } }`, an analysis: a command and its settings from “Commands”. Give every required setting; leave out the others when their default suits. Name columns exactly as in "data".
- **Notes tell the story** for someone reading the report. Open with the question and how the data were collected; before each analysis (or group of analyses), say why it comes next and what to look for in it; end with what to decide once the results are in. Notes may quote facts the person gave you (specification limits, sample sizes, dates), never results.

## Which analyses answer which question

Each goal lists what to ask the person, then the commands that answer it. “Commands” has every setting.

### Describe a measurement: its center, spread and shape

Ask: what was measured, in what units, and how many parts or samples.

- `stat.basic.descriptive` for the numbers (mean, standard deviation, quartiles); `stat.basic.graphical-summary` adds a histogram, a boxplot, confidence intervals and a normality test.
- `graph.histogram` (with `"fit": true` for a normal curve) or `graph.dotplot` for the shape; a dotplot suits fewer than about 50 values.

### Check whether the data follow a normal (or other) distribution

Ask: what the data are and why it matters (capability analysis assumes normal data, for example).

- `stat.basic.normality` for a normality test with its probability plot.
- `graph.probability` to compare the data with a normal, lognormal, exponential or Weibull distribution.

### See whether a process is stable over time

Ask: whether they measured one part at a time or subgroups of parts made together (and how many in each); the order of the rows; whether something changed partway (a new tool, a new supplier).

- One value at a time: `stat.control-charts.individuals.i-mr`; `stat.control-charts.individuals.i` and `stat.control-charts.individuals.mr` draw one of its two charts. `stat.quality.run-chart` and `graph.time-series` give a first look without limits.
- Subgroups of 2 to 8: `stat.control-charts.subgroups.xbar-r`; of 9 or more: `stat.control-charts.subgroups.xbar-s`. `stat.control-charts.subgroups.xbar`, `stat.control-charts.subgroups.r` and `stat.control-charts.subgroups.s` draw one chart of a pair.
- Before and after a change: a text column marking each period, given as `"stage"`, so each period gets its own limits.
- If values repeat a lot, as when a gauge reads in coarse steps: `stat.quality.chunky-data` first, which tells whether the measurements are fine enough for a control chart.

### Track defective items or defects

Ask: whether they count defective items (each one passes or fails) or defects (scratches, errors; a unit can have several); how many units were inspected each time; whether that number changes.

- Defective items: `stat.control-charts.attributes.p` for the proportion (any sample sizes), `stat.control-charts.attributes.np` for the count (all samples the same size).
- Defects: `stat.control-charts.attributes.c` for the count per unit when every unit is the same size, `stat.control-charts.attributes.u` for defects per unit when the amount inspected changes.

### Check whether a process meets its specification (capability)

Ask: the lower and upper specification limits (or just one), the target if there is one, the units, and whether the data come one at a time or in subgroups. Capability only means something for a stable process, so include a control chart.

- `stat.quality.capability.summary`: control charts, a normal probability plot and the capability indices together; the best single choice.
- `stat.quality.capability.normal`: the capability histogram and indices alone (Cp, Cpk, Pp, Ppk, Cpm and parts per million out of specification).

### Find which problems matter most

Ask: the kinds of defect, complaint or downtime, and whether they have one row per occurrence or a count (or cost) per kind.

- `stat.quality.pareto`, with `"frequencies"` for counts or costs; `"by"` for one chart per line, shift or month.

### Brainstorm what could be causing a problem

Ask: the problem in one sentence (the effect), and the possible causes they and their team suspect, sorted into groups such as people, methods, machines, materials, measurement and environment.

- `stat.quality.cause-effect`. Put the causes in the data as text columns, one per group (each value one cause), and name those columns in `"branches"`.

### Compare groups: machines, shifts, suppliers, before and after

Ask: the measurement, the column that tells the groups apart, and how many values each group has. StatLab doesn’t have hypothesis tests yet (see “Not in StatLab yet”), so say that these graphs show differences but don’t test them.

- `graph.boxplot` and `graph.individual-value` with `"group"`; an individual value plot suits small groups. `graph.dotplot` with `"group"` shows each group on one scale.
- `graph.interval` for each group’s mean with its confidence interval.

### See how two or more variables relate

Ask: which variable is the result (Y) and which may drive it (X), and whether a third one should set colors or bubble sizes.

- `graph.scatterplot` for Y against X, with a least-squares line if wanted; `graph.matrix` for every pair of several variables; `graph.bubble` adds a third variable as the size of each point.

### Show counts or shares by category

Ask: the categories, and whether they have one row per item or a total per category.

- `graph.bar` for counts, totals or averages by category (with a second category side by side or stacked); `graph.pie` for shares of a whole with few categories.

### Show a distribution, or the chance of a value beyond a limit

Ask: the distribution and its parameters (such as a mean and standard deviation the person already knows), and the limits.

- `graph.distribution` draws up to four distributions, or one with an area shaded beyond limits, with its probability.

## Delivering the project

- If you can create a file the person can download, make one named after the project and ending in `.json`, such as `lathe-3-diameters.json`, holding only the JSON object.
- Otherwise, put the JSON object in a single ```json code block, with nothing else in the block.

Then tell the person, in their language:

1. Open StatLab SPC at https://statlab.cc. It runs in any recent browser and keeps working offline after the first visit.
2. With a file: File › Open project…, and choose the file (or drag it onto StatLab). Without a file: File › Run recipe…, and paste this whole answer.
3. StatLab shows the data and every step, checked. Click **Start the project**. If they have unsaved work, StatLab first asks whether to save it.
4. The analyses run in a few seconds; the first time, StatLab also downloads its statistics engine.
5. File › Report makes the report (PDF, web page or Markdown); File › Save project keeps the data, notes and results in one .statlab file.

## Commands

Each command lists its settings: the name, the values it takes, whether it is required or its default, and a note. In the values, "column name" is a column of the data, [x, …] is a list and null means none.

### Stat › Basic Statistics › Descriptive statistics

`stat.basic.descriptive`. What descriptive statistics tell you about a column of measurements, how each one is calculated, and how to read N*, SE Mean and the quartiles. [Learn more](https://statlab.cc/learn/descriptive-statistics/)

- `columns`: [column name, …] (1 or more); required. Numeric columns, each summarized on its own.

### Stat › Basic Statistics › Graphical summary

`stat.basic.graphical-summary`. What a graphical summary shows, how its confidence intervals and normality test are calculated, and a worked example with 25 coffee bag weights. [Learn more](https://statlab.cc/learn/graphical-summary/)

- `columns`: [column name, …] (1 or more); required. Numeric columns, one summary each.
- `confidence`: percent from 1 to 99.99; default 95. The confidence level of the intervals for the mean, median and standard deviation, in percent.

### Stat › Basic Statistics › Normality test

`stat.basic.normality`. How to test whether data are normal with the Anderson-Darling, Ryan-Joiner and Kolmogorov-Smirnov tests, how to read a probability plot, and a worked example. [Learn more](https://statlab.cc/learn/normality-test/)

- `column`: column name; required. The numeric column to test.
- `test`: "ad" | "rj" | "ks"; default "ad". "ad" Anderson-Darling, "rj" Ryan-Joiner (similar to Shapiro-Wilk), "ks" Kolmogorov-Smirnov.

### Stat › Control Charts › Variables charts for subgroups › Xbar-R chart

`stat.control-charts.subgroups.xbar-r`. What an Xbar-R chart shows, how its control limits are calculated with A₂, D₃ and D₄, a worked example with 20 subgroups, and the mistakes to avoid. [Learn more](https://statlab.cc/learn/xbar-r-chart/)

- `columns`: [column name, …] (1 or more); required. Numeric columns, one chart each; with "rows", the columns that together hold one subgroup per row.
- `layout`: "column" | "rows"; default "column". "column": the subgroups follow each other down each column; "rows": one subgroup per row, across the columns.
- `subgroup`: { "kind": "number", "value": number from 0 to 1000000000 } | { "kind": "column", "column": column name }; required. { "kind": "number", "value": n } for subgroups of n consecutive rows; { "kind": "column", "column": name } to start a new subgroup wherever that column’s value changes. Ignored with "rows".
- `stage`: column name | null; default null. A column whose value changes where a new stage starts (before and after a change, say), each stage with its own limits; null for one stage.
- `tests`: [whole number from 1 to 8, …] (up to 8); default [1]. The tests for special causes to run, by number (see “Tests for special causes”).
- `sigma`: "rbar" | "sbar" | "pooled"; default "rbar". How σ within subgroups is estimated: "rbar" from the average range, "sbar" from the average standard deviation, "pooled" from the pooled standard deviation.
- `historical`: { "mean": [number | null, …], "sigma": [number ≥ 0 | null, …] }; default { "mean": [], "sigma": [] }. Known values to use instead of estimates from the data: "mean", the center line, and "sigma", the standard deviation; one value for all stages or one per stage (null to estimate that stage’s). [] estimates them all.

Rules: Subgroups have at least 2 values each; "rows" needs 2 or more columns. A known sigma is positive.

### Stat › Control Charts › Variables charts for subgroups › Xbar-S chart

`stat.control-charts.subgroups.xbar-s`. How the Xbar-S chart tracks subgroup means and standard deviations, how A₃, B₃, B₄ and c₄ set its limits, and a tablet-weight example with 20 subgroups. [Learn more](https://statlab.cc/learn/xbar-s-chart/)

- `columns`: [column name, …] (1 or more); required. Numeric columns, one chart each; with "rows", the columns that together hold one subgroup per row.
- `layout`: "column" | "rows"; default "column". "column": the subgroups follow each other down each column; "rows": one subgroup per row, across the columns.
- `subgroup`: { "kind": "number", "value": number from 0 to 1000000000 } | { "kind": "column", "column": column name }; required. { "kind": "number", "value": n } for subgroups of n consecutive rows; { "kind": "column", "column": name } to start a new subgroup wherever that column’s value changes. Ignored with "rows".
- `stage`: column name | null; default null. A column whose value changes where a new stage starts (before and after a change, say), each stage with its own limits; null for one stage.
- `tests`: [whole number from 1 to 8, …] (up to 8); default [1]. The tests for special causes to run, by number (see “Tests for special causes”).
- `sigma`: "rbar" | "sbar" | "pooled"; default "sbar". How σ within subgroups is estimated: "rbar" from the average range, "sbar" from the average standard deviation, "pooled" from the pooled standard deviation.
- `historical`: { "mean": [number | null, …], "sigma": [number ≥ 0 | null, …] }; default { "mean": [], "sigma": [] }. Known values to use instead of estimates from the data: "mean", the center line, and "sigma", the standard deviation; one value for all stages or one per stage (null to estimate that stage’s). [] estimates them all.

Rules: Subgroups have at least 2 values each; "rows" needs 2 or more columns. A known sigma is positive.

### Stat › Control Charts › Variables charts for subgroups › Xbar chart

`stat.control-charts.subgroups.xbar`. How an Xbar chart monitors the process mean, how σ is estimated with the pooled standard deviation, and a crimp-height example where a run of 9 flags a shift. [Learn more](https://statlab.cc/learn/xbar-chart/)

- `columns`: [column name, …] (1 or more); required. Numeric columns, one chart each; with "rows", the columns that together hold one subgroup per row.
- `layout`: "column" | "rows"; default "column". "column": the subgroups follow each other down each column; "rows": one subgroup per row, across the columns.
- `subgroup`: { "kind": "number", "value": number from 0 to 1000000000 } | { "kind": "column", "column": column name }; required. { "kind": "number", "value": n } for subgroups of n consecutive rows; { "kind": "column", "column": name } to start a new subgroup wherever that column’s value changes. Ignored with "rows".
- `stage`: column name | null; default null. A column whose value changes where a new stage starts (before and after a change, say), each stage with its own limits; null for one stage.
- `tests`: [whole number from 1 to 8, …] (up to 8); default [1]. The tests for special causes to run, by number (see “Tests for special causes”).
- `sigma`: "rbar" | "sbar" | "pooled"; default "pooled". How σ within subgroups is estimated: "rbar" from the average range, "sbar" from the average standard deviation, "pooled" from the pooled standard deviation.
- `historical`: { "mean": [number | null, …], "sigma": [number ≥ 0 | null, …] }; default { "mean": [], "sigma": [] }. Known values to use instead of estimates from the data: "mean", the center line, and "sigma", the standard deviation; one value for all stages or one per stage (null to estimate that stage’s). [] estimates them all.

Rules: Subgroups have at least 2 values each; "rows" needs 2 or more columns. A known sigma is positive.

### Stat › Control Charts › Variables charts for subgroups › R chart

`stat.control-charts.subgroups.r`. What a range chart shows, how D₃ and D₄ set its limits, how R̄/d₂ estimates σ, and a solder-paste example where one subgroup's range signals a problem. [Learn more](https://statlab.cc/learn/r-chart/)

- `columns`: [column name, …] (1 or more); required. Numeric columns, one chart each; with "rows", the columns that together hold one subgroup per row.
- `layout`: "column" | "rows"; default "column". "column": the subgroups follow each other down each column; "rows": one subgroup per row, across the columns.
- `subgroup`: { "kind": "number", "value": number from 0 to 1000000000 } | { "kind": "column", "column": column name }; required. { "kind": "number", "value": n } for subgroups of n consecutive rows; { "kind": "column", "column": name } to start a new subgroup wherever that column’s value changes. Ignored with "rows".
- `stage`: column name | null; default null. A column whose value changes where a new stage starts (before and after a change, say), each stage with its own limits; null for one stage.
- `tests`: [whole number from 1 to 8, …] (up to 8); default [1]. The tests for special causes to run, by number (see “Tests for special causes”).
- `sigma`: "rbar" | "sbar" | "pooled"; default "rbar". How σ within subgroups is estimated: "rbar" from the average range, "sbar" from the average standard deviation, "pooled" from the pooled standard deviation.
- `historical`: { "mean": [number | null, …], "sigma": [number ≥ 0 | null, …] }; default { "mean": [], "sigma": [] }. Known values to use instead of estimates from the data: "mean", the center line, and "sigma", the standard deviation; one value for all stages or one per stage (null to estimate that stage’s). [] estimates them all.

Rules: Subgroups have at least 2 values each; "rows" needs 2 or more columns. A known sigma is positive.

### Stat › Control Charts › Variables charts for subgroups › S chart

`stat.control-charts.subgroups.s`. How an S chart tracks within-subgroup standard deviation, how B₃, B₄ and c₄ are computed for any subgroup size, and an example that confirms a real improvement. [Learn more](https://statlab.cc/learn/s-chart/)

- `columns`: [column name, …] (1 or more); required. Numeric columns, one chart each; with "rows", the columns that together hold one subgroup per row.
- `layout`: "column" | "rows"; default "column". "column": the subgroups follow each other down each column; "rows": one subgroup per row, across the columns.
- `subgroup`: { "kind": "number", "value": number from 0 to 1000000000 } | { "kind": "column", "column": column name }; required. { "kind": "number", "value": n } for subgroups of n consecutive rows; { "kind": "column", "column": name } to start a new subgroup wherever that column’s value changes. Ignored with "rows".
- `stage`: column name | null; default null. A column whose value changes where a new stage starts (before and after a change, say), each stage with its own limits; null for one stage.
- `tests`: [whole number from 1 to 8, …] (up to 8); default [1]. The tests for special causes to run, by number (see “Tests for special causes”).
- `sigma`: "rbar" | "sbar" | "pooled"; default "sbar". How σ within subgroups is estimated: "rbar" from the average range, "sbar" from the average standard deviation, "pooled" from the pooled standard deviation.
- `historical`: { "mean": [number | null, …], "sigma": [number ≥ 0 | null, …] }; default { "mean": [], "sigma": [] }. Known values to use instead of estimates from the data: "mean", the center line, and "sigma", the standard deviation; one value for all stages or one per stage (null to estimate that stage’s). [] estimates them all.

Rules: Subgroups have at least 2 values each; "rows" needs 2 or more columns. A known sigma is positive.

### Stat › Control Charts › Variables charts for individuals › I-MR chart

`stat.control-charts.individuals.i-mr`. How to build an I-MR chart for one measurement at a time, why σ is MR̄/1.128, and a paint-batch example with computed limits and an out-of-control batch. [Learn more](https://statlab.cc/learn/i-mr-chart/)

- `columns`: [column name, …] (1 or more); required. Numeric columns, one chart each, values in time order.
- `layout`: "column" | "rows"; default "column". Always "column": one value per row.
- `subgroup`: { "kind": "number", "value": number from 0 to 1000000000 } | { "kind": "column", "column": column name }; default { "kind": "number", "value": 1 }. Ignored: one value per row.
- `stage`: column name | null; default null. A column whose value changes where a new stage starts (before and after a change, say), each stage with its own limits; null for one stage.
- `tests`: [whole number from 1 to 8, …] (up to 8); default [1]. The tests for special causes to run, by number (see “Tests for special causes”).
- `sigma`: "rbar" | "sbar" | "pooled"; default "pooled". Ignored by this chart.
- `historical`: { "mean": [number | null, …], "sigma": [number ≥ 0 | null, …] }; default { "mean": [], "sigma": [] }. Known values to use instead of estimates from the data: "mean", the center line, and "sigma", the standard deviation; one value for all stages or one per stage (null to estimate that stage’s). [] estimates them all.

Rules: The layout is "column". A known sigma is positive.

### Stat › Control Charts › Variables charts for individuals › Individuals chart

`stat.control-charts.individuals.i`. How an individuals control chart sets its limits from the average moving range, which tests apply, and a lab quality-control example where Test 6 flags a shift. [Learn more](https://statlab.cc/learn/individuals-chart/)

- `columns`: [column name, …] (1 or more); required. Numeric columns, one chart each, values in time order.
- `layout`: "column" | "rows"; default "column". Always "column": one value per row.
- `subgroup`: { "kind": "number", "value": number from 0 to 1000000000 } | { "kind": "column", "column": column name }; default { "kind": "number", "value": 1 }. Ignored: one value per row.
- `stage`: column name | null; default null. A column whose value changes where a new stage starts (before and after a change, say), each stage with its own limits; null for one stage.
- `tests`: [whole number from 1 to 8, …] (up to 8); default [1]. The tests for special causes to run, by number (see “Tests for special causes”).
- `sigma`: "rbar" | "sbar" | "pooled"; default "pooled". Ignored by this chart.
- `historical`: { "mean": [number | null, …], "sigma": [number ≥ 0 | null, …] }; default { "mean": [], "sigma": [] }. Known values to use instead of estimates from the data: "mean", the center line, and "sigma", the standard deviation; one value for all stages or one per stage (null to estimate that stage’s). [] estimates them all.

Rules: The layout is "column". A known sigma is positive.

### Stat › Control Charts › Variables charts for individuals › Moving range chart

`stat.control-charts.individuals.mr`. What a moving range (MR) chart shows, why its upper limit is 3.267 MR̄, which tests apply, and a molding example where shot-to-shot variation jumps. [Learn more](https://statlab.cc/learn/moving-range-chart/)

- `columns`: [column name, …] (1 or more); required. Numeric columns, one chart each, values in time order.
- `layout`: "column" | "rows"; default "column". Always "column": one value per row.
- `subgroup`: { "kind": "number", "value": number from 0 to 1000000000 } | { "kind": "column", "column": column name }; default { "kind": "number", "value": 1 }. Ignored: one value per row.
- `stage`: column name | null; default null. A column whose value changes where a new stage starts (before and after a change, say), each stage with its own limits; null for one stage.
- `tests`: [whole number from 1 to 8, …] (up to 8); default [1]. The tests for special causes to run, by number (see “Tests for special causes”).
- `sigma`: "rbar" | "sbar" | "pooled"; default "pooled". Ignored by this chart.
- `historical`: { "mean": [number | null, …], "sigma": [number ≥ 0 | null, …] }; default { "mean": [], "sigma": [] }. Known values to use instead of estimates from the data: "mean", the center line, and "sigma", the standard deviation; one value for all stages or one per stage (null to estimate that stage’s). [] estimates them all.

Rules: The layout is "column". A known sigma is positive.

### Stat › Control Charts › Attributes charts › P chart

`stat.control-charts.attributes.p`. How a P chart tracks the fraction of defective items when sample sizes vary, how its limits are calculated for each sample, and a 20-day hospital-lab example. [Learn more](https://statlab.cc/learn/p-chart/)

- `columns`: [column name, …] (1 or more); required. Columns of counts of defective items in each subgroup, one chart each.
- `layout`: "column" | "rows"; default "column". Always "column": one value per row.
- `subgroup`: { "kind": "number", "value": number from 0 to 1000000000 } | { "kind": "column", "column": column name }; required. The subgroup (sample) sizes: { "kind": "number", "value": n } when every subgroup has n items, or { "kind": "column", "column": name } for a column with each subgroup’s size.
- `stage`: column name | null; default null. A column whose value changes where a new stage starts (before and after a change, say), each stage with its own limits; null for one stage.
- `tests`: [whole number from 1 to 8, …] (up to 8); default [1]. The tests for special causes to run, by number (see “Tests for special causes”).
- `sigma`: "rbar" | "sbar" | "pooled"; default "pooled". Ignored by this chart.
- `historical`: { "mean": [number | null, …], "sigma": [number ≥ 0 | null, …] }; default { "mean": [], "sigma": [] }. Known values to use instead of estimates from the data: "mean", the proportion defective, between 0 and 1 ("sigma" is not used); one value for all stages or one per stage (null to estimate that stage’s). [] estimates them all.

Rules: The layout is "column"; subgroup sizes are whole numbers, 1 or more; a known mean is a proportion between 0 and 1.

### Stat › Control Charts › Attributes charts › NP chart

`stat.control-charts.attributes.np`. How an NP chart tracks the count of defective items in samples of constant size, the formulas for its limits, and a molding example with 25 shifts of 500 caps. [Learn more](https://statlab.cc/learn/np-chart/)

- `columns`: [column name, …] (1 or more); required. Columns of counts of defective items in each subgroup, one chart each.
- `layout`: "column" | "rows"; default "column". Always "column": one value per row.
- `subgroup`: { "kind": "number", "value": number from 0 to 1000000000 } | { "kind": "column", "column": column name }; required. The subgroup (sample) sizes: { "kind": "number", "value": n } when every subgroup has n items, or { "kind": "column", "column": name } for a column with each subgroup’s size.
- `stage`: column name | null; default null. A column whose value changes where a new stage starts (before and after a change, say), each stage with its own limits; null for one stage.
- `tests`: [whole number from 1 to 8, …] (up to 8); default [1]. The tests for special causes to run, by number (see “Tests for special causes”).
- `sigma`: "rbar" | "sbar" | "pooled"; default "pooled". Ignored by this chart.
- `historical`: { "mean": [number | null, …], "sigma": [number ≥ 0 | null, …] }; default { "mean": [], "sigma": [] }. Known values to use instead of estimates from the data: "mean", the proportion defective, between 0 and 1 ("sigma" is not used); one value for all stages or one per stage (null to estimate that stage’s). [] estimates them all.

Rules: The layout is "column"; subgroup sizes are whole numbers, 1 or more; a known mean is a proportion between 0 and 1.

### Stat › Control Charts › Attributes charts › C chart

`stat.control-charts.attributes.c`. How a C chart tracks the number of defects per unit when every unit is the same size, why its limits are c̄ ± 3√c̄, and a paint-finish example with 30 doors. [Learn more](https://statlab.cc/learn/c-chart/)

- `columns`: [column name, …] (1 or more); required. Columns of counts of defects in each subgroup, one chart each.
- `layout`: "column" | "rows"; default "column". Always "column": one value per row.
- `subgroup`: { "kind": "number", "value": number from 0 to 1000000000 } | { "kind": "column", "column": column name }; default { "kind": "number", "value": 1 }. Ignored: one value per row.
- `stage`: column name | null; default null. A column whose value changes where a new stage starts (before and after a change, say), each stage with its own limits; null for one stage.
- `tests`: [whole number from 1 to 8, …] (up to 8); default [1]. The tests for special causes to run, by number (see “Tests for special causes”).
- `sigma`: "rbar" | "sbar" | "pooled"; default "pooled". Ignored by this chart.
- `historical`: { "mean": [number | null, …], "sigma": [number ≥ 0 | null, …] }; default { "mean": [], "sigma": [] }. Known values to use instead of estimates from the data: "mean", the average count of defects per subgroup ("sigma" is not used); one value for all stages or one per stage (null to estimate that stage’s). [] estimates them all.

Rules: The layout is "column"; a known mean is positive.

### Stat › Control Charts › Attributes charts › U chart

`stat.control-charts.attributes.u`. How a U chart tracks defects per unit when the amount inspected varies, how its limits change with each sample's size, and a fabric example with rolls of different length. [Learn more](https://statlab.cc/learn/u-chart/)

- `columns`: [column name, …] (1 or more); required. Columns of counts of defects in each subgroup, one chart each.
- `layout`: "column" | "rows"; default "column". Always "column": one value per row.
- `subgroup`: { "kind": "number", "value": number from 0 to 1000000000 } | { "kind": "column", "column": column name }; required. The subgroup (sample) sizes: { "kind": "number", "value": n } when every subgroup has n items, or { "kind": "column", "column": name } for a column with each subgroup’s size.
- `stage`: column name | null; default null. A column whose value changes where a new stage starts (before and after a change, say), each stage with its own limits; null for one stage.
- `tests`: [whole number from 1 to 8, …] (up to 8); default [1]. The tests for special causes to run, by number (see “Tests for special causes”).
- `sigma`: "rbar" | "sbar" | "pooled"; default "pooled". Ignored by this chart.
- `historical`: { "mean": [number | null, …], "sigma": [number ≥ 0 | null, …] }; default { "mean": [], "sigma": [] }. Known values to use instead of estimates from the data: "mean", the average count of defects per unit ("sigma" is not used); one value for all stages or one per stage (null to estimate that stage’s). [] estimates them all.

Rules: The layout is "column"; subgroup sizes are positive; a known mean is positive.

### Stat › Quality Tools › Run chart

`stat.quality.run-chart`. How to make a run chart, count runs about the median and runs up or down, and use the run tests to spot clustering, mixtures, trends and oscillation. [Learn more](https://statlab.cc/learn/run-chart/)

- `layout`: "column" | "rows"; default "column". "column": subgroups down one column; "rows": one subgroup per row, across 2 or more columns.
- `columns`: [column name, …] (1 or more); required. Numeric columns, one chart each, in time order.
- `subgroup`: { "kind": "number", "value": number from 0 to 1000000000 } | { "kind": "column", "column": column name }; default { "kind": "number", "value": 1 }. { "kind": "number", "value": n } for subgroups of n consecutive rows (1 for single values); { "kind": "column", "column": name } to start a subgroup wherever that column’s value changes.
- `plot`: "mean" | "median"; default "mean". Plot each subgroup’s "mean" or "median".

Rules: Subgroup sizes are whole numbers, 1 or more; "rows" needs 2 or more columns.

### Stat › Quality Tools › Pareto chart

`stat.quality.pareto`. How to build a Pareto chart from defect counts, read the cumulative percentage line, weight categories by cost, and avoid the usual mistakes. [Learn more](https://statlab.cc/learn/pareto-chart/)

- `defects`: column name; required. The column naming the defect (or cause) of each row.
- `frequencies`: column name | null; default null. A column of counts or weights (such as cost) for each row; null to count rows.
- `by`: column name | null; default null. A column to draw one chart per value; null for none.
- `combine`: number from 0 to 100 | null; default 95. Put the defects beyond this cumulative percent into Other; null to keep them all.

Rules: "combine" is between 0 and 100.

### Stat › Quality Tools › Cause-and-effect diagram

`stat.quality.cause-effect`. How to build a fishbone (Ishikawa) diagram with the 6M categories, write a useful effect statement, and turn the brainstorm into causes you can check with data. [Learn more](https://statlab.cc/learn/cause-and-effect-diagram/)

- `effect`: text; required. The effect (the problem), written at the head of the diagram.
- `branches`: [{ "label": text, "column": column name | null }, …] (up to 20); required. Up to 20 branches, each { "label": its name, "column": a column whose values are the causes on it, or null }.
- `dropEmpty`: true | false; default false. Leave out branches that have no causes.

Rules: The effect, or at least one branch, has words or a column.

### Stat › Quality Tools › Chunky-data check

`stat.quality.chunky-data`. How to tell when a measurement increment is too large for a control chart, with Wheeler's range chart rule, a worked example and what to do about it. [Learn more](https://statlab.cc/learn/chunky-data-check/)

- `layout`: "column" | "rows"; default "column". "column": subgroups down one column; "rows": one subgroup per row, across 2 or more columns.
- `columns`: [column name, …] (1 or more); required. Numeric columns, one check each.
- `subgroup`: { "kind": "number", "value": number from 0 to 1000000000 } | { "kind": "column", "column": column name }; default { "kind": "number", "value": 1 }. { "kind": "number", "value": n } for subgroups of n consecutive rows (1 for single values); { "kind": "column", "column": name } to start a subgroup wherever that column’s value changes.
- `increment`: number ≥ 1e-12 | null; default null. The measurement increment, such as 0.01; null to find it from the data.

Rules: Subgroup sizes are whole numbers, 1 or more; "rows" needs 2 or more columns.

### Stat › Quality Tools › Capability analysis › Normal

`stat.quality.capability.normal`. How a normal capability analysis compares your process spread with the specification, with Cp, Cpk, Pp, Ppk, Cpm and expected PPM worked out from 30 parts. [Learn more](https://statlab.cc/learn/capability-analysis-normal/)

- `layout`: "column" | "rows"; default "column". "column": one column holds the data, in subgroups; "rows": one subgroup per row, across 2 or more columns.
- `columns`: [column name, …] (1 or more); required. One numeric column (with "rows", the columns of each subgroup).
- `subgroup`: { "kind": "number", "value": number from 0 to 1000000000 } | { "kind": "column", "column": column name }; required. { "kind": "number", "value": n } for subgroups of n consecutive values (1 for single values); { "kind": "column", "column": name } for a column of subgroup IDs. Ignored with "rows".
- `lsl`: number | null; default null. The lower specification limit; null for none.
- `usl`: number | null; default null. The upper specification limit; null for none.
- `target`: number | null; default null. The target, for Cpm; null for none.
- `subgroupMethod`: "pooled" | "rbar" | "sbar"; default "pooled". How σ within is estimated from subgroups: "pooled" standard deviation, "rbar" average range or "sbar" average standard deviation.
- `individualMethod`: "average-mr" | "median-mr" | "mssd"; default "average-mr". How σ within is estimated from single values: "average-mr" average moving range, "median-mr" median moving range, "mssd" square root of half the mean squared successive difference.
- `unbiased`: true | false; default true. Use the unbiasing constants (c4, d2) in the estimates of σ.
- `historical`: { "mean": number | null, "sigma": number ≥ 0 | null }; default { "mean": null, "sigma": null }. A known "mean" and "sigma" to use instead of estimates from the data; null to estimate each.
- `tolerance`: number from 0.01 to 100; default 6. The process spread in standard deviations for Cp and Pp (6 for ±3σ).
- `confidence`: { "level": percent from 50 to 99.9, "sides": "two" | "lower" } | null; default null. Confidence intervals: { "level": percent, "sides": "two" for intervals or "lower" for lower bounds }; null for none.
- `zValues`: true | false; default false. Also give the benchmark Z values.
- `tests`: [whole number from 1 to 8, …] (up to 8); default [1]. Tests for special causes on the capability summary’s control chart (see “Tests for special causes”); the normal capability analysis has no chart.

Rules: Give "lsl", "usl" or both, the lower one smaller. With "column", one column and a whole subgroup size, 1 or more; with "rows", 2 or more columns. A known sigma is positive.

### Stat › Quality Tools › Capability analysis › Capability summary (normal)

`stat.quality.capability.summary`. What each chart in a capability summary checks (stability, normality, spread against the specification), with a worked example on 30 fill volumes. [Learn more](https://statlab.cc/learn/capability-summary/)

- `layout`: "column" | "rows"; default "column". "column": one column holds the data, in subgroups; "rows": one subgroup per row, across 2 or more columns.
- `columns`: [column name, …] (1 or more); required. One numeric column (with "rows", the columns of each subgroup).
- `subgroup`: { "kind": "number", "value": number from 0 to 1000000000 } | { "kind": "column", "column": column name }; required. { "kind": "number", "value": n } for subgroups of n consecutive values (1 for single values); { "kind": "column", "column": name } for a column of subgroup IDs. Ignored with "rows".
- `lsl`: number | null; default null. The lower specification limit; null for none.
- `usl`: number | null; default null. The upper specification limit; null for none.
- `target`: number | null; default null. The target, for Cpm; null for none.
- `subgroupMethod`: "pooled" | "rbar" | "sbar"; default "pooled". How σ within is estimated from subgroups: "pooled" standard deviation, "rbar" average range or "sbar" average standard deviation.
- `individualMethod`: "average-mr" | "median-mr" | "mssd"; default "average-mr". How σ within is estimated from single values: "average-mr" average moving range, "median-mr" median moving range, "mssd" square root of half the mean squared successive difference.
- `unbiased`: true | false; default true. Use the unbiasing constants (c4, d2) in the estimates of σ.
- `historical`: { "mean": number | null, "sigma": number ≥ 0 | null }; default { "mean": null, "sigma": null }. A known "mean" and "sigma" to use instead of estimates from the data; null to estimate each.
- `tolerance`: number from 0.01 to 100; default 6. The process spread in standard deviations for Cp and Pp (6 for ±3σ).
- `confidence`: { "level": percent from 50 to 99.9, "sides": "two" | "lower" } | null; default null. Confidence intervals: { "level": percent, "sides": "two" for intervals or "lower" for lower bounds }; null for none.
- `zValues`: true | false; default false. Also give the benchmark Z values.
- `tests`: [whole number from 1 to 8, …] (up to 8); default [1]. Tests for special causes on the capability summary’s control chart (see “Tests for special causes”); the normal capability analysis has no chart.

Rules: Give "lsl", "usl" or both, the lower one smaller. With "column", one column and a whole subgroup size, 1 or more; with "rows", 2 or more columns. A known sigma is positive.

### Graph › Histogram

`graph.histogram`. What a histogram shows, how to choose bins with the Sturges, square-root and Freedman-Diaconis rules, a worked example, and how binning can mislead you. [Learn more](https://statlab.cc/learn/histogram/)

- `columns`: [column name, …] (1 or more); required. Numeric columns, one histogram each.
- `fit`: true | false; default false. Draw the normal curve with the data’s mean and standard deviation.

### Graph › Dotplot

`graph.dotplot`. What a dotplot shows, how dots are stacked along a number line, a worked example with 25 cycle times, and when a dotplot beats a histogram. [Learn more](https://statlab.cc/learn/dotplot/)

- `columns`: [column name, …] (1 or more); required. Numeric columns, one row of dots each (one per group with "group").
- `group`: column name | null; default null. A column of group labels, for one set per group; null for none.

### Graph › Boxplot

`graph.boxplot`. How a boxplot is built from quartiles, whiskers and the 1.5 × IQR outlier rule, with a worked example comparing seal strength across three shifts. [Learn more](https://statlab.cc/learn/boxplot/)

- `columns`: [column name, …] (1 or more); required. Numeric columns, one box each (one per group with "group").
- `group`: column name | null; default null. A column of group labels, for one set per group; null for none.
- `showMean`: true | false; default false. Mark each mean with a symbol.

### Graph › Individual value plot

`graph.individual-value`. What an individual value plot shows, why it beats a boxplot or bar of means for small groups, and a worked example comparing bond strength from three suppliers. [Learn more](https://statlab.cc/learn/individual-value-plot/)

- `columns`: [column name, …] (1 or more); required. Numeric columns, one plot each (one per group with "group").
- `group`: column name | null; default null. A column of group labels, for one set per group; null for none.
- `showMean`: true | false; default false. Mark each mean with a symbol.

### Graph › Interval plot

`graph.interval`. How an interval plot draws t-based confidence intervals or standard error bars for each group's mean, with a hardness example and why overlap can mislead. [Learn more](https://statlab.cc/learn/interval-plot/)

- `columns`: [column name, …] (1 or more); required. Numeric columns, one interval each (one per group with "group").
- `group`: column name | null; default null. A column of group labels, for one set per group; null for none.
- `bars`: "ci" | "se"; default "ci". "ci" confidence intervals for the mean, "se" the mean ±1 standard error.
- `level`: number from 1 to 99.99; default 95. The confidence level in percent, for "ci".
- `pooled`: true | false; default false. Use the pooled standard deviation of all groups, as one-way ANOVA does.
- `showData`: true | false; default false. Show the values beside each interval.

Rules: With "ci" bars, the level is from 50 to 99.9.

### Graph › Scatterplot

`graph.scatterplot`. How a scatterplot shows the relationship between two variables, how to read direction, strength and curvature, and an example of feed rate versus roughness. [Learn more](https://statlab.cc/learn/scatterplot/)

- `ys`: [column name, …] (1 or more); required. Columns for the vertical axis, one graph each.
- `x`: column name; required. The column for the horizontal axis.
- `group`: column name | null; default null. A column of group labels, each group in its own color and symbol; null for none.
- `line`: "none" | "linear" | "connect"; default "none". "none", "linear" (a least-squares line, with r and R-sq) or "connect" (join the points in worksheet order).

### Graph › Matrix plot

`graph.matrix`. What a matrix plot (scatterplot matrix) shows, how its grid of panels is laid out, and a molding example that reveals a strong driver and two tangled inputs. [Learn more](https://statlab.cc/learn/matrix-plot/)

- `columns`: [column name, …] (2 to 10); required. Numeric columns, 2 to 10, plotted pair by pair.
- `group`: column name | null; default null. A column of group labels, each group in its own color and symbol; null for none.
- `layout`: "full" | "lower"; default "full". "full" grid or "lower" triangle.
- `line`: true | false; default false. Add a least-squares line to each plot.

### Graph › Bubble plot

`graph.bubble`. How a bubble plot adds a third variable as bubble size, why bubble area (not radius) must follow the data, and a maintenance example ranking presses. [Learn more](https://statlab.cc/learn/bubble-plot/)

- `y`: column name; required. The column for the vertical axis.
- `x`: column name; required. The column for the horizontal axis.
- `size`: column name; required. A numeric column whose values set each bubble’s area.
- `group`: column name | null; default null. A column of group labels, each group in its own color; null for none.
- `label`: column name | null; default null. A column whose values label the bubbles; null for none.

### Graph › Bar chart

`graph.bar`. How a bar chart compares counts or totals across categories, why bars must start at zero, counts versus rates, and a scrap example across five lines. [Learn more](https://statlab.cc/learn/bar-chart/)

- `bars`: "counts" | "function" | "table"; required. "counts": count the rows in each category; "function": a statistic of each variable in each category; "table": values already summarized, one row per category.
- `ys`: [column name, …] (up to 7); default []. The variables, up to 7, for "function" or "table" bars; [] for "counts".
- `stat`: "sum" | "mean" | "median" | "minimum" | "maximum" | "stdev" | "count" | "missing"; default "mean". The statistic of "function" bars.
- `categories`: [column name, …] (up to 2); required. One or two category columns; a second one splits each bar of the first. For "table", the column naming each row’s category.
- `layout`: "cluster" | "stack"; default "cluster". "cluster" bars side by side or "stack" them.
- `percent`: "none" | "total" | "category"; default "none". "none", "total" (percent of all bars) or "category" (percent within each category).
- `order`: "alphabetical" | "worksheet" | "increasing" | "decreasing"; default "alphabetical". The order of the categories: "alphabetical", "worksheet" (as they first appear), "increasing" or "decreasing" (by value).
- `labels`: true | false; default false. Write each bar’s value on it.

Rules: "counts" takes one or two category columns and no variables; "function" and "table" take variables, and several variables go with one category column at most. Percents only of values that add up (counts, tables, or the "sum", "count" or "missing" statistic); "category" percents need two levels: two category columns, or several variables.

### Graph › Pie chart

`graph.pie`. How a pie chart turns shares of a whole into slice angles, a scrap-cost example worked out slice by slice, and why pies with many slices mislead. [Learn more](https://statlab.cc/learn/pie-chart/)

- `pies`: "counts" | "table"; required. "counts": count the rows in each category; "table": values already summarized, with a column naming the categories.
- `columns`: [column name, …] (1 to 10); required. For "counts", category columns; for "table", numeric columns of values. One pie each, up to 10.
- `categories`: column name | null; default null. For "table", the column naming each row’s category; null for "counts".
- `by`: column name | null; default null. A column to draw one pie per value; null for none.
- `order`: "alphabetical" | "worksheet" | "increasing" | "decreasing"; default "decreasing". The order of the categories: "alphabetical", "worksheet" (as they first appear), "increasing" or "decreasing" (by value).
- `combine`: number from 0.01 to 100 | null; default null. Put slices smaller than this percent into Other; null to keep them.
- `labels`: "percent" | "count" | "both"; default "percent". What each slice’s label shows besides its name: "percent", "count" or "both".

Rules: "table" pies need the "categories" column, and "counts" pies take none. "combine" is between 0 and 100.

### Graph › Time series plot

`graph.time-series`. How a time series plot shows data in time order, how to read trends, shifts and cycles, and an example comparing weekly scrap on two lines after a change. [Learn more](https://statlab.cc/learn/time-series-plot/)

- `columns`: [column name, …] (1 or more); required. Numeric columns, values in time order.
- `stamp`: column name | null; default null. A date or time column for the x axis; null to number the points 1, 2, 3…
- `overlay`: true | false; default false. Draw every column on one graph (true) or each on its own (false).

### Graph › Probability plot

`graph.probability`. How a probability plot compares data with a distribution using plotting positions and a fitted line, with 12 tensile tests and the patterns to look for. [Learn more](https://statlab.cc/learn/probability-plot/)

- `columns`: [column name, …] (1 or more); required. Numeric columns, one plot each.
- `distribution`: "normal" | "lognormal" | "exponential" | "weibull"; default "normal". The distribution fitted, by maximum likelihood.
- `level`: number from 50 to 99.9 | null; default 95. The confidence level of the band around the fitted line, in percent; null for no band.

### Graph › Distribution plot

`graph.distribution`. How a distribution plot draws a density curve and shades tail areas, with a fill-weight example and a comparison of the t and normal distributions. [Learn more](https://statlab.cc/learn/distribution-plot/)

- `distributions`: [{ "id": "normal" | "lognormal" | "exponential" | "weibull" | "gamma" | "beta" | "uniform" | "t" | "chisquare" | "f" | "binomial" | "poisson" | "integer", "values": [number, …] (up to 3) }, …] (1 to 4); required. One to four distributions drawn together, each { "id": a distribution id, "values": its parameters in order } (see “Distributions”).
- `shade`: { "by": "x" | "probability", "area": "right" | "left" | "both" | "middle", "values": [number, …] (1 to 2) } | null; default null. A shaded area under a single distribution: { "by": "x" or "probability", "area": "right", "left", "both" (both tails) or "middle", "values": the cut value, or two values, lower first, for "both" or "middle" by x }; null for none.

Rules: Each distribution’s parameters are within their ranges (see “Distributions”). A shaded area goes with a single distribution: by "x", one value, or two in increasing order for "both" and "middle"; by "probability", one value between 0 and 1.

## Tests for special causes

Control charts run the tests listed in "tests", by number. Tests 5 to 8 apply only to charts of means and of individual values.

1. 1 point more than 3 standard deviations from the center line
2. 9 points in a row on the same side of the center line
3. 6 points in a row, all increasing or all decreasing
4. 14 points in a row, alternating up and down
5. 2 out of 3 points more than 2 standard deviations from the center line (same side)
6. 4 out of 5 points more than 1 standard deviation from the center line (same side)
7. 15 points in a row within 1 standard deviation of the center line (either side)
8. 8 points in a row more than 1 standard deviation from the center line (either side)

## Distributions

For "distributions" in `graph.distribution`: each id with its parameters, in the order "values" takes them.

- "normal": mean (any number), standard deviation (positive)
- "lognormal": location (any number), scale (positive), threshold (any number)
- "exponential": scale (positive), threshold (any number)
- "weibull": shape (positive), scale (positive), threshold (any number)
- "gamma": shape (positive), scale (positive), threshold (any number)
- "beta": first shape (positive), second shape (positive)
- "uniform": lower end (any number), upper end (any number)
- "t": degrees of freedom (positive)
- "chisquare": degrees of freedom (positive)
- "f": numerator degrees of freedom (positive), denominator degrees of freedom (positive)
- "binomial": number of trials (whole number ≥ 0), event probability (between 0 and 1)
- "poisson": mean (positive)
- "integer": minimum (whole number), maximum (whole number)

## Not in StatLab yet

These menu commands are planned for later; a recipe can’t run them yet:

- Stat › Basic Statistics, phase P2: 1-sample Z, 1-sample t, 2-sample t, Paired t, 1 proportion, 2 proportions, 1-sample Poisson rate, 2-sample Poisson rate, 1 variance, 2 variances, Correlation, Covariance, Outlier test, Goodness-of-fit test for Poisson
- Stat › Regression, phase P6: Fit regression model, Best subsets, Fitted line plot, Response optimizer, Nonlinear regression, Orthogonal regression, Partial least squares, Binary logistic regression, Ordinal logistic regression, Nominal logistic regression, Poisson regression
- Stat › ANOVA, phase P2: One-way ANOVA, Analysis of means, Test for equal variances, Main effects plot, Interaction plot
- Stat › ANOVA, phase P6: General linear model, Mixed effects model, MANOVA
- Stat › DOE, phase P7: Factorial design, Screening design, Response surface design, Mixture design, Taguchi design, Optimal design, Effects plots
- Stat › Control Charts › Variables charts for subgroups, phase P8: I-MR-R/S chart (between/within), Zone chart
- Stat › Control Charts › Variables charts for individuals, phase P8: Z-MR chart
- Stat › Control Charts › Attributes charts, phase P8: Laney P′ chart, Laney U′ chart
- Stat › Control Charts › Time-weighted charts, phase P8: Moving average chart, EWMA chart, CUSUM chart
- Stat › Control Charts › Multivariate charts, phase P8: T² chart, Generalized variance chart, MEWMA chart
- Stat › Control Charts › Rare event charts, phase P8: G chart, T chart
- Stat › Control Charts, phase P8: Acceptance control chart
- Stat › Quality Tools › Capability analysis, phase P8: Nonnormal, Nonparametric, Between/within, Batch, Binomial, Poisson, Automated
- Stat › Quality Tools, phase P8: Individual distribution identification, Box-Cox transformation, Johnson transformation, Tolerance intervals, Acceptance sampling
- Stat › Quality Tools › Gage study, phase P3: Create gage R&R study worksheet, Gage R&R (crossed), Gage R&R (nested), Expanded gage R&R, Gage run chart, Gage linearity and bias, Type 1 gage study, Attribute gage study, EMP crossed
- Stat › Quality Tools › Gage study, phase P8: VDA 5 study
- Stat › Quality Tools, phase P3: Attribute agreement analysis
- Stat › Quality Tools, phase P5: Multi-vari chart, Variability chart, OEE calculator
- Stat › Dominant-Cause Tools, phase P5: Concentration chart, Components search, Paired comparisons, Product/process search, Variables search, B vs C test, Tukey end-count test, Realistic tolerance parallelogram, Measurement agreement plot, Pre-Control
- Stat › Reliability/Survival, phase P9: Distribution analysis, Accelerated life testing, Regression with life data, Cox regression, Probit analysis, Test plans, Repairable systems, Warranty analysis, Stability study
- Stat › Multivariate, phase P9: Principal components, Factor analysis, Discriminant analysis, Cluster observations, Cluster variables, Correspondence analysis, Item analysis
- Stat › Time Series, phase P9: Trend analysis, Decomposition, Moving average, Single exponential smoothing, Double exponential smoothing, Winters' method, Autocorrelation, Partial autocorrelation, Cross correlation, ARIMA, Forecast with best ARIMA, Augmented Dickey-Fuller test
- Stat › Tables, phase P2: Tally individual variables, Cross tabulation and chi-square, Chi-square goodness-of-fit test
- Stat › Nonparametrics, phase P2: 1-sample sign test, 1-sample Wilcoxon, Mann-Whitney, Kruskal-Wallis, Mood's median test, Friedman test, Runs test
- Stat › Equivalence Tests, phase P2: 1-sample, 2-sample, Paired, 2×2 crossover design
- Stat › Power and Sample Size, phase P2: 1-sample Z, 1-sample t, 2-sample t, Paired t, 1 proportion, 2 proportions, 1 variance, 2 variances, One-way ANOVA, Sample size for estimation, Sample size for tolerance intervals
- Stat › Power and Sample Size, phase P7: 2-level factorial design, Plackett-Burman design
- Stat › Resampling, phase P2: 1-sample bootstrap, 2-sample bootstrap, Randomization test
- Stat › Predictive Analytics, phase Later: Decision tree, Random forest, Gradient boosting, Automated model comparison
- Graph › 3D plots, phase P7: Contour plot, 3D surface plot, 3D wireframe plot
- Graph › Advanced plots, phase P10: Heatmap, Parallel coordinates plot, Correlogram, Binned scatterplot, Wafer plot
- Graph, phase P10: Graph builder

The Data and Calc menus (sorting, subsets, stacking, recoding, the calculator, random data) change the worksheet by hand; recipes don’t run them. Prepare the data yourself before writing them in "data" only when the person agrees, and say what you changed in a note.
