Home > freetb4matlab > statistics > tests > wilcoxon_test.m

wilcoxon_test

PURPOSE ^

% For two matched-pair sample vectors @var{x} and @var{y}, perform a

SYNOPSIS ^

function [pval, z] = wilcoxon_test (x, y, alt)

DESCRIPTION ^

% -*- texinfo -*-
% @deftypefn {Function File} {[@var{pval}, @var{z}] =} wilcoxon_test (@var{x}, @var{y}, @var{alt})
% For two matched-pair sample vectors @var{x} and @var{y}, perform a
% Wilcoxon signed-rank test of the null hypothesis PROB (@var{x} >
% @var{y}) == 1/2.  Under the null, the test statistic @var{z}
% approximately follows a standard normal distribution when @var{n} > 25.
%
% @strong{Warning}: This function assumes a normal distribution for @var{z}
% and thus is invalid for @var{n} <= 25.
%
% With the optional argument string @var{alt}, the alternative of
% interest can be selected.  If @var{alt} is @code{'~='} or
% @code{'<>'}, the null is tested against the two-sided alternative
% PROB (@var{x} > @var{y}) ~= 1/2.  If alt is @code{'>'}, the one-sided
% alternative PROB (@var{x} > @var{y}) > 1/2 is considered.  Similarly
% for @code{'<'}, the one-sided alternative PROB (@var{x} > @var{y}) <
% 1/2 is considered.  The default is the two-sided case.
%
% The p-value of the test is returned in @var{pval}.
%
% If no output argument is given, the p-value of the test is displayed.
% @end deftypefn

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:
Generated on Fri 22-May-2009 15:13:00 by m2html © 2003