Skip to content

ParhamHsn/Nonparametric-Statistics

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Nonparametric Statistics in R

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.

Repository Contents

Problem 1: Mann–Whitney U Test

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

Problem 2: Correlation Matrix Computation

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

Problem 3: Runs Test for Randomness

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

Technologies

  • Language: R
  • Concepts: Nonparametric Statistics, Hypothesis Testing, Correlation Analysis, Randomness Testing, Statistical Computing

Educational Purpose

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.

About

Implementations of fundamental nonparametric statistical methods and statistical programming exercises in R, including the Mann–Whitney U test, correlation matrix computation, and runs test for randomness.

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages