-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Labels
advancedenhancementNew feature or requestNew feature or requesthelp wantedExtra attention is neededExtra attention is neededstatstutorial
Description
Description:
Rework the statistical analysis in getting_started.ipynb to use appropriate tests instead of basic t-tests on epoch-averaged PSDs.
Context:
The current tutorial computes PSDs averaged across epochs, then runs t-tests. This approach is statistically problematic because:
- Averaging across epochs loses trial-level variance information
- Simple t-tests don't account for the repeated-measures structure
- Multiple comparisons across channels/frequencies need proper correction
Current problematic code (in stats.py):
# averaging across frequencies (compute stats only in ch space)
power = np.mean(data, axis=2)
T_obs, p_values, H0 = mne.stats.permutation_t_test(power, n_permutations, tail=0)Tasks:
-
Analysis & Documentation
- Document why current approach is problematic
- Review appropriate alternatives (repeated-measures ANOVA, mixed-effects, cluster-based)
-
Implementation
- Implement proper group-level statistics for PSD data
- Options to consider:
- Repeated-measures ANOVA (if comparing conditions)
- Mixed-effects models (for hierarchical data)
- Non-parametric cluster-based permutation (already partially in HyPyP)
- Add to
stats.pyor create new module
-
Tutorial
- Create new notebook section or mini-notebook: "Proper Statistics for Hyperscanning"
- Show correct workflow: epochs → stats (not epochs → average → stats)
- Include interpretation guidelines
Acceptance Criteria:
- Document explaining the statistical issue
- New function(s) in
stats.pywith proper tests - Tutorial notebook demonstrating correct usage
- Comparison showing difference between old and new approach
- Docstrings with statistical assumptions clearly stated
References:
- MNE cluster-based permutation: https://mne.tools/stable/auto_tutorials/stats-sensor-space/
scipy.stats.f_oneway,pingouinlibrary for ANOVA
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
advancedenhancementNew feature or requestNew feature or requesthelp wantedExtra attention is neededExtra attention is neededstatstutorial