This repository contains implementations of fundamental nonparametric statistical methods and related statistical programming exercises in R. The project demonstrates how classical statistical procedures can be developed from first principles without relying solely on built-in functions.
Implementation of the Mann–Whitney U (Wilcoxon Rank-Sum) Test for comparing two independent samples.
Features
- Manual computation of the Mann–Whitney statistic
- Calculation of the expected value and variance
- Support for one-sided and two-sided alternatives
- P-value estimation using the normal approximation
Learning Objectives
- Understand rank-based hypothesis testing
- Implement a nonparametric two-sample test from scratch
- Practice statistical programming in R
Implementation of a custom function for generating the correlation matrix of multivariate datasets.
Features
- Computes pairwise Pearson correlations between variables
- Produces a complete symmetric correlation matrix
- Works with datasets containing any number of variables
- Demonstrated on simulated data and the built-in Iris dataset
Learning Objectives
- Understand correlation analysis in multivariate data
- Practice matrix operations and nested loops in R
- Explore relationships among variables through statistical programming
Implementation of the Runs Test, a nonparametric procedure used to assess whether a sequence of observations occurs in a random order.
Features
- Converts observations into binary values relative to the median
- Counts the number of runs in the sequence
- Computes the expected number of runs and its variance
- Applies the normal approximation with continuity correction
- Returns the corresponding p-value
Learning Objectives
- Understand the concept of randomness testing
- Learn how run-based statistics are constructed
- Implement nonparametric procedures for sequence analysis
- Practice probability calculations and hypothesis testing in R
- Language: R
- Concepts: Nonparametric Statistics, Hypothesis Testing, Correlation Analysis, Randomness Testing, Statistical Computing
This repository was developed as part of coursework in Nonparametric Statistics. The implementations emphasize understanding the underlying algorithms and mathematical foundations of statistical methods through hands-on programming.