Home > freetb4matlab > statistics > tests > z_test_2.m

z_test_2

PURPOSE ^

% For two samples @var{x} and @var{y} from normal distributions with

SYNOPSIS ^

function [pval, z] = z_test_2 (x, y, v_x, v_y, alt)

DESCRIPTION ^

% -*- texinfo -*-
% @deftypefn {Function File} {[@var{pval}, @var{z}] =} z_test_2 (@var{x}, @var{y}, @var{v_x}, @var{v_y}, @var{alt})
% For two samples @var{x} and @var{y} from normal distributions with
% unknown means and known variances @var{v_x} and @var{v_y}, perform a
% Z-test of the hypothesis of equal means.  Under the null, the test
% statistic @var{z} follows a standard normal distribution.
%
% 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
% @code{mean (@var{x}) ~= mean (@var{y})}.  If alt is @code{'>'}, the
% one-sided alternative @code{mean (@var{x}) > mean (@var{y})} is used.
% Similarly for @code{'<'}, the one-sided alternative @code{mean
% (@var{x}) < mean (@var{y})} is used.  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
% along with some information.
% @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