> For the complete documentation index, see [llms.txt](https://help.imotions.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.imotions.com/lab/getting-started/multimodal-data-overview/general-data-analysis-and-interpretation.md).

# General data analysis and interpretation

Understand descriptive statistics and p-values, choose a statistical test for exported iMotions data and avoid common interpretation errors.

This article covers the statistics you need after exporting data from iMotions Lab: describing your data, choosing an inferential test and avoiding common errors when interpreting the results. It is for readers who analyze their exports in Excel, SPSS, R or similar software and want a starting point for choosing a method.

## Descriptive statistics

Calculate descriptive statistics before running any test. They show what your data looks like and often reveal problems, such as outliers or a respondent with missing data, before they affect a test result. Which statistics you report depends on the study, the research question and the sensors used.

### Mean and median

The *mean* is the average of all values. You can calculate it for each metric and group in your study, for example the average number of GSR peaks per minute, the average EEG frontal asymmetry score or the average Joy score from facial expression analysis. Comparing the means of your groups gives a first impression of how they differ.

The *median* is the middle value when all values are sorted from lowest to highest. In a symmetric distribution, such as a normal distribution, the mean and the median are the same. Real data is rarely symmetric, and the mean is pulled toward outliers: values far from the rest of the data. For example, if most respondents have between two and three GSR peaks per minute and one has 15, that one respondent raises the mean noticeably, especially in a small sample. The median is not affected. Report the median alongside the mean when your data is skewed or has outliers, and only remove an outlier when you have a reason, such as a recording with poor signal quality, and report that you did.

### Variance and standard deviation

The *variance* describes how far the values are spread around the mean. It is calculated by subtracting the mean from each value, squaring the differences, adding them up and dividing by the number of values minus one. Most software uses this sample variance by default, for example `VAR.S` in Excel and `var()` in R.

The *standard deviation* is the square root of the variance, in the same unit as the data. A low standard deviation means that most values are close to the mean, so the mean represents the data well. A high standard deviation means that the values vary a lot and the mean alone hides much of that variation.

## Inferential statistics and p-values

Descriptive statistics show differences in your sample. Inferential tests tell you whether those differences are large enough to be unlikely if there were no real difference. For example, you show two TV ads to two groups and measure GSR peaks per minute. The group that saw ad 1 has a higher mean than the group that saw ad 2. An inferential test tells you whether this difference can be explained by random variation between respondents.

Most tests produce a *p-value*: the probability of getting a result at least as extreme as yours if there were no real difference. A small p-value means that your result would be unusual if there were no difference, so you reject that assumption and call the result statistically significant. The threshold, called alpha, is chosen before the analysis and is usually 0.05.

A p-value is not the probability that your result is due to chance, and it does not tell you how large or important a difference is. Report an effect size, such as Cohen's d for a t-test or eta squared for an analysis of variance (ANOVA), together with the p-value, and preferably a 95% confidence interval, which shows the range of differences that are compatible with your data.

A non-significant result does not show that there is no difference. With few respondents, a test can only detect large differences, so a real but moderate difference often goes undetected. Decide on the number of respondents before collecting data with a power analysis, for example in G\*Power or with the `pwr` package in R, based on the smallest difference that would matter for your research question.

## Choosing a statistical test

The two charts below cover the most common situations. Start with the first chart if you want to compare groups or conditions, for example respondents who saw different stimuli. Use the second chart if you want to know how variables are related, predict an outcome or assess agreement between raters or measurements.

![Flowchart for choosing a test to compare groups. It starts with the type of outcome (continuous, ordinal or categorical), then asks what you are comparing and whether the groups are independent or repeated, and ends in a recommended test.](https://286068319-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNLNBWkNpljDaAj5rQtNa%2Fuploads%2Fm3Z3jMDdjNxXegqBLL1j%2Fstatistical-test-selection-comparing-groups.png?alt=media)

![Flowchart for choosing a test for relationships between variables, for predicting an outcome and for agreement or reliability. Each branch asks about the type of variables or outcome and ends in a recommended test or model.](https://286068319-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNLNBWkNpljDaAj5rQtNa%2Fuploads%2FNwosiFAW6dKXqURQYo26%2Fstatistical-tests-relationships-prediction-agreement.png?alt=media)

{% hint style="info" %}
The charts are a starting point for common designs. For complex designs, such as several sensors, nested groups or unbalanced data, consult a statistician before you collect data.
{% endhint %}

### Independent and repeated data

Groups are *independent* when each respondent contributes to only one group, for example when each respondent sees only one of two ads. They are *repeated* when the same respondents appear in every group, for example when each respondent sees both ads. Most iMotions studies show several stimuli to every respondent, so comparisons between stimuli are usually repeated. A test for independent groups on repeated data gives wrong p-values.

iMotions exports contain many samples, fixations or peaks per respondent. These are not independent observations. Aggregate them to one value per respondent and condition before running the tests in the chart, for example the mean pupil size per respondent per stimulus. If you want to use all data points, or if respondents have missing conditions, use a mixed-effects model, which accounts for repeated data from the same respondent.

### Assumptions

Parametric tests, such as t-tests and ANOVAs, assume that the data from different respondents is independent and that the residuals are roughly normally distributed. For a paired t-test, this means the differences between each respondent's two values, not the values themselves.

* Use Welch's t-test and Welch's one-way ANOVA by default for independent groups. They do not assume equal variances and lose almost nothing when the variances are equal, so you do not need to test for equal variances first. Factorial and repeated-measures ANOVAs have no Welch version.
* Check normality by looking at a histogram or Q-Q plot of the residuals rather than with a significance test. With large samples, a significance test flags deviations that do not matter, and with small samples it misses deviations that do. With 30 or more respondents per group, t-tests and ANOVAs are robust to moderate deviations from normality.
* Use the tests on the ordinal branch of the first chart when your outcome is ordinal, such as a rating scale, or when it is continuous but clearly not normal in a small sample.
* A repeated-measures ANOVA with three or more conditions also assumes sphericity: that the differences between each pair of conditions vary equally. Apply the Greenhouse-Geisser correction by default rather than testing for sphericity first. It changes the result very little when the assumption holds.
* Pearson's r and linear regression assume a linear relationship. Plot your data before calculating them.
* McNemar's test and Cochran's Q test only work for yes/no outcomes. For repeated measurements of an outcome with three or more categories, use a mixed-effects model.

### After the test

A significant one-way ANOVA tells you that at least one group mean differs from the others, but not which. Run a post-hoc test to find the groups that differ, for example Tukey's test, or the Games-Howell test after Welch's ANOVA. Factorial ANOVAs produce one p-value per main effect and interaction.

To assess agreement between two measurement methods, use a Bland-Altman plot together with the intraclass correlation coefficient (ICC). A high Pearson's r only shows that two measurements rise and fall together, not that they agree.

## Common pitfalls

### Multiple comparisons

Every test has a chance of a *false positive*, also called a type I error: a significant result when there is no real difference. With an alpha of 0.05 that chance is 5% per test, and it adds up when you run many tests. With 20 independent tests and no real differences, the chance of at least one false positive is about 64%. This happens easily with biometric data, for example when you test every AOI, every EEG channel or every facial expression.

* Decide on your research question, hypotheses and analysis plan before collecting data, so you only run the tests you need.
* Correct for multiple comparisons when you run several tests on the same question. The Bonferroni correction divides alpha by the number of tests. The Holm correction is less strict and equally safe. For many tests, such as all EEG channels, the Benjamini-Hochberg procedure controls the expected proportion of false positives among the significant results.

### Reverse inference

*Reverse inference* is a reasoning error that is common when interpreting brain and other biometric data. Studies show that certain brain regions are reliably active during a cognitive process. This is forward inference: if a person is engaged in the process, the region is likely to be active. Reverse inference turns this around and concludes from the activity of a region that the person is engaged in the process.

This conclusion is not valid in general, because most brain regions are active during many different processes. For example, if region X is active whenever people experience pleasure, but also during other processes, then activity in region X does not show that a respondent is experiencing pleasure. The inference is only reasonable when a region is active during one process and rarely during others.

The image below shows the difference. The intraparietal area is active when people pay attention to a visual stimulus (forward inference). Concluding that people are paying attention because the intraparietal area is active is reverse inference.

![Two panels. Top: an arrow from "attention to a visual stimulus" to an active intraparietal area, labeled forward inference. Bottom: an arrow from the active intraparietal area back to "paying attention", labeled reverse inference.](https://286068319-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNLNBWkNpljDaAj5rQtNa%2Fuploads%2Fgit-blob-db9ed9a94621a9965ca8b2243bff67456d43de5e%2F97e5f90718_2020-06-12_1523.webp?alt=media)

The same applies to other sensors. A GSR peak shows arousal, not whether the arousal is positive or negative, and a smile detected by facial expression analysis does not always mean that the respondent is happy. To avoid reverse inference, start from a testable hypothesis and choose sensors and metrics that measure what the hypothesis is about, ideally combining several sensors.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://help.imotions.com/lab/getting-started/multimodal-data-overview/general-data-analysis-and-interpretation.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
