Scilab Home page | Wiki | Bug tracker | Forge | Mailing list archives | ATOMS | File exchange
Please login or create an account
Change language to: English - Français - Português - 日本語 -
Справка Scilab >> Statistics > Data with Missing Values > nand2mean

nand2mean

difference of the means of two independent samples

Syntax

[dif]=nand2mean(sample1,sample2)
[dif]=nand2mean(sample1,sample2,conf)

Arguments

sample1

real or complex vector or matrix

sample2

real or complex vector or matrix

conf

real scalar between 0 and 1

Description

This function computes an estimate (dif(1)) for the difference of the means of two independent samples (arrays sample1 and sample2) and gives the half amplitude of the range of variability of dif with an indicated confidence level (dif(2)). The choice of the normal or t functions as the probability function depends on the sizes of sample1 and sample2 (cdfnor is chosen if the samples totalize 103 values or more, else cdft is used). We suppose that the underlying variances of both populations are equal. NAN values are not counted.

In Labostat, NAN values stand for missing values in tables.

In absence of the confidence parameter a confidence level of 95% is assumed.

Examples

sample1 = 0:10;
sample2 = [90:100 %nan];

nand2mean(sample2, sample1)
// Returns mean(sample2)-mean(sample1) = 95-5 = 90, and since there are only 22 values (NaN excluded), cdft is used to return 2.9499978.
// The %nan is ignored.

References

Wonacott, T.H. & Wonacott, R.J.; Introductory Statistics, 5th edition, J.Wiley & Sons, 1990.

Scilab Enterprises
Copyright (c) 2011-2017 (Scilab Enterprises)
Copyright (c) 1989-2012 (INRIA)
Copyright (c) 1989-2007 (ENPC)
with contributors
Last updated:
Tue Feb 14 15:13:25 CET 2017