Home > freetb4matlab > statistics > tests > u_test.m

u_test

PURPOSE ^

% For two samples @var{x} and @var{y}, perform a Mann-Whitney U-test of

SYNOPSIS ^

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

DESCRIPTION ^

% -*- texinfo -*-
% @deftypefn {Function File} {[@var{pval}, @var{z}] =} u_test (@var{x}, @var{y}, @var{alt})
% For two samples @var{x} and @var{y}, perform a Mann-Whitney U-test of
% the null hypothesis PROB (@var{x} > @var{y}) == 1/2 == PROB (@var{x}
% < @var{y}).  Under the null, the test statistic @var{z} approximately
% follows a standard normal distribution.  Note that this test is
% equivalent to the Wilcoxon rank-sum test.
%
% 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 @var{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