Skip to content

vartest returns incorrect p-value for "right" tail #183

@vaclavkozeny

Description

@vaclavkozeny

Hi, I'm not a stats expert, but I believe there's a mistake in the implementation of the "right" tail case in vartest.

Current code:

elseif (strcmpi (tail, "right"))
    pval = chi2cdf (chisqstat, df);
    if (nargout > 2)
      ci = cat (dim, sumsq ./ chi2inv (1 - alpha, df), Inf (size (pval)));
    endif

The current implementation actually returns the same result as the "left" tail.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions