bartletts_test Subroutine

public subroutine bartletts_test(x, stat, p)

Computes Bartlett's test statistic and associated probability.

The statistic is calculated as follows.

Where and is the pooled variance.

The probability is calculated as the right-tail probability of the chi-squared distribution.

Bartlett's test is most relevant for distributions showing strong normality. For distributions lacking strong normality, consider Levene's test instead.

See Also

Arguments

Type IntentOptional Attributes Name
type(array_container), intent(in), dimension(:) :: x

The arrays of data to analyze.

real(kind=real64), intent(out) :: stat

The Bartlett's test statistic.

real(kind=real64), intent(out) :: p

The probability value that the variances of each data set are equivalent. A low p-value, less than some significance level, indicates a non-equivalance of variances.


Contents