Skip to content

docs: add exploratory statistical significance tutorial - #1172

Closed
tomatotomata wants to merge 1 commit into
stumpy-dev:mainfrom
tomatotomata:codex/statistical-significance-tutorial-731
Closed

docs: add exploratory statistical significance tutorial#1172
tomatotomata wants to merge 1 commit into
stumpy-dev:mainfrom
tomatotomata:codex/statistical-significance-tutorial-731

Conversation

@tomatotomata

@tomatotomata tomatotomata commented Aug 2, 2026

Copy link
Copy Markdown

Pull Request Checklist

  • Read our Contributing Guide
  • Referenced a Github issue: Statistical Significance #731
  • Read and reviewed all comments on Statistical Significance #731 and checked cross-referenced work
  • Checked that Statistical Significance #731 is not assigned and is not addressed by another pull request
  • Left a meaningful approach comment on Statistical Significance #731 and received maintainer confirmation before proceeding
  • Forked, cloned, and checked out the newest version of the code
  • Created a new branch
  • Made the necessary documentation changes
  • Installed black (not available in this local environment)
  • Installed flake8 (not available in this local environment)
  • pytest-cov is available in the local environment
  • Ran the notebook JSON and extracted-code checks described below
  • Ran the full ./setup.sh dev && ./test.sh suite (the local environment does not have stumpy installed)
  • AI code assistance was used to generate 15%+ of this pull request

What does this PR do?

Adds Tutorial_Statistical_Significance.ipynb, a small tutorial based on the approach discussed in #731. It:

  • builds a fixed-seed synthetic series with a repeated motif
  • compares the observed minimum matrix-profile distance with a null distribution from circular block permutations
  • uses a +1 empirical lower-tail correction and shows sensitivity considerations
  • documents dependence, multiple comparisons, block-size choices, and the exploratory nature of the result

The notebook is added to the documentation toctree and mirrored through the repository's existing notebooks/ link convention.

Validation

  • Notebook JSON parses successfully.
  • Extracted code cells compile after removing the IPython magic.
  • The control flow was executed with a lightweight brute-force matrix-profile stand-in because stumpy is not installed locally; the example produced a finite empirical p-value and plot construction completed.
  • git diff --check passes.

This intentionally stays tutorial-only and does not add a public API. I was thinking of keeping the null construction and caveats visible in the notebook so readers can adapt the method without mistaking it for a universal threshold. Let me know what you think.

Fixes #731

Signed-off-by: ahmadalguydi <ahmadalgaidy@hotmail.com>
@gitnotebooks

gitnotebooks Bot commented Aug 2, 2026

Copy link
Copy Markdown

Found 2 changed notebooks. Review the changes at https://app.gitnotebooks.com/stumpy-dev/stumpy/pull/1172

@github-actions

github-actions Bot commented Aug 2, 2026

Copy link
Copy Markdown

❌ This pull request has been automatically closed because the mandatory PR template was removed or not filled out. Please reopen or recreate this PR with the required information.

@github-actions github-actions Bot closed this Aug 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Statistical Significance

1 participant