Kruskal Wallis statistics calculation for equal data

This code calculates the Kruskal Wallis statistics given for 2 datasets with equal length > 5
247 Downloads
Updated 26 Aug 2011

View License

% Kruskal_Wallis
% This is a statistical test to check two datasets if are different.
% Kruskal_Wallis is similar to one way ANOVA but the data is not expected
% to be natrual distribution. It works with any breaked condition of the
% ANOVA.
%
% As a reminder, the assumptions of the one-way ANOVA for independent samples are
% that the scale on which the dependent variable is measured has the properties of an equal interval scale;T
% that the k samples are independently and randomly drawn from the source population(s);T
% that the source population(s) can be reasonably supposed to have a normal distribution; andT
% that the k samples have approximately equal variances.
%
% We noted in the main body of Chapter 14 that we need not worry very much about the first, third, and fourth of these assumptions
% when the samples are all the same size. For in that case the analysis of variance is quite robust, by which we mean relatively
% unperturbed by the violation of its assumptions. But of course, the other side of the coin is that when the samples are not all
% the same size, we do need to worry. In this case, should one or more of assumptions 1, 3, and 4 fail to be met, an appropriate
% non-parametric alternative to the one-way independent-samples ANOVA can be found in the Kruskal-Wallis Test.
%
% see http://faculty.vassar.edu/lowry/ch14a.html
%
% Assumption used in the programming of this code is thatb oth data sets are equal

Cite As

Sherif Omran (2024). Kruskal Wallis statistics calculation for equal data (https://www.mathworks.com/matlabcentral/fileexchange/32691-kruskal-wallis-statistics-calculation-for-equal-data), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2011a
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Version Published Release Notes
1.0.0.0