Skip to main content

Exercise 3

The aim of this exercise is to enable you to apply the information given in BOX 3.1 and section 7.5.

Example W7.3: The growth of Viola lutea on a range of alternative growing media

A horticulture student investigated the growth of Viola lutea grown on a number of different composts as he was particularly interested in the value of peat-free composts as a suitable growing medium in the horticulture industry. One parameter recorded as part of this investigation was dry mass (g) after 9 weeks (Table W7.7). The student wished to test for differences and had planned to use a one-way parametric ANOVA.

Table W7.7: Dry mass (g) of Viola lutea growing in 4 different compost after 9 weeks

 

Peat-based compost

Coir based compost

Soil based compost (John Innes)

Green waste compost

 

1.263

0.954

1.324

0.894

 

1.136

0.861

1.385

0.877

 

1.143

0.942

1.295

0.794

 

1.237

0.948

1.396

0.910

 

1.094

0.972

1.258

0.823

 

1.185

0.869

1.244

0.853

 

0.984

0.953

1.253

0.853

 

1.183

0.916

1.362

0.814

 

1.165

0.884

1.277

0.920

 

1.201

0.792

1.285

0.884

sum of x

11.591

9.091

13.079

8.622

sum of x squared

13.49072

8.29344

17.13415

7.4499

s2

0.00618

0.00320

0.00313

0.00178

n

10

10

10

10



1

Q W3.1

Are the variances (s2) homogeneous?

[If you would like to save a record of your answer, please type it into this Word document]

a) Yes
b) No
Correct. See how we arrive at this conclusion below.Incorrect, the variances are homogenous. See how we arrive at this conclusion below.
Check your answer

Full calculation for Q W3.1

To confirm that the variances are homogeneous we use the Fmax test.

To calculate the variance we follow the instructions in BOX 3.1 or carry out these calculations using a statistical calculator or statistical software.

To calculate the variance for the dry mass (g) of Viola lutea growing on the peat based compost:

variance

Repeat these steps to calculate the variances for each growing medium. Then carry out the Fmax test as outlined in BOX 7.5.

H0: There is no difference between the variances of the dry weight (g) of Viola lutea grown in the four different composts.

H1 : There is a difference between the variances of the dry weight(g) of Viola lutea grown in the four different composts.

F max calculated

To look up the value for an F test that precedes an ANOVA, you will need to know the number of samples (a) = 4.

ns is the number of observations in each sample = 10.

The degrees of freedom (degrees of freedom = ns - 1) = 10 - 1 = 9.

At p = 0.05 Fmax critical= 6.31.

Since Fmaxcalculated (3.47) is less than Fmax critical (6.31) then you do not reject the null hypothesis and proceed with the ANOVA.

Having satisfied ourselves that the variances are homogeneous we can now continue with the ANOVA (BOX 7.6)

  1. General hypotheses to be tested

H0: There is no difference between the mean dry weight (g) of Viola lutea after 9 weeks growing on four different composts.

H1: There is a difference between the mean dry weight (g) of Viola lutea after 9 weeks growing on four different composts.

  1. How to work out F calculated
    1. Calculate general terms
      1. Add together all the observations in all the samples (grand total)
        sum of xT = 1.263 + 1.136 + 1.143 + ...................0.814 + 0.920 + 0.884 = 42.383
      2. Square each observation in all the samples and add these together
        Σ(xT2). = 1.2632 + 1.1362 + 1.1432 + ...................0.8142 + 0.9202 + 0.8842 = 46.36821
      3. Add all the observations in a sample (Σ xs). This is the sample total. Do this for all samples. Square each sample total (Σ xs)2. Add these together. Divide this total by the number of observations in each sample (ns).
calculation
      1. Take the result from step 1, square it (sum of xT)2 and divide by N. Where N is the total number of observations in all the samples combined.

        N = 10 + 10 + 10 + 10 = 40
calculation
    1. Calculate the Sums of Squares (SS)
      1. SStotal = result from step 2 - result from step 4 = 46.36821 - 44.90797 = 1.46024
      2. SSbetween = result from step 3 - result from step 4 = 46.23967 - 44.90797 = 1.3317
      3. SSwithin = result from step 5 - result from step 6 = 1.46024 - 1.3317 = 0.12854
    1. Construct and complete an ANOVA calculation table
      1. Complete an ANOVA table.

Source of variation

SS

degrees of freedom

s2

F

Between samples

1.3317

     

Within samples

0.12854

     

Total variation

1.46024

     


      1. Calculate the degrees of freedom (degrees of freedom)

        degrees of freedomtotal = total number of observations - 1 = N - 1 = 40 - 1 = 39

        degrees of freedombetween = number of samples - 1 = a - 1 = 4 - 1 = 3

        degrees of freedomwithin = total number of observations - number of samples = N - a = 40 - 4 = 36

Source of variation

SS

degrees of freedom

s2

F

Between samples

1.3317

3

   

Within samples

0.12854

36

   

Total variation

1.46024

39

   


      1. Calculate the variances (s2) for between and within samples

Source of variation

SS

degrees of freedom

s2

F

Between samples

1.3317

3

1.3317/ 3 = 0.4439

 

Within samples

0.12854

36

0.12854 / 36 = 0.00357

 

Total variation

1.46024

39

   


      1. Finally calculate the variance ratio Fcalculated where
F calculated

Source of variation

SS

degrees of freedom

s2

F

Between samples

1.3317

3

0.4439

0.4439/0.00357

= 124.34174

Within samples

0.12854

36

0.00357

 

Total variation

1.46024

39

   


  1. To find Fcritical

Identify the critical F value using the F tables for an ANOVA. You may need to interpolate (4.3.6) these values. Where degrees of freedom1 = 3 and degrees of freedom2 = 36. Interpolating from the F table for p = 0.05, Fcritical = 2.872

  1. The rule

Fcalculated (124.341) is greater than Fcritical (2.872) so you may reject the null hypothesis.

  1. What does this mean in real terms?

There is a highly significant difference (F = 124.341) , p = 0.05) between the mean dry weight (g) of Viola lutea when grown on four different composts.

We have also shown how to calculate this using the following software packages:

Excel

SPSS

Minitab

How to calculate Q W3.1 in Excel

Step 1: Put the data into the spreadsheet using appropriate row and column headings.

Excel: Step 1

Step 2: Check that the variances of the samples are similar using the Fmax test.

Select an empty cell and click on fx on the tool bar. Select Statistical from the Function Category list and VAR from the Function name list.

Click on OK.

Excel: Step 2

Step 3: Ensure that the box labelled Number 1 is highlighted and then click on the top cell of the first data box and drag down the column of numbers. The cell locations will be entered into the box.

Excel: Step 3

Step 4: Click on OK and the variance will be returned to the selected box.

Step 5: Repeat this for all four samples.

Step 6: Select the highest and the lowest variance values and perform a division by selecting a new cell by clicking on it, place '=' in the cell, then click on the cell containing the highest variance value, type '/', then click on the cell containing the lowest variance value and press 'enter'. The Fmax value will be returned.

Step 7: Consult the Fmax table to find the critical value where number of samples (a) = 4 and degrees of freedom of each sample, v = 9. The critical value is 6.31.

As Fmax calculated is less than Fmax critical we can state that the variances of the four samples are similar and can proceed with a one way ANOVA.

Step 8: From the top tool bar select, Tools then Data Analysis from the drop down menu.

Step 9: In the Data Analysis box, scroll down and select the Analysis Tool: ANOVA: Single Factor. Click OK.

Excel: Step 9

Step 10: Input values as indicated in the box.

Excel: Step 10

Ensure that the cursor is flashing in the Input Range: Input box. Input the cell references of the data by clicking on cell A1 (this includes the data or sample label) and dragging across the entire data set. The area on the spreadsheet will now be highlighted and the cell references shown in the input box.

Step 11: Click on the button to show that the data are grouped by columns

Step 12: The box marked Labels should be clicked, this will put a tick in the box which shows that the first cell for each data set contains a label and not data. If this box is not ticked, Excel will treat the material in the first cell as data and will not be able to complete the calculation. Note that it is useful to use the labels to identify your data. These labels are used by Excel to identify the output data.

Step 13: The default value for alpha (p) is 0.05 but this can be changed if required, but you will not normally require to do so.

Step 14: Next, select the output options. To return the output data below the input data, select 'Output Range:' and then click in the box (the cursor will now flash in the box). Scroll over an area where you want the results to be displayed. Note that you could just select a couple of cells - Excel will determine the actual size that it requires for the results table. Note too, that it is essential to click in the box as well as selecting the 'Output Range' button. If this is not done the location is entered into the 'Input Range' box and the analysis cannot be completed.

Step 15: You can choose to have the results entered on to a 'New Worksheet Ply', in which case the results will be given on a fresh sheet, accessed by the tabs at the bottom of the current sheet. Alternatively a 'New Workbook' can be selected. We have opted to put the results table beneath the original data on the spreadsheet.

Step 16: Click OK and the Results table will be returned.

Excel: Step 16

Step 17: Select the required values from the results table.

The value of Fis 124.3319 (to 4 decimal places). The value of FcritIical is 2.866265.

As Fcalculated is more than Fcritical we may reject the null hypothesis. The result is highly statistically significant and the probability of this value of F is quoted as 4.71 x 10-19.

Therefore, there is highly statistically significant difference between the mean dry mass (g) of Viola lutea grown on the different composts.

How to calculate Q W3.1 in SPSS

Step 1: Set up the variables

When SPSS starts up, select 'variable view' using the tabs at bottom-left. You should get something like this:

SPSS: Step 1 (i)

For the first variable name, type in 'compost', and for the second 'weight'. Default properties are set for each variable.

SPSS: Step 1 (ii)

'Compost' is a text variable (the type of compost), so we need to use value labels to convert this into something that SPSS can use in its anova routines. Click in the 'values' cell of row 1, and then click in the grey area that appears at the right-hand side of the cell. You will get a dialogue box to input value labels. Put '1' in the 'value' window, and 'peat' in the 'value label' window. Click on 'add' to enter this pair into the system.

SPSS: Step 1 (iii)

Repeat for 2 and 'coir', 3 and 'soil', 4 and 'green waste'.

SPSS: Step 1 (iv)

Click on 'OK'.

The number of decimal places for 'compost' can be reduced to zero, since we are using integers. For 'weight', we need to increase the decimal setting to 3, because our weight measurements are to 3 decimal places. Click in the 'decimals' cell of each row, and make the adjustments using the 'up-and-down' arrows that appear at the right-hand side of the cell.

SPSS: Step 1 (v)

Transfer to data view using the tabs at bottom-left, and enter the data. You will have to enter the weights first, and then click in the 'compost' cells. This will give a drop-down menu accessed from an arrow at the right-hand side of the cell. From this menu, you can select the appropriate compost type.

SPSS: Step 1 (vi)

Step 2: Perform the test.

Go to 'Analyze', 'Compare means', 'One-way Anova'.

SPSS: Step 2 (i)

In this analysis, the dependent variable is the dry weight of the plants, so highlight 'weight' by clicking on it, then transfer it to the 'dependent list' window by clicking on the appropriate arrow. The factor causing variation in the dependent variable is the compost type, so, in the same way, transfer compost' to the 'factor' window.

SPSS: Step 2 (ii)

Click on 'OK'. The output will appear in a separate window.

Oneway

oneway ANOVA results

Step 3: Decide what the result means.

The value of F in this case is 124.332, and the 'Sig.' Column gives the p-value, which is less than 0.001. We conclude that there is a highly significant difference (F = 124.332, p < 0.001) between the mean dry mass (g) of Viola lutea grown on the different composts.

How to calculate Q W3.1 in Minitab

Step 1: Enter your data into the worksheet part of the Minitab display, using sensible column headings.

Minitab: Step 1

Step 2: Perform the analysis. Go to 'Stat', 'ANOVA', 'One-way (unstacked)'.

Minitab: Step 2

Transfer all four columns across to the 'responses' window by first highlighting them (one at a time) and then clicking on 'select'.

Minitab: Step 2 (i)

Click on 'OK'. The results of the analysis will appear in the session window.

One-way ANOVA: Peat-based c, Coir based c, Soil based c, Green waste

One-way ANOVA results

Step 3: Decide what the results mean.

The value of F is 124.33, and p-value is less than 0.001. This means that there is a significant difference, at better than p = 0.001, between the mean dry mass (g) of Viola lutea grown on the different composts.