# Applying The Anova Test Education Essay

Published:

This essay has been submitted by a student. This is not an example of the work written by our professional essay writers.

## Chapter 6

## ANOVA

When you want to compare means of more than two groups or levels of an independent variable, one way ANOVA can be used. Anova is used for finding significant relations. Anova is used to find significant relation between various variables. The procedure of ANOVA involves the derivation of two different estimates of population variance from the data. Then statistic is calculated from the ratio of these two estimates. One of these estimates (between group variance) is the measure of the effect of independent variable combined with error variance. The other estimate (within group variance) is of error variance itself. The F-ratio is the ratio of between groups and within groups variance. In case, the null hypothesis is rejected, i.e., when significant different lies, post adhoc analysis or other tests need to be performed to see the results.

The Anova test is a parametric test which assumes:

Population normality - data is numerical data representing samples from normally distributed populations

Homogeneity of variance - the variances of the groups are "similar"

the sizes of the groups are "similar"

the groups should be independent

ANOVA tests the null hypothesis that the means of all the groups being compared are equal, and produces a statistic called F. If the means of all the groups tested by ANOVA are equal, fine. But if the result tells us to reject the null hypothesis, we perform Brown-Forsythe and Welch test options in SPSS.

Assumption of Anova: Homogeneity of Variance. As such homogeneity of variance tests are performed. If this assumption is broken then Brown-Forsythe test option and Welch test option display alternate versions of F-statistic.

Homogeneity of Variance: If significance value is less than 0.05, variances of groups are significantly different.

Brown-Forsythe and Welch test option: If significance value is less than 0.05, reject null hypothesis.

Anova: If significance value is less than 0.05, reject null hypothesis.

Post Hoc analysis involves hunting through data for some significance. This testing carries risks of type I errors. Post hoc tests are designed to protect against type I errors, given that all the possible comparisons are going to be made. These tests are stricter than planned comparisons and it is difficult to obtain significance. There are many post hoc tests. More the options, stricter will be the determination of significance. Some post hoc tests are:

Scheffe test- allows every possible comparison to be made but is tough on rejecting the null hypothesis.

Tukey test / honestly significant difference (HSD) test- lenient but the types of comparison that can be made are restricted. This chapter will show Tukey test also.

## One way ANOVA

## Working Example 1 : One-way between groups ANOVA with post-hoc comparisons

Vijender Gupta wants to compare the scores of CBSE students from four metro cities of India i.e. Delhi, Kolkata, Mumbai, Chennai. He obtained 20 participant scores based on random sampling from each of the four metro cities, collecting 100 responses. Also note that, this is independent design, since the respondents are from different cities. He made following hypothesis:

Null Hypothesis : There is no significant difference in scores from different metro cities of India

Alternate Hypothesis : There is significant difference in scores from different metro cities of India

Make the variable view of data table as shown in the figure below.

Enter the values of city as 1-Delhi, 2-Kolkata, 3-Mumbai, 4-Chennai.

Fill the data view with following data.

City Score

1 400.00

1 450.00

1 499.00

1 480.00

1 495.00

1 300.00

1 350.00

1 356.00

1 269.00

1 298.00

1 299.00

1 599.00

1 466.00

1 591.00

1 502.00

1 598.00

1 548.00

1 459.00

1 489.00

1 499.00

2 389.00

2 398.00

2 399.00

2 599.00

2 598.00

2 457.00

2 498.00

2 400.00

2 300.00

2 369.00

2 368.00

2 348.00

2 499.00

2 475.00

2 489.00

2 498.00

2 399.00

2 398.00

2 378.00

2 498.00

3 488.00

3 469.00

3 425.00

3 450.00

3 399.00

3 385.00

3 358.00

3 299.00

3 298.00

3 389.00

3 398.00

3 349.00

3 358.00

3 498.00

3 452.00

3 411.00

3 398.00

3 379.00

3 295.00

3 250.00

4 450.00

4 400.00

4 450.00

4 428.00

4 398.00

4 359.00

4 360.00

4 302.00

4 310.00

4 295.00

4 259.00

4 301.00

4 322.00

4 365.00

4 389.00

4 378.00

4 345.00

4 498.00

4 489.00

4 456.00

Click on Analyze menuïƒ Compare Meansïƒ One-Way ANOVAâ€¦.One-Way ANOVA dialogue box will be opened.

Select Student Score(dependent variable) in Dependent List box and City(independent variable) in the Factor as shown in the figure below.

Click Contrastsâ€¦ push button. Contrasts sub dialogue box will be opened. See that all the settings remain as shown in the figure below. Click Continue to close this sub dialogue box and come back to One-Way ANOVA dialogue box.

Click Post Hocâ€¦ push button. Post Hoc sub dialogue box will be opened. See that all the settings remain as shown in the figure below. Click Tukey test and Click Continue to close this sub dialogue box and come back to One-Way ANOVA dialogue box. Also note that significant level in this sub dialogue box is 0.05, which can be changed according to the need.

Click Optionsâ€¦ push button. Options sub dialogue box will be opened. Select the Descriptive and Homogenity of variance test check box and see that all the settings remain as shown in the figure below. Click Continue to close this sub dialogue box and come back to One-Way ANOVA dialogue box. Click OK to see the output viewer.

## The Output:

ONEWAY Score BY City

/STATISTICS DESCRIPTIVES HOMOGENEITY

/MISSING ANALYSIS

/POSTHOC=TUKEY ALPHA(0.05).

## Descriptives

Student Score

N

Mean

Std. Deviation

Std. Error

95% Confidence Interval for Mean

Minimum

Maximum

Lower Bound

Upper Bound

Delhi

20

447.3500

104.69016

23.40943

398.3535

496.3465

269.00

599.00

Kolkata

20

437.8500

79.75771

17.83437

400.5222

475.1778

300.00

599.00

Mumbai

20

387.4000

67.25396

15.03844

355.9242

418.8758

250.00

498.00

Chennai

20

377.7000

68.49287

15.31547

345.6443

409.7557

259.00

498.00

Total

80

412.5750

85.54676

9.56442

393.5375

431.6125

250.00

599.00

## Test of Homogeneity of Variances

Student Score

Levene Statistic

df1

df2

Sig.

2.371

3

76

.077

Since, homogeneity of variance should not be there for conducting Anova tests, which is one of the assumptions of Anova, we see that Levene's test shows that homogeneity of variance is not significant (p>0.05). As such, you can be confident that population variances for each group are approximately equal. We can see the Anova results ahead.

## ANOVA

Student Score

Sum of Squares

df

Mean Square

F

Sig.

Between Groups

73963.450

3

24654.483

3.716

.015

Within Groups

504178.100

76

6633.922

Total

578141.550

79

Table above shows the F test values along with degrees of freedom (2,76) and significance of 0.15. Given that p<.05, you can reject the null hypothesis and accept the alternate hypothesis that there is significant difference in scores from different metro cities of India, F(3,76)=3.716, p<.05.

## Multiple Comparisons

Student Score

Tukey HSD

(I) Metro City

(J) Metro City

Mean Difference (I-J)

Std. Error

Sig.

95% Confidence Interval

Lower Bound

Upper Bound

Delhi

Kolkata

9.50000

25.75640

.983

-58.1568

77.1568

Mumbai

59.95000

25.75640

.101

-7.7068

127.6068

Chennai

69.65000*

25.75640

.041

1.9932

137.3068

Kolkata

Delhi

-9.50000

25.75640

.983

-77.1568

58.1568

Mumbai

50.45000

25.75640

.213

-17.2068

118.1068

Chennai

60.15000

25.75640

.099

-7.5068

127.8068

Mumbai

Delhi

-59.95000

25.75640

.101

-127.6068

7.7068

Kolkata

-50.45000

25.75640

.213

-118.1068

17.2068

Chennai

9.70000

25.75640

.982

-57.9568

77.3568

Chennai

Delhi

-69.65000*

25.75640

.041

-137.3068

-1.9932

Kolkata

-60.15000

25.75640

.099

-127.8068

7.5068

Mumbai

-9.70000

25.75640

.982

-77.3568

57.9568

*. The mean difference is significant at the 0.05 level.

Using Tukey HSD further, we can conclude that Delhi and Chennai have significant difference in their scores. This can be concluded from figure above and figure below.

## Student Score

Tukey HSDa

Metro City

N

Subset for alpha = 0.05

1

2

Chennai

20

377.7000

Mumbai

20

387.4000

387.4000

Kolkata

20

437.8500

437.8500

Delhi

20

447.3500

Sig.

.099

.101

Means for groups in homogeneous subsets are displayed.

a. Uses Harmonic Mean Sample Size = 20.000.

## Working Example 2 : One-way between groups ANOVA with Brown-Forsythe and Weltch tests

Aditya wants to see that there exists a significant difference between collecting information (internet use) and internet benefits. He collects data from 29 respondents and finds the solution through one way Anova.

Note: The respondent's count in the working example is kept small for showing all the 29 responses in data view window in figure ahead.

Null Hypothesis : There is no significant difference in collecting information and internet benefits.

Alternate Hypothesis : There is significant difference in collecting information and internet benefits.

## Internet Use

Collecting Information(Info) [see figure below]

## Internet Benefits

Availability of updated information(Use1)

Easy movement across websites(Use2)

Prompt online ordering(Use3)

Prompt query handling(Use4)

Get lowest price for product/service purchase(Compar1)

Easy comparison of product/service from several vendors(Compar2)

Easy comparison of price from several vendors(Compar3)

Able to obtain competitive and educational information regarding product/ service(Compar4)

Reduced order processing time(RedPTM1)

Reduced paper flow(RedPTM2)

Reduced ordering costs(RedPTM3)

Info (Collecting Information) : 1(Never), 2(Occasionally), 3(Considerably), 4(Almost Always), 5(Always)

Internet Benefits : 1(Not important), 2(Less important), 3(Important), 4(Very Important), 5(Extremely Important)

Enter the variable view of variables as shown in the figure below.

Enter the data in the data view as shown in the figure below.

Click Analyzeïƒ Compare Meansïƒ One-Way ANOVAâ€¦. The One-Way ANOVA dialogue box will be opened.

Insert all the internet benefits variables in dependent list and internet use variable in the factor as shown in the figure below.

Click Post Hocâ€¦ push button to open its sub dialogue box. See that significance level is set as per need. In this case, we have used 0.05 significance level. Click Continue to close the sub dialogue box.

Click Optionsâ€¦ push button in the One-Way ANOVA dialogue box. Select the Descriptive, Homogeneity of variance test, Brown-Forsythe and Welch check boxes and click continue to close this sub dialogue box. Click OK to see the output viewer.

## The OUTPUT

ONEWAY Use1 Use2 Use3 Use4 Compar1 Compar2 Compar3 Compar4 RedPTM1 RedPTM2 RedPTM3 BY InfoG2

/STATISTICS HOMOGENEITY BROWNFORSYTHE WELCH

/MISSING ANALYSIS.

## Test of Homogeneity of Variances

Levene Statistic

df1

df2

Sig.

Availability of Updated information

1.117

3

25

.361

Easy Movement across around websites

.475

3

25

.703

Prompt online ordering

.914

3

25

.448

Prompt Query handling

2.379

3

25

.094

Get lowest price for product / service purchase

1.327

3

25

.288

Easy comparison of product / service from several vendors

.755

3

25

.530

Easy comparison of price from several vendors

## 3.677

3

25

## .025

Able to obtain competitive and educational information regarding product / service

1.939

3

25

.149

Reduced order processing time

.326

3

25

.806

Reduced Paper Flow

1.478

3

25

.245

Reduced Ordering Costs

2.976

3

25

.051

Table above shows that Easy comparison of price from several vendors has significantly different variances according to levene statistic and showing significant level of only 0.025 (which is below 0.05 for 5% level of significance) as such anova result may not be valid for this variable. Therefore, Brown-Forsythe and Welch tests are performed for analyzing this particular variable.

## ANOVA

Sum of Squares

df

Mean Square

F

Sig.

Availability of Updated information

Between Groups

.702

3

.234

1.775

.178

Within Groups

3.298

25

.132

Total

4.000

28

Easy Movement across around websites

Between Groups

2.630

3

.877

1.817

.170

Within Groups

12.060

25

.482

Total

14.690

28

Prompt online ordering

Between Groups

1.785

3

.595

2.154

.119

Within Groups

6.905

25

.276

Total

8.690

28

Prompt Query handling

Between Groups

1.742

3

.581

2.132

.121

Within Groups

6.810

25

.272

Total

8.552

28

Get lowest price for product / service purchase

Between Groups

.059

3

.020

.074

.974

Within Groups

6.631

25

.265

Total

6.690

28

Easy comparison of product / service from several vendors

Between Groups

.604

3

.201

.617

.610

Within Groups

8.155

25

.326

Total

8.759

28

Easy comparison of price from several vendors

Between Groups

6.630

3

2.210

4.582

.011

Within Groups

12.060

25

.482

Total

18.690

28

Able to obtain competitive and educational information regarding product / service

Between Groups

1.302

3

.434

2.212

.112

Within Groups

4.905

25

.196

Total

6.207

28

Reduced order processing time

Between Groups

.273

3

.091

.259

.854

Within Groups

8.762

25

.350

Total

9.034

28

Reduced Paper Flow

Between Groups

.140

3

.047

.110

.954

Within Groups

10.619

25

.425

Total

10.759

28

Reduced Ordering Costs

Between Groups

.647

3

.216

.453

.718

Within Groups

11.905

25

.476

Total

12.552

28

Table above shows the F test values along with significance in case of collecting information (Internet use). Comparing the F test values and significance values, we see that all the anova comparisons favour the acceptance of null hypothesis. Please note that significance values are greater than 0.05 in all the variables except easy comparison of price from several vendors, according to homogeneity rule, this variable will not be judged by Anova F statistic. For this variable, we have performed Welch and Brown-Forsythe tests.

## Robust Tests of Equality of Meansb,c,d

Statistica

df1

df2

Sig.

Availability of Updated information

Welch

1.123

3

7.172

.401

Brown-Forsythe

1.244

3

6.530

.368

Easy Movement across around websites

Welch

1.659

3

8.402

.249

Brown-Forsythe

2.051

3

17.509

.144

Prompt online ordering

Welch

1.633

3

7.896

.258

Brown-Forsythe

2.178

3

11.593

.145

Prompt Query handling

Welch

## .

## .

## .

## .

Brown-Forsythe

## .

## .

## .

## .

Get lowest price for product / service purchase

Welch

## .

## .

## .

## .

Brown-Forsythe

## .

## .

## .

## .

## Easy comparison of product / service from several vendors

## Welch

## .560

## 3

## 8.014

## .656

## Brown-Forsythe

## .682

## 3

## 12.935

## .579

Easy comparison of price from several vendors

Welch

## .

## .

## .

## .

Brown-Forsythe

## .

## .

## .

## .

Able to obtain competitive and educational information regarding product / service

Welch

1.472

3

7.457

.298

Brown-Forsythe

1.827

3

9.211

.211

Reduced order processing time

Welch

.219

3

8.155

.881

Brown-Forsythe

.278

3

14.596

.840

Reduced Paper Flow

Welch

.119

3

8.021

.946

Brown-Forsythe

.122

3

15.144

.946

Reduced Ordering Costs

Welch

.735

3

8.066

.560

Brown-Forsythe

.525

3

16.006

.671

a. Asymptotically F distributed.

b. Robust tests of equality of means cannot be performed for Prompt Query handling because at least one group has 0 variance.

c. Robust tests of equality of means cannot be performed for Get lowest price for product / service purchase because at least one group has 0 variance.

d. Robust tests of equality of means cannot be performed for Easy comparision of price from several vendors because at least one group has 0 variance.

Table above shows the Welch and Brown-Forsythe tests performed on the internet benefits and particularly help in analyzing easy comparison of product / service from several vendors. The significance values are much higher then required 0.05. The Statistics and significance values indicate the acceptance of null hypothesis.

## The analysis and conclusion from output:

## Â

Homogeneity of Variance test

Anova test

Brown-Forsythe test

Welch test

Accept Null Hypothesis

Use1

## ïƒ¼

## ïƒ¼

## ïƒ¼

Use2

## ïƒ¼

## ïƒ¼

## Â

## Â

## ïƒ¼

Use3

## ïƒ¼

## ïƒ¼

## ïƒ¼

Use4

## ïƒ¼

## ïƒ¼

## ïƒ¼

Compar1

## ïƒ¼

## ïƒ¼

## Â

## Â

## ïƒ¼

Compar2

x

x

## ïƒ¼

## ïƒ¼

## ïƒ¼

Compar3

## ïƒ¼

## ïƒ¼

## Â

## Â

## ïƒ¼

Compar4

## ïƒ¼

## ïƒ¼

## ïƒ¼

RedPTM1

## ïƒ¼

## ïƒ¼

## Â

## Â

## ïƒ¼

RedPTM2

## ïƒ¼

## ïƒ¼

## Â

## Â

## ïƒ¼

RedPTM3

## ïƒ¼

## ïƒ¼

## Â

## Â

## ïƒ¼

All the results verify the Null Hypothesis acceptance. Hence, we accept null hypothesis, i.e., There is no significant difference in collecting information and internet benefits.

## Working Example 3 : One-way between groups ANOVA with planned comparisons

Ritu Gupta wants to know the sales in four different metro cities of India in Diwali season. She assumes the sales contrast of 2:1:-1:-2 for Delhi:Kolkata:Mumbai:Chennai, respectively. She collects sales data from 10 respondents each from the four metro cities, collecting a total of 40 sales data.

Open new data file and make variables as shown in the figure below. The values column in the city row consists of following values:

1 - Delhi

2 - Kolkata

3 - Mumbai

4 - Chennai

Enter the sales data of 40 respondents as shown below:

City Sales (Rs. Lacs)

1 500.00

1 498.00

1 478.00

1 499.00

1 450.00

1 428.00

1 500.00

1 498.00

1 486.00

1 469.00

2 500.00

2 428.00

2 439.00

2 389.00

2 379.00

2 498.00

2 469.00

2 428.00

2 412.00

2 410.00

3 421.00

3 410.00

3 389.00

3 359.00

3 369.00

3 359.00

3 349.00

3 349.00

3 359.00

3 400.00

4 289.00

4 269.00

4 259.00

4 299.00

4 389.00

4 349.00

4 350.00

4 301.00

4 297.00

4 279.00

Click Analyzeïƒ Compare Meansïƒ One-Way ANOVAâ€¦. This will open One-Way ANOVA dialogue box.

Shift the Sales variable to Dependent List and City variable to Factor column.

Click Contrastsâ€¦ push button to open its sub dialogue box. Enter the coefficients as shown in the figure below. Notice that the coefficient total should be zero. Click continue to close the sub dialogue box and come back to previous dialogue box.

Click Post Hocâ€¦ push button to check the significance level in the Post Hoc sub dialogue box. In this case it is 0.05. Click continue to close this sub dialogue box.

Click Optionsâ€¦ push button to open its sub dialogue box. Select descriptive and homogeneity of variance test and click continue to close this sub dialogue box. This will open previous dialogue box. Click OK to see the output viewer.

## The Output:

ONEWAY Sales BY City

/CONTRAST=2 1 -1 -2

/STATISTICS DESCRIPTIVES HOMOGENEITY

/MISSING ANALYSIS.

## Descriptives

Sales (Rs.Lacs)

N

Mean

Std. Deviation

Std. Error

95% Confidence Interval for Mean

Minimum

Maximum

Lower Bound

Upper Bound

Delhi

10

480.6000

24.87837

7.86723

462.8031

498.3969

428.00

500.00

Kolkata

10

435.2000

41.99153

13.27889

405.1611

465.2389

379.00

500.00

Mumbai

10

376.4000

26.45415

8.36554

357.4758

395.3242

349.00

421.00

Chennai

10

308.1000

41.33992

13.07283

278.5272

337.6728

259.00

389.00

Total

40

400.0750

73.46703

11.61616

376.5791

423.5709

259.00

500.00

## Test of Homogeneity of Variances

Sales (Rs.Lacs)

Levene Statistic

df1

df2

Sig.

1.377

3

36

.265

The Levene test statistic shows that p>.05. As such, assumption of ANOVA for homogeneity of variance has not been violated.

## ANOVA

Sales (Rs.Lacs)

Sum of Squares

df

Mean Square

F

Sig.

Between Groups

167379.475

3

55793.158

46.581

.000

Within Groups

43119.300

36

1197.758

Total

210498.775

39

The Anova F-ratio and significance values suggests that season does significantly influence the sales in the cities, F(3,36) = 46.581, p<.05.

The contrast coefficients, as assumed are shown in the table below.

## Contrast Coefficients

Contrast

Metro City

Delhi

Kolkata

Mumbai

Chennai

1

2

1

-1

-2

## Contrast Tests

Contrast

Value of Contrast

Std. Error

t

df

Sig. (2-tailed)

Sales (Rs.Lacs)

Assume equal variances

1

403.8000

34.60865

11.668

36

.000

Does not assume equal variances

1

403.8000

34.31443

11.768

22.101

.000

Since, the assumptions of homogeneity of variance were not violated, you can discuss with assume equal variances row of upper table. The t value of 36 is highly significant (p<.05).

The descriptive table shows that during Diwali season, Delhi has maximum sales and Chennai has least sales according to the respondents. To obtain F value, the above T value will be squared, i.e. F=T2 = 11.668*11.668=136.142224. Also note that, df1 for planned comparison is always 1, i.e. df1=1 and df2 will be shown in the within groups estimate of ANOVA table above, i.e., df2=36. As such we can write the result as F(1,36)=136.142224, p<.05.

## Two way ANOVA

Two way ANOVA is similar to one way ANOVA in all the aspects except that in this case additional independent variable is introduced. Each independent variable includes two or more variants.

## Working Example 4 : Two way between groups ANOVA

Neha gupta wants to research that whether sales (dependent) of the respondents depend on their place(independent) and education (independent). She assigns 9 respondents from each metro city. Each respondent can select three education levels.

Place: 1(Delhi), 2(Kolkata), 3(Chennai)

Education: 1(Under graduate), 2(Graduate), 3(Post Graduate)

A total of 3x3x9 = 81 responses were collected.

She wants to know whether :

The location influences sales?

The education influences the sales?

The influence of education on sales depends on location of respondent?

Make the data file by creating variables as shown in the figure below.

Enter the data in the data view as shown in the figure below.

Click Analyzeïƒ General Linear Modelïƒ Univariateâ€¦. This will open Univariate dialogue box.

Choose sales and send it in dependent variable box. Similarly, choose place and education to send them in fixed factor(s) list box.

Click Options push button to open its sub dialogue box.

Click Descriptive Statistics, Estimates of effect size, Observed power and Homogeneity tests check boxes in the Display box and click continue. Previous dialogue box will open. Click OK to see the output.

## The Output :

UNIANOVA Sales BY Place Education

/METHOD=SSTYPE(3)

/INTERCEPT=INCLUDE

/PRINT=ETASQ HOMOGENEITY DESCRIPTIVE OPOWER

/CRITERIA=ALPHA(.05)

/DESIGN=Place Education Place*Education.

## Between-Subjects Factors

Value Label

N

Place

1

Delhi

9

2

Kolkata

9

3

Chennai

9

Education

1

Under Graduate

8

2

Graduate

12

3

Post Graduate

7

## Descriptive Statistics

Dependent Variable:Sales

Place

Education

Mean

Std. Deviation

N

Delhi

Under Graduate

27.50

10.607

2

Graduate

37.60

7.829

5

Post Graduate

60.00

7.071

2

Total

40.33

13.910

9

Kolkata

Under Graduate

18.33

2.887

3

Graduate

36.33

11.846

3

Post Graduate

51.67

7.638

3

Total

35.44

16.141

9

Chennai

Under Graduate

16.67

7.638

3

Graduate

25.25

20.172

4

Post Graduate

45.00

21.213

2

Total

26.78

18.600

9

Total

Under Graduate

20.00

7.559

8

Graduate

33.17

13.901

12

Post Graduate

52.14

11.852

7

Total

34.19

16.696

27

## Levene's Test of Equality of Error Variancesa

Dependent Variable:Sales

F

df1

df2

Sig.

2.152

8

18

.084

Tests the null hypothesis that the error variance of the dependent variable is equal across groups.

a. Design: Intercept + Place + Education + Place * Education

The Levene's test shows that homogeneity of variance assumption has not been violated, since p>.05, i.e. main effects of place and education are not significant. Therefore, neither place nor education influences the sales by respondents.

## Tests of Between-Subjects Effects

Dependent Variable:Sales

Source

Type III Sum of Squares

df

Mean Square

F

Sig.

Partial Eta Squared

Noncent. Parameter

Observed Powerb

Corrected Model

4638.957a

8

579.870

4.000

.007

.640

32.004

.935

Intercept

30867.022

1

30867.022

212.948

.000

.922

212.948

1.000

Place

639.603

2

319.802

2.206

.139

.197

4.413

.391

Education

3584.455

2

1792.228

12.364

.000

.579

24.729

.988

Place * Education

92.752

4

23.188

.160

.956

.034

.640

.076

Error

2609.117

18

144.951

Total

38801.000

27

Corrected Total

7248.074

26

a. R Squared = .640 (Adjusted R Squared = .480)

b. Computed using alpha = .05

The above table shows that, education level shows significant effect on sales with p<.05, i.e. F(2,18)=12.364, p<.05. As such post-hoc analysis is required, this will be discussed ahead. The output also shows that neither place nor place & education combined have significant interaction effect on sales with both having p>.05. We can also say that, place does not influence sales, F(2,18)=2.206, p>.05. Also, place and education both does not collectively influence sales, F(3,18)=23.188, p>.05.

## For Post-Hoc analysis:

Click Analyzeïƒ General Linear Modelïƒ Univariateâ€¦. This will open Univariate dialogue box.

Click Post-Hoc push button for opening Post-Hoc sub dialogue box. Select Education and send it in Post Hoc Tests for list box. Click Tukey check box and click continue. Click OK to see the output.

## Multiple Comparisons

Sales

Tukey HSD

(I) Education

(J) Education

Mean Difference (I-J)

Std. Error

Sig.

95% Confidence Interval

Lower Bound

Upper Bound

Under Graduate

Graduate

-13.17

5.495

.068

-27.19

.86

Post Graduate

-32.14*

6.231

.000

-48.05

-16.24

Graduate

Under Graduate

13.17

5.495

.068

-.86

27.19

Post Graduate

-18.98*

5.726

.010

-33.59

-4.36

Post Graduate

Under Graduate

32.14*

6.231

.000

16.24

48.05

Graduate

18.98*

5.726

.010

4.36

33.59

Based on observed means.

The error term is Mean Square(Error) = 144.951.

*. The mean difference is significant at the .05 level.

The analysis shows that Post Graduate sales differ significantly with under graduate and graduate sales, i.e. Post Graduate and other two education levels have significant difference in sales. You can see the same results in the table below also.

## Sales

Tukey HSDa,,b,,c

Education

N

Subset

1

2

Under Graduate

8

20.00

Graduate

12

33.17

Post Graduate

7

52.14

Sig.

.088

1.000

Means for groups in homogeneous subsets are displayed.

Based on observed means.

The error term is Mean Square(Error) = 144.951.

a. Uses Harmonic Mean Sample Size = 8.542.

b. The group sizes are unequal. The harmonic mean of the group sizes is used. Type I error levels are not guaranteed.

c. Alpha = .05.

With significant interaction effects, you may see simple effects and comparisons based on graphs. The discussion ahead provides brief about line graph results.

Click Graphs menuïƒ Lagacy Dialogsïƒ Lineâ€¦. This will open Line Charts dialogue box.

Click Multiple and Define to open Define sub dialogue box.

Select other statistic radio button. By default mean will be shown, when we send sales in the box. In Category Axis send education variable and put place in define lines by box.

Click OK to see the output viewer.

The output above shows that sales increases with increase in education in all the three places.

## ANCOVA (One-way Analysis of Covariance)

Analysis of covariance (ANCOVA) requires different participants to perform in each condition. As such it is suitable for only between or independent group design. ANCOVA provides an elegant means of reducing systematic bias and within groups error during the analysis. You attempt to reduce error variance due to individual differences in ANCOVA analysis. To determine whether the independent variable is indeed having an effect, the influence of en extraneous variable (covariate) on the dependent variable is statistically controlled in the analysis.

Assumptions:

Independence - scores on both the dependent variable and covariate should be independent of those scores for all other participants.

Linearity - linear relationship should exist between dependent variable and covariate for each group.

Homogeneity of regression slopes - relationship of dependent variable and covariate in each group should be same.

Normality - the dependent variables should be normally distributed with same score on the covariate and in the same group. In case scores for covariate alone are normally distributed, then ANCOVA is robust to this assumption.

Independence of covariate and treatments - In case of removing the proportion of shared variability between the dependent variable and the covariate, you should be careful that you do not also remove some of the effect of independent variable. You can measure the covariate before the beginning of experiment and avoid the above stated problem. Moreover, you may also do the same by randomly allocating participants to the different levels of independent variable.

Reliability of covariate - instrument used for analysis should be reliable.

Assumptions 1, 5, 6 relate to experimental design, assumption 4 is already discussed and assumptions 2 and 3 will be discussed in the working example further.

## Working Example 5 : One Way Analysis of Covariance

Aparna wants to research, whether place has an effect on sales. She recorded the sales made by 27 respondents over a year. She knows that education also contributes in the sales. As such, she took into account this added factor as co variate. The dependent variable is sales. Independent variable is Place (1-Delhi, 2-Kolkata, 3-Chennai). The covariate is education (1-undergraduate, 2-graduate, 3-post graduate)

Make the data file by creating variables as shown in the figure below.

Enter the data in the data view as shown in the figure below.

Click Data menuïƒ Split Fileâ€¦. This will open Split File dialogue box.

Select the organize output by groups radio button. Send place variable in the groups based on list box by clicking the right arrow button as shown in the figure below. Click OK to close the dialogue box.

The message Split by Place should appear on the status bar at the bottom right of the window, as shown in the figure below.

Now, click Graphs menuïƒ Legacy Dialogsïƒ Scatter /Dotâ€¦. This will open Scatter /Dot dialogue box.

Click Simple Scatter and then Click Define to open Simple Scatterplot dialogue box.

Send the Sales variable in Y-Axis and Education covariate in X-Axis list box as shown in the figure below. Click OK to see the output viewer.

## The Output:

SORT CASES BY Place.

SPLIT FILE SEPARATE BY Place. GRAPH

/SCATTERPLOT(BIVAR)=Education WITH Sales

/MISSING=LISTWISE.

The figure above shows the scatterplot of Delhi respondents. The figure below shows the scatterplot of Kolkata respondents. The scatterplot shows a linear relationship between dependent variable(Sales) and covariate(Education).

The Figure below shows the scatterplot of Chennai respondents. The scatterplot shows a linear relationship between dependent variable(Sales) and covariate(Education).

The slope of regression line across all groups shows a similar pattern. As such you can proceed further with the analysis.

Before proceeding with the analysis further, kindly turn the Split file option off. Click Dataïƒ Split Fileâ€¦ to open Split file dialogue box. Select Analyze all cases, do not create groups radio button and click OK. The Split file option is now off and you can now analyze further.

Click Analyzeïƒ General Linear Modelïƒ Univariateâ€¦. This will open Univariate dialogue box. Send Sales variable in Dependent variable box, Place variable in Fixed factor box and Education in Covariate box as shown in the figure below.

Click Optionsâ€¦ push button to open Options sub dialogue box. Select Descriptive Statistics, Estimates of effect size, Observed power and homogeneity tests check box in the Display option as shown in the figure below. Click Continue to close the sub dialogue box. Previous dialogue box will reappear. Click OK to see the output viewer.

## The Output:

UNIANOVA Sales BY Place WITH Education

/METHOD=SSTYPE(3)

/INTERCEPT=INCLUDE

/PRINT=ETASQ HOMOGENEITY DESCRIPTIVE OPOWER

/CRITERIA=ALPHA(.05)

/DESIGN=Education Place.

## Between-Subjects Factors

Value Label

N

Place

1

Delhi

9

2

Kolkata

9

3

Chennai

9

## Descriptive Statistics

Dependent Variable:Sales

Place

Mean

Std. Deviation

N

Delhi

38.78

10.557

9

Kolkata

42.78

10.592

9

Chennai

42.56

14.535

9

Total

41.37

11.718

27

## Levene's Test of Equality of Error Variancesa

Dependent Variable:Sales

F

df1

df2

Sig.

1.759

2

24

.194

Tests the null hypothesis that the error variance of the dependent variable is equal across groups.

a. Design: Intercept + Education + Place

## Tests of Between-Subjects Effects

Dependent Variable:Sales

Source

Type III Sum of Squares

df

Mean Square

F

Sig.

Partial Eta Squared

Noncent. Parameter

Observed Powerb

Corrected Model

884.162a

3

294.721

2.524

.083

.248

7.571

.547

Intercept

1521.681

1

1521.681

13.029

.001

.362

13.029

.933

Education

793.199

1

793.199

6.792

.016

.228

6.792

.704

Place

37.899

2

18.950

.162

.851

.014

.325

.072

Error

2686.134

23

116.788

Total

49781.000

27

Corrected Total

3570.296

26

a. R Squared = .248 (Adjusted R Squared = .150)

b. Computed using alpha = .05

The output indicates no main effect (p>0.5) for place; but a significant relationship exists between sales and education, F(2,23)=6.792, p<.05. As such, you can say that when you statistically control the education, place has no influence on the sales made.

## SPSS Procedure for ANOVA

After the input data has been typed according to the variables desired according to the problem, proceed according to following steps in respective cases.

## One Way ANOVA

## One-way between groups ANOVA with post-hoc comparisons

Click on Analyze menuïƒ Compare Meansïƒ One-Way ANOVAâ€¦.One-Way ANOVA dialogue box will be opened.

Select dependent variable in Dependent List box and independent variable in the Factor box.

Click Contrastsâ€¦ push button. Contrasts sub dialogue box will be opened. Can select the customized settings you require. Click Continue to close this sub dialogue box and come back to One-Way ANOVA dialogue box.

Click Post Hocâ€¦ push button. Post Hoc sub dialogue box will be opened. Click Tukey test and Click Continue to close this sub dialogue box and come back to One-Way ANOVA dialogue box. Also note that significant level in this sub dialogue box is 0.05, which can be changed according to the need.

Click Optionsâ€¦ push button. Options sub dialogue box will be opened. Select the Descriptive and Homogenity of variance test check box. Click Continue to close this sub dialogue box and come back to One-Way ANOVA dialogue box. Click OK to see the output viewer.

## One-way between groups ANOVA with Brown-Forsythe and Weltch tests

Click Analyzeïƒ Compare Meansïƒ One-Way ANOVAâ€¦. The One-Way ANOVA dialogue box will be opened.

Insert all the dependent variables in dependent list and independent variable in the factor as shown in the figure below.

Click Post Hocâ€¦ push button to open its sub dialogue box. See that significance level is set as per need. In this case, we have used 0.05 significance level. Click Continue to close the sub dialogue box.

Click Optionsâ€¦ push button in the One-Way ANOVA dialogue box. Select the Descriptive, Homogeneity of variance test, Brown-Forsythe and Welch check boxes and click continue to close this sub dialogue box. Click OK to see the output viewer.

## One-way between groups ANOVA with planned comparisons

Click Analyzeïƒ Compare Meansïƒ One-Way ANOVAâ€¦. This will open One-Way ANOVA dialogue box.

Shift the dependent variable to Dependent List and independent variable to Factor column.

Click Contrastsâ€¦ push button to open its sub dialogue box. Enter the coefficients (2, 1, -1, -2) one by one. Notice that the coefficient total should be zero. Click continue to close the sub dialogue box and come back to previous dialogue box.

Click Post Hocâ€¦ push button to check the significance level in the Post Hoc sub dialogue box. In this case it is 0.05. Click continue to close this sub dialogue box.

Click Optionsâ€¦ push button to open its sub dialogue box. Select descriptive and homogeneity of variance test and click continue to close this sub dialogue box. This will open previous dialogue box. Click OK to see the output viewer.

## Two Way ANOVA

## Two way between groups ANOVA

Click Analyzeïƒ General Linear Modelïƒ Univariateâ€¦. This will open Univariate dialogue box.

Choose the dependent variable and send it in dependent variable box. Similarly, choose independent variables to send them in fixed factor(s) list box.

Click Options push button to open its sub dialogue box.

Click Descriptive Statistics, Estimates of effect size, Observed power and Homogeneity tests check boxes in the Display box and click continue. Previous dialogue box will open. Click OK to see the output.

## For Post-Hoc analysis:

Click Analyzeïƒ General Linear Modelïƒ Univariateâ€¦. This will open Univariate dialogue box.

Click Post-Hoc push button for opening Post-Hoc sub dialogue box. Select Education and send it in Post Hoc Tests for list box. Click Tukey check box and click continue. Click OK to see the output.

With significant interaction effects, you may see simple effects and comparisons based on graphs. The discussion ahead provides brief about line graph results.

Click Graphs menuïƒ Lagacy Dialogsïƒ Lineâ€¦. This will open Line Charts dialogue box.

Click Multiple and Define to open Define sub dialogue box.

Select other statistic radio button. By default mean will be shown, when we send sales in the box. In Category Axis send one variable and put other variable in define lines by box.

Click OK to see the output viewer

## ANCOVA (One-way Analysis of Covariance)

## One Way Analysis of Covariance

Click Data menuïƒ Split Fileâ€¦. This will open Split File dialogue box.

Select the organize output by groups radio button. Send one variable in the groups based on list box by clicking the right arrow button. Click OK to close the dialogue box.

The message Split by Place should appear on the status bar at the bottom right of the window.

Now, click Graphs menuïƒ Legacy Dialogsïƒ Scatter /Dotâ€¦. This will open Scatter /Dot dialogue box.

Click Simple Scatter and then Click Define to open Simple Scatterplot dialogue box.

Send the dependent variable in Y-Axis and covariate in X-Axis list box as shown in the figure below. Click OK to see the output viewer.

In case the slope of regression line across all groups shows a similar pattern, you can proceed further with the analysis.

Before proceeding with the analysis further, kindly turn the Split file option off. Click Dataïƒ Split Fileâ€¦ to open Split file dialogue box. Select Analyze all cases, do not create groups radio button and click OK. The Split file option is now off and you can now analyze further.

Click Analyzeïƒ General Linear Modelïƒ Univariateâ€¦. This will open Univariate dialogue box. Send dependent variable in Dependent variable box, independent variable in Fixed factor box and covariate in Covariate box.

Click Optionsâ€¦ push button to open Options sub dialogue box.

Select Descriptive Statistics, Estimates of effect size, Observed power and homogeneity tests check box in the Display option. Click Continue to close the sub dialogue box.

Previous dialogue box will reappear. Click OK to see the output viewer.

## Exercise

Deepak wants to know the sales in four different cities of India in Christmas season. He assumes the sales contrast of 5:3:-4:-4 for Delhi:Banglore:Mumbai:Hyderabad, respectively. He collects sales data from 10 respondents each from the four cities, collecting a total of 40 sales data.

## City Sales (Rs. Crores)

Delhi 50, 48, 47, 49, 40, 42, 50, 98, 86, 69

Banglore 40, 38, 43, 38, 39, 87, 69, 48, 41, 40

Mumbai 41, 10, 89, 39, 36, 39, 49, 29, 59, 40

Hyderabad 28, 29, 59, 99, 39, 34, 30, 31, 29, 39

Analyse through One-way between groups ANOVA with planned comparisons. Calculate F ratio alongwith Post Hoc analysis.

Mohit Rajan wants to research that whether sales (dependent) of the respondents depend on their place(independent) and age (independent). He assigns 9 respondents from each metro city. Each respondent can select from three age levels.

Place: Ram Nagar, Jyoti Colony, Vivek Vihar

Ram Nagar - 10 respondents

Jyoti Colony - 9 respondents

Vivek Vihar - 10 respondents

Age: 1(Below 25 years), 2(25-35 years), 3(above 35 years).

## Place Age Sales(Rs. Lacs)

Ram Nagar 1 20, 40, 44, 35

2 30, 34, 50, 40

3 60, 55

Jyoti Colony 1 15, 25, 30

2 35,40,45,70

3 65, 80

Vivek Vihar 1 80,75,30,10

2 100, 90, 75

3 150, 89, 99

Analyse through Two-way between groups ANOVA. Calculate F ratio along with Post Hoc analysis.