07.05.2015 Views

Download the documentation - True BASIC

Download the documentation - True BASIC

Download the documentation - True BASIC

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

T-tests and Confidence Intervals 47<br />

The test returns:<br />

t<br />

p<br />

mean<br />

se<br />

df<br />

<strong>the</strong> T-statistic<br />

significance probability of t<br />

mean value of data()<br />

standard error of <strong>the</strong> mean<br />

degrees of freedom<br />

Ttest2 (a(), b(), null, alt, t, p, mean, se, df)<br />

Two sample T-test with assumption of equal variance for a() and b(). You must supply<br />

<strong>the</strong> datasets in a() and b(), and <strong>the</strong> null and alternate tests in null and alt. The null<br />

hypo<strong>the</strong>sis is that <strong>the</strong> true mean difference of <strong>the</strong> populations equals whatever you<br />

passed in null.<br />

The alt parameter lets you construct one- or two-sided tests: a negative number means <strong>the</strong><br />

alternative is that <strong>the</strong> true mean is less than null; 0 means that it’s not equal; and positive<br />

means that it’s greater. Thus <strong>the</strong> test is two-sided if alt = 0; o<strong>the</strong>rwise it’s one-sided.<br />

Example: Ttest2 with null = 17 and alt = –1 gives a one-sided T-test. The null hypo<strong>the</strong>sis<br />

is that <strong>the</strong> difference of population means is 17. The alternative hypo<strong>the</strong>sis is that<br />

<strong>the</strong> mean is less than 17.<br />

The test returns:<br />

t<br />

p<br />

mean<br />

se<br />

df<br />

<strong>the</strong> T-statistic<br />

significance probability of t<br />

mean of a() minus mean of b()<br />

standard error<br />

degrees of freedom<br />

Use Ftest, described at <strong>the</strong> end of this section, to check that two normally-distributed<br />

datasets come from populations with equal variances. If your datasets don’t have equal<br />

variances, use Ttest2Var instead of Ttest2.<br />

Ttest2Var (a(), b(), null, alt, t, p, mean, se, df)<br />

Ttest2Var gives a two sample T-test without an assumption of equal variance for a()<br />

and b(). You must supply <strong>the</strong> datasets in a() and b(), and <strong>the</strong> null and alternate tests in<br />

null and alt. The null hypo<strong>the</strong>sis: <strong>the</strong> true mean difference of <strong>the</strong> populations equals<br />

whatever you passed in null.<br />

The alt parameter lets you construct one- or two-sided tests: a negative number means<br />

<strong>the</strong> alternative is that <strong>the</strong> true mean is less than null; 0 means that it’s not equal; and<br />

positive means that it’s greater. Thus <strong>the</strong> test is two-sided if alt = 0; o<strong>the</strong>rwise it’s one-<br />

01/01

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!