MS Mod 10: Single-Factor ANOVA Levene’s test – practice problems


MS Mod 10: Single-Factor ANOVA Levene’s test – practice problems

Author
Message
NEAS
Supreme Being
Supreme Being (5.9K reputation)Supreme Being (5.9K reputation)Supreme Being (5.9K reputation)Supreme Being (5.9K reputation)Supreme Being (5.9K reputation)Supreme Being (5.9K reputation)Supreme Being (5.9K reputation)Supreme Being (5.9K reputation)Supreme Being (5.9K reputation)

Group: Administrators
Posts: 4.3K, Visits: 1.3K

MS Module 10: Single-Factor ANOVA Levene’s test – practice problems

(The attached PDF file has better formatting.)

Exercise 10.1: Levene’s test (equal variances)

A experiment has three groups and four observations in each group. The groups have subscripts i = 1,2,3 and the observations have subscripts j = 1,2,3,4 (following the notation in the textbook).

    1    2    3    4
group 1    11    12    13    14
group 2    5    6    10    15
group 3    7    8    21    26


The columns in this table do not affect the solution. The observations are shown in increasing order for each group, but they could be shown in any order.

The groups are normally distributed. We test whether their variances are the same.

The null hypothesis is that the variances of the groups are the same: H0: σ21 = σ22 = σ23

We use Levene’s method to test whether the null hypothesis should be rejected. Levene’s test has several versions (as explained below); we use the version in the textbook.

A.    What are the absolute deviations of the observations in each group?
B.    What is the sample variance in each group?
C.    What is the square of the sum of the absolute deviations?
D.    What is the sum of the squares of the absolute deviations?
E.    What is the total sum of squares (SST) for Levene’s test?
F.    What is the treatment sum of squares (SSTr) for Levene’s test?
G.    What is the error sum of squares (SSE) for Levene’s test?
H.    What is the degrees of freedom for the total sum of squares?
I.    What is the degrees of freedom for the groups (SSTr)?
J.    What is the degrees of freedom for the error sum of squares?
K.    What is the treatment mean squared?
L.    What is the mean squared error (MSE)?
M.    What is the F value for testing the null hypothesis?
N.    If the null hypothesis is true, what is the expected F value?
O.    What is the p value for this test of the null hypothesis?

Part A: We compute the deviations for each group, as the observation minus the group mean. The absolute deviations are the absolute values of the deviations.

We use separate means by group, not the deviations from the overall mean. To see the rationale, consider three groups: {1, 2, 3}, {4, 5, 6}, and {7, 8, 9}. The groups means are 2, 5, and 8, and the deviations from the group mean are {–1, 0, +1} for each group. The groups have different means but equal variances.

If we use the overall mean of 5, the apparent deviations by groups are {–4, –3, –2}, {–1, 0, +1}, {2, 3, 4}. The absolute values of the residuals by group appear to have means of 3, 0, and 3. This difference in the means stems from the different means of the groups, not from differences in the variances by group.


Observations    1    2    3    4    Total    Mean    Varianceee
Group 1    11    12    13    14    50    12.50    1.67
Group 2    5    6    10    15    36    9.00    20.67
Group 3    7    8    21    26    62    15.50    89.67
Total                    148        
Absolute Deviations                            
Group 1    1.50    0.50    0.50    1.50    4        
Group 2    4.00    3.00    1.00    6.00    14        
Group 3    8.50    7.50    5.50    10.50    32        
Total                    50        


Part B: The sample variance is the sum of the squares of the deviations divided by the number of observations minus one. These sample variances are

●    Group 1: ((11 – 12.5)2 + (12 – 12.5)2 + (13 – 12.5)2 + (14 – 12.5)2) / (4 – 1) = 1.6667
●    Group 2: ((5 – 9)2 + (6 – 9)^2 + (10 – 9)2 + (15 – 9)2) / (4 – 1) = 20.6667
●    Group 3: ((7 – 15.5)2 + (8 – 15.5)2 + (21 – 15.5)2 + (26 – 15.5)2) / (4 – 1) = 89.6667

Question: Do we use the variances by group in Levene’s test?

Answer: We examine the variances by group to judge whether Levene’s test is needed.

●    If the variances are similar, we do not reject the null hypothesis and do not bother with Levene’s test.
●    If the sample variances differ, we use Levene’s test for a quantitative measure.

The sample variances differ greatly by group, so Levene’s test shows a significant F value even with only four observations per group. The textbook suggests that Levene’s test works well only for ten or more observations per group.

If the sample variances differ less by group and might stem from random fluctuations even if the population variances are equal, Levene’s test is important.

Question: Does Levene’s test give an exact probability for getting the observed value (or a more extreme value) even if the null hypothesis is true?

Answer: The mathematics for p values and probabilities of observed values does not hold exactly for Levene’s test. The textbook does not prove Levene’s test; absolute deviations don’t even have normal distributions. Levene’s test has several versions, using (i) absolute deviations from the mean, (ii) absolute deviations from the median, (ii) squared deviations from the mean, (ii) squared deviations from the median. These versions all test the same thing, but the results are not identical, since they are not exact probabilities.

Part C: The sum of the absolute deviations is

    1.5 + 0.5 + 0.5 + 1.5 + 4 + 3 + 1 + 6 + 8.5 + 7.5 + 5.5 + 10.5 = 50.00

The square of this sum is 502 = 2,500

Question: You said that the absolute deviations and the squared deviations do not have normal distributions. Why not use the unadjusted deviations? If the group values have a normal distribution, the deviations also have a normal distribution, and they have the same variance as the group values.

Answer: The deviations in each group have a mean of zero. The mean deviation does not differ by group, even if the variances in the groups differ. Levene’s test converts the variance, which the ANOVA does not test, into a mean, which the ANOVA tests. For the groups in this practice problem:

●    Group 1 has the smallest variance and the middle mean.
●    Group 2 has the middle variance and the smallest mean.
●    Group 3 has the largest variance and the largest mean.

The absolute deviations convert the group variances into the means of absolute deviations.

●    Deviations 1 has the middle mean.
●    Deviations 2 has the smallest mean.
●    Deviations 3 has the largest mean.

The means of the absolute deviations are proxies for the variances of the groups.

Part D: The sum of the squares of the absolute deviations is

1.52 + 0.52 + 0.52 + 1.52 + 42 + 32 + 12 + 62 + 8.52 + 7.52 + 5.52 + 10.52 = 336.00

Part E: One can compute the total sum of squares two ways:

●    Using the definition of the total sum of squares: subtract the mean value from each absolute deviation and compute the sum of the squares of the differences (not shown here).

●    Using the computational formula: compute the sum of the squares of the absolute deviations and subtract the square of the sum of the absolute deviations divided by the number of observations:

    SST = i j xij2 – x..2 / N = 336 – 502 / 12 = 127.67

Part F: The treatment sums of squares = the sum of the squares of the group totals, or i xi.2

●    Group 1: 1.5 + 0.5 + 0.5 + 1.5 = 4
●    Group 2: 4 + 3 + 1 + 6 = 14
●    Group 3: 8.5 + 7.5 + 5.5 + 10.5 = 32

The sum of squares of these group totals is i xi2 = 42 + 142 + 322 = 1,236

The treatment sum of squares = SSTr = i xi.2 / J – x..2 / N = 1236 / 4 – 502 / 12 = 100.6667, where J is the number of observations in each group and N is the total number of observations.

Part G: We can compute the error sum of squares SSE two ways:

The computation formula (expanding the definition of the SSE and simplifying): SSE = i j xij2 – i xi.2 / J

=    the sum of squares of all the observations
–    the sum of squares of the group totals ÷ the number of observations in each group

= 336 – 1236 / 4 = 27.00

Alternatively, we derive SSE by subtraction.

SST = SSTr + SSE ➾ SSE = SST – SSTr = 127.6667 – 100.6667 = 27.00

Part H: The degrees of freedom for the total sum of squares = the number of observations – 1 = 12 – 1 = 11.

Part I: The degrees of freedom for the groups (SSTr) = the number of groups – 1 = 3 – 1 = 2.

Part J: The degrees of freedom for the error sum of squares = the number of groups × (the observations in each group – 1) = 3 × (4 – 1) = 9.

The degrees of freedom for SST = degrees of freedom for SSTr + degrees of freedom for SSE: 11 = 2 + 9.

Part K: The treatment mean squared = SSTr / df = 100.66667 / 2 = 50.3333

Part L: The mean squared error = SSE / df = 27 / 9 = 3.0000

The degrees of freedom (df) = 2 for the groups and 9 for the random error term.

Part M: The F value is 50.3333 / 3 = 16.7778.

Part N: If the null hypothesis H0: σ21 = σ22 = σ23 is true, the expected F value for Levene’s test is close to one. With only four observations in each group, the expected F value for Levene’s test may differ somewhat from one but should not be higher than about 1.30.

Part O: The p value depends on three items: the F value, the degrees of freedom in the numerator, and the degrees of freedom in the denominator.

The cumulative distribution function for f = 16.7778 with 2 degrees of freedom in the numerator and 9 degree of freedom in the denominator is 0.999. The p value is the complement of the cumulative distribution function (for a one-tailed F test) = 1 – 0.99908 = 0.0009. If the null hypothesis is true, the likelihood of getting an F test this high is 0.1%.

Question: Do the four versions of Levene’s test give the same p value?

Answer: The squared deviations are (on average) larger than the absolute deviations if the standard deviation is large (more than about one); otherwise the squared deviations are smaller than the absolute deviations. If the distribution is materially skewed, whether positively or negatively, the absolute deviations from the median are (on average) greater than those from the mean. These differences make the p values smaller for squared deviations (vs absolute deviations).

Attachments
GO
Merge Selected
Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...





Reading This Topic


Login
Existing Account
Email Address:


Password:


Social Logins

  • Login with twitter
  • Login with twitter
Select a Forum....











































































































































































































































Neas-Seminars

Search