vartest
Chi-square test for a variance
📝Syntax
h = vartest(x, v)
h = vartest(x, v, 'Alpha', alpha)
h = vartest(x, v, 'Tail', tail)
h = vartest(x, v, 'Dim', dim)
[h, p, ci, stats] = vartest(...)
📥Input Arguments
Parameter Description
x real numeric array: sample data.
v nonnegative real scalar: hypothesized variance.
alpha scalar in (0,1), 0.05 by default: significance level.
tail 'both', 'right', or 'left'.
dim positive integer: dimension to operate along.
📤Output Arguments
Parameter Description
h logical array: test decision.
p array: p-values.
ci 2-row array: confidence intervals for the variance.
stats structure with chisqstat and df fields.
📄Description

vartest performs a chi-square variance test along the first non-singleton dimension unless Dim is specified.

NaN values are omitted from each tested slice.

💡Examples
x = [4.5 4.8 5.1 5.4 5.7 6.0];
[h, p, ci, stats] = vartest(x, 0.4);
[h2, p2] = vartest(x, 0.2, 'Tail', 'right');
🔗See Also
varstd
🕔Version History
Version Description
2.0.0 initial version
Edit this page on GitHub