Skip to content

Conversation

Brijesh03032001
Copy link

🏥 Biomedical Statistical Tests for Non-parametric Analysis

This PR adds essential statistical tests commonly used in biomedical research and clinical studies.

📊 What's Added

  • Wilcoxon Signed-Rank Test (Biomedical/wilcoxon_signed_rank_test.r) - For paired samples and one-sample tests
  • Mann-Whitney U Test (Biomedical/mann_whitney_u_test.r) - For independent group comparisons
  • Comprehensive Documentation (Biomedical/README.md) - Explaining importance for biomedical students

🔬 Features

  • Complete implementations with robust error handling and input validation
  • Biomedical examples with realistic dummy clinical data (892 lines of code)
  • Clinical interpretations and statistical guidance for medical applications
  • Educational focus specifically designed for biomedical students

📋 Examples Include

Wilcoxon Signed-Rank Test:

  • Blood pressure before/after treatment analysis
  • Pain scores with medication effectiveness
  • Weight loss program evaluation
  • Cholesterol levels vs normal reference values

Mann-Whitney U Test:

  • Drug efficacy studies (treatment vs control)
  • Biomarker analysis by gender differences
  • Disease severity comparison by stage
  • Age-related immune response analysis
  • Glucose levels (pre-diabetic vs diabetic)

🎯 Why This Matters for Biomedical Research

Medical data often violates normal distribution assumptions due to:

  • Skewed distributions (lab values, reaction times)
  • Outliers that are medically significant
  • Small sample sizes (pilot studies, rare diseases)
  • Ordinal scales (pain scores, severity ratings)

These non-parametric tests are essential for:

  • Clinical trial analysis
  • Treatment effectiveness studies
  • Biomarker research
  • Quality of life assessments
  • Diagnostic accuracy comparisons

✅ Testing & Quality

  • ✅ Both scripts run successfully with all examples
  • ✅ Produces correct statistical outputs with p-values and effect sizes
  • ✅ Includes proper error handling and edge case management
  • ✅ Comprehensive documentation with usage guidelines
  • ✅ Follows R best practices and coding standards

📚 Educational Value

  • Explains statistical theory in accessible terms
  • Provides real-world biomedical applications
  • Includes clinical interpretation guidelines
  • Offers guidance on when to use each test
  • Covers common pitfalls and considerations

- Implement Wilcoxon Signed-Rank Test for paired samples and one-sample tests
- Implement Mann-Whitney U Test for independent group comparisons
- Include comprehensive biomedical examples with dummy clinical data
- Add detailed documentation explaining importance for biomedical students
- Cover common use cases: treatment effects, biomarker analysis, clinical trials
- Provide robust error handling and statistical interpretations

Features:
- Blood pressure, pain score, weight loss, and cholesterol analysis examples
- Drug efficacy, gender differences, disease staging, and immune response examples
- Clinical interpretation guidelines and statistical theory explanations
- Ready-to-use functions with medical data applications
@Copilot Copilot AI review requested due to automatic review settings October 17, 2025 00:09
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Adds two non-parametric statistical test implementations in R with biomedical-focused examples and documentation.

  • New Wilcoxon signed-rank test for paired/one-sample scenarios with custom print method
  • New Mann-Whitney U (rank-sum) test for independent samples with custom print method and examples
  • README explaining use-cases, interpretation, and example usage

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 10 comments.

File Description
Biomedical/wilcoxon_signed_rank_test.r Adds Wilcoxon signed-rank test implementation and extensive runnable examples
Biomedical/mann_whitney_u_test.r Adds Mann-Whitney U test implementation, tie-handling attempt, and runnable examples
Biomedical/README.md Adds documentation and quick start usage for the new tests

## 📋 Contents

- [`wilcoxon_signed_rank_test.r`](wilcoxon_signed_rank_test.r) - Wilcoxon Signed-Rank Test for paired samples
- [`mann_whitney_u_test.r`](mann_whitney_u_test.r) - Mann-Whitney U Test for independent samples
Copy link

Copilot AI Oct 17, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Per repository guidelines, please also update DIRECTORY.md to list these new algorithms in the appropriate section and ensure they are categorized consistently (e.g., statistics/mathematics).

Suggested change
- [`mann_whitney_u_test.r`](mann_whitney_u_test.r) - Mann-Whitney U Test for independent samples
- [`mann_whitney_u_test.r`](mann_whitney_u_test.r) - Mann-Whitney U Test for independent samples
- [`kruskal_wallis_test.r`](kruskal_wallis_test.r) - Kruskal-Wallis Test for comparing more than two groups
- [`friedman_test.r`](friedman_test.r) - Friedman Test for repeated measures across multiple groups

Copilot uses AI. Check for mistakes.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please update DIRECTORY.md instead of adding this file

## 📋 Contents

- [`wilcoxon_signed_rank_test.r`](wilcoxon_signed_rank_test.r) - Wilcoxon Signed-Rank Test for paired samples
- [`mann_whitney_u_test.r`](mann_whitney_u_test.r) - Mann-Whitney U Test for independent samples
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please update DIRECTORY.md instead of adding this file

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.

2 participants