test-t

版本 2.0.0.0 (14.6 KB) 作者: Giuseppe Cardillo
Calculate the Student t Test for unequal or equal samples size, unpaired or paired samples.
9.5K 次下载
更新时间 2018/3/31

Student's t test for unpaired or paired samples.
This file is applicable for equal or unequal sample sizes; for paired or
unpaired samples. When the test is unpaired, the Fisher-Snedecor F-test is
performed to assess the equality of variance. If variances are not equal,
Satterthwaite's approximate t test is performed.
Syntax: TESTT(X1,X2,TST,ALPHA,TAIL)

Inputs:
X1 and X2 - data vectors (mandatory).
TST - unpaired (0) or paired (1) test (default = 0).
ALPHA - significance level (default = 0.05).
TAIL - 1-tailed test (1) or 2-tailed test (2). (default = 1).
Outputs:
- t value.
- degrees of freedom.
- Confidence interval of means difference (for paired test)
- p-value
- Power
Example:
X1=[77 79 79 80 80 81 81 81 81 82 82 82 82 83 83 84 84 84 84 85 ...
85 86 86 87 87];

X2=[82 82 83 84 84 85 85 86 86 86 86 86 86 86 86 86 87 87 87 88 ...
88 88 89 90 90];

Calling on Matlab the function: testt

Answer is:

FISHER-SNEDECOR F-TEST FOR EQUALITY OF VARIANCES

F DF_numerator DF_denominator p_value
______ ____________ ______________ _______

1.5379 24 24 0.29861

--------------------------------------------------------------------------------
Variances are equal
--------------------------------------------------------------------------------

STUDENT'S T-TEST FOR UNPAIRED SAMPLES

t DF tail p_value Power
______ __ ____ _________ _______

5.2411 48 1 1.765e-06 0.99958

STATS=TESTT(...) returns a structure with all test(s) statistics

Created by Giuseppe Cardillo
giuseppe.cardillo-edta@poste.it

To cite this file, this would be an appropriate format:
Cardillo G. (2006). Student t-Test for unpaired or paired samples.
http://www.mathworks.com/matlabcentral/fileexchange/12699

引用格式

Giuseppe Cardillo (2024). test-t (https://github.com/dnafinder/testt), GitHub. 检索来源 .

MATLAB 版本兼容性
创建方式 R2014b
兼容任何版本
平台兼容性
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

无法下载基于 GitHub 默认分支的版本

版本 已发布 发行说明
2.0.0.0

help correction
input parser and table command implementation. Github link
.

1.6.0.0

To compute power, Testt requires powerStudent by Trujillo-Ortiz, A. and R. Hernandez-Walls. If this function is not present on the computer, Sandler try to download it from FEX

1.5.0.0

Changes in description

1.4.0.0

STATS structure creation

1.3.0.0

Mistake correction in error handling routines

1.2.0.0

Fisher-Snedecor F-test check added; Satterthwaite's approximation added; changes in output format

1.1.0.0

Change in Help section

1.0.0.0

Improvement in input error handling

要查看或报告此来自 GitHub 的附加功能中的问题,请访问其 GitHub 仓库
要查看或报告此来自 GitHub 的附加功能中的问题,请访问其 GitHub 仓库