Skip to content
Open navigation
OpenOpen workspace

AI and survey data

How to analyze survey data with ChatGPT or Claude

ChatGPT and Claude are good at wording and interpretation and unreliable at arithmetic on pasted survey rows. The dependable way to use them is to compute the table and its tests with statistical code first, then give the assistant the tested numbers and ask it to explain them. This guide shows two ways to do that with Crosstabs, both free.

Published by crosstabs.com · Last updated ·
How results are checkedNamed statistical review pending. Selected automated reference cases are published on the validation page.

Run this on your own data — free, no signup

Upload a CSV, Excel, SPSS, Stata, SAS, R, Parquet or JSON file. Everything runs in your browser; your file never leaves your device.

Open the workspace →

Why chatbots get survey numbers wrong

A language model produces the next likely piece of text. A percentage is not text to predict. It is an exact count of the right respondents divided by the right base, after missing answers, filters and weights have been handled the same way in every cell. A significance test adds expected counts, degrees of freedom and a p-value on top of that.

When you paste raw rows into a chat and ask for a breakdown, the assistant may estimate these values instead of counting them. The result reads well and can still be wrong: a miscounted cell, a percentage on the wrong base, or a claim that a difference is significant when no test was run.

Some assistants can run code on an uploaded file, which fixes the counting. You still have to check which base, missing-value rule and test the generated code used. Starting from a table that was computed and tested by a statistics tool removes that step.

Route A: copy a tested table into your assistant (no setup)

  1. Open your file at crosstabs.com/workspace. CSV, Excel, SPSS, Stata, SAS, R, Parquet and JSON files are read in your browser, so the file stays on your device.
  2. Choose a row variable and a column variable to build the comparison.
  3. Go to Insights and find the panel titled “Interpret this comparison with your AI assistant”.
  4. Optionally type a question for the assistant. If you leave it empty, the hand-off asks the assistant to explain the strongest useful differences in the comparison.
  5. Select Preview evidence and read the text that will be copied.
  6. Select Copy evidence for your assistant, paste it into ChatGPT, Claude or another assistant, and send.

The copied text contains:

  • An instruction to use only the cited evidence, to state bases, weight meaning, missing-value policy and limitations, and not to infer causality.
  • A header line [T1] with the two variables, the number of eligible respondents and the table total, followed by the missing-value policy and the weight meaning.
  • One line per cell, cited as [T1:R1:C1], [T1:R1:C2] and so on, with the count, the column percentage and the row percentage.
  • A [T1:TEST] line: the chi-square test of independence with its degrees of freedom and p-value, Cramér's V with its effect-size label, and the smallest expected count, with a caution when that count is below 5.
  • A [T1:LETTERS] line when column comparisons apply: which letter stands for which column, and which column percentages are significantly higher than which others at the 95% level. These are the same significance letters the table shows.

When the test lines are present, the instruction tells the assistant to report significance only as those lines state it and not to run or infer other tests. When the table has no ordinary test to report, for example a table weighted with a sampling weight, the test lines are left out and the instruction tells the assistant not to infer statistical significance.

Route B: connect your assistant to the statistics engine (MCP server)

If you want the assistant to request tables itself, install the Crosstabs MCP server. It is a Python package that your AI client starts on your own computer, so the assistant calls statistical code instead of doing the arithmetic.

  1. Install the package. The documented route is uv tool install --python 3.12 crosstabs; pipx install crosstabs or pip install crosstabs inside a Python 3.10+ virtual environment also work.
  2. The package provides two local servers. crosstabs-headless is the survey workspace: it imports a file and runs tables, and it also needs Node.js 22 or later. crosstabs is a set of statistical calculators that work on counts you supply.
  3. Add the servers to your AI client. Setup is documented for Claude Desktop, Claude Code, Codex and Cursor. Use the full path to each command.
  4. Put the survey file in a folder the server may read. By default that is one private exchange folder; you can list your own folders in CROSSTABS_MCP_ALLOWED_ROOTS.
  5. Ask the assistant to use Crosstabs: check get_runtime_status, create a project from your file, profile it, and run a crosstab of your outcome by a group.

The assistant then works through tools such as create_project, import_dataset, profile_dataset, run_table and run_tab_book, and on the calculator server chi_square_test and fishers_exact. The calculations run on your machine, and the package makes no hosted AI call of its own. The results a tool returns are part of your conversation with the assistant, like anything else you send it.

The MCP server page has the configuration for each client, and the developers page covers the JSON API for the same statistics.

What to ask the assistant for, and what not to

Ask it to work with the numbers it was given:

  • “Explain in plain language what this table shows. Cite the cell for each number.”
  • “Which differences between columns are statistically significant according to the LETTERS line, and which are not?”
  • “Write a three-sentence summary for a client who does not read statistics.”
  • “Draft a slide headline and two supporting bullets from this evidence.”
  • “What does a Cramér's V of this size mean in practice?”
  • “What should I be careful about given the bases in this table?”

Do not ask it to produce new numbers from the pasted text:

  • Do not ask it to recompute percentages, re-run the test or estimate a p-value.
  • Do not ask for a breakdown the table does not contain. Build that comparison in the workspace and hand it off again.
  • Do not ask why a difference exists and accept the answer as a finding. A crosstab shows association, not cause.

Then check the reply against the table: every number in it should match a cited line. The guide to reading a crosstab covers bases, row and column percentages and what the tests mean.

Limits

  • The hand-off covers one comparison at a time: the row and column variables currently selected.
  • No respondent rows are included, so the assistant cannot answer questions about individuals.
  • The hand-off is withheld when any cell holds one to four respondents, when the table has more than 12 rows or 8 columns, and for multiple-response tables.
  • The test lines carry the chi-square test, Cramér's V and the 95% column comparisons. Other statistics shown in the workspace are not copied.
  • Tables that use saved project settings, such as custom tables or a complex sample design, are shared from Saved work, not from this panel.
  • The assistant's wording is still its own. Read it against the table before you send it to anyone.

Everything described here is free: the workspace, the hand-off and the MCP package, with no Crosstabs account. To practice without your own file, the data library has crosstabs of open public surveys with their tests.

Questions

Frequently asked questions

Can ChatGPT or Claude analyze survey data?

They can explain, summarize and write up survey results well. They are unreliable at producing the numbers themselves when they work from pasted rows, because a language model predicts text rather than counting. Compute the table and its tests with statistical code first, then give the assistant those results to interpret.

Why are the percentages wrong when I paste survey data into a chatbot?

A percentage needs an exact count of the right rows divided by the right base. A language model that reads pasted rows estimates the answer as text instead of counting, so it can miscount, use the wrong base or skip missing answers inconsistently. The longer the paste, the more likely the error.

Does my survey file get uploaded when I use the AI hand-off?

No. The Crosstabs workspace reads the file in your browser. The hand-off prepares text that holds only aggregate cells and test results, with no respondent rows, and nothing is sent anywhere until you copy that text and paste it into your assistant yourself.

What does the hand-off copy?

A short instruction, your optional question, one cited line per table cell with its count, column percentage and row percentage, the number of eligible respondents, the missing-value policy and the weight meaning. When the table is entitled to tests it adds a [T1:TEST] line with the chi-square test and Cramér's V, and a [T1:LETTERS] line with the column pairs that differ at the 95% level.

Why is there no significance result in my hand-off?

The test lines are left out when the table has no ordinary test to report, for example when it is weighted with a sampling weight. In that case the copied instruction tells the assistant not to infer statistical significance at all.

Which assistants work with the Crosstabs MCP server?

The package documents setup for Claude Desktop, Claude Code, Codex and Cursor. It runs as a local server that the AI client starts on your computer. If you use ChatGPT in a browser, use the copy-and-paste hand-off instead.

Does this cost anything?

No. The workspace, the AI hand-off and the MCP package are free and need no Crosstabs account. You only need whatever access you already have to ChatGPT, Claude or another assistant.

Next steps

Try it on your own data — free, no signup

Upload a CSV, Excel, SPSS, Stata, SAS, R, Parquet or JSON file. Everything runs in your browser; your file never leaves your device.

Open the workspace →

← All calculators & guides