File Exchange

image thumbnail


version 1.0 (2.92 KB) by

Levene's test for homogeneity of variances.

6 Ratings



View License

Levene's F test is used to test the null hypothesis that multiple population variances corresponding to multiplesamples are equal. Prior to the analysis the data are transforming to the absolute deviation of the mean. Then perform an one-way analysis of variance.

Comments and Ratings (6)



Beate (view profile)

Great function. Thank you!

I changed the first line from
function[Levenetest] = Levenetest(X,alpha)
function[F, df1, df2, P] = Levenetest(X,alpha)

and suppressed all displays and prints (lines 87, 107:114, 144:153)

such that I can run multiple levene tests and save the results of each.


John (view profile)

Checked out with another Excel Levene test I found online. Thanks!


Farah (view profile)

works easily and well. Thanks!

Marie Loukou

After the following indications kindly provided by the author,
1. Levenetest(X) %here it takes the default alpha value = 0.05

2. Levenetest(X,0.1) %here you should give an alpha value

alpha = 0.1;
3. Levenetest(X,alpha) %here previously you should define the alpha value

The test is a succes! Thanks a lot.

Marie Loukou

Good test, thanks.
But for the last lines ("if P >= alpha..."), the following message appeared: "??? Error using ==> alpha
Too many output arguments".


It was added an appropriate format to cite this file.

At the end of the third phrase of the description text a word of more should be eliminated (absolute).

MATLAB Release
MATLAB 5.3 (R11)

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video