58
One-way Analysis of Variance One-way Analysis of Variance (ANOVA) Note: In this version, we’ll use Excel to do all the calculations. If you wanted the tutorial that worked through the calculations using only a calculator, go back to the menu of tutorials to select that one.

One-way Analysis of Variance (ANOVA) Note: In this version, we’ll use Excel to do all the calculations. If you wanted the tutorial that worked through

Embed Size (px)

Citation preview

Page 1: One-way Analysis of Variance (ANOVA) Note: In this version, we’ll use Excel to do all the calculations. If you wanted the tutorial that worked through

One-way Analysis of Variance

One-way Analysis of Variance

(ANOVA)

Note: In this version, we’ll use Excel to do all the calculations. If you wanted the tutorial that worked through the calculations using only a calculator, go back to the menu of tutorials to select that one.

Page 2: One-way Analysis of Variance (ANOVA) Note: In this version, we’ll use Excel to do all the calculations. If you wanted the tutorial that worked through

Introduction, slide 1Once upon a time….

(that time was Fall 2012)

At a community college far, far away…

(actually, right here at Saddleback College, but “far, far away” sounds better)

Page 3: One-way Analysis of Variance (ANOVA) Note: In this version, we’ll use Excel to do all the calculations. If you wanted the tutorial that worked through

Introduction, slide 2An evil biology professor…

That’s me!

Page 4: One-way Analysis of Variance (ANOVA) Note: In this version, we’ll use Excel to do all the calculations. If you wanted the tutorial that worked through

Introduction, slide 3…enslaved an entire class in a room full of fancy equipment and made them do work! This was called….

Page 5: One-way Analysis of Variance (ANOVA) Note: In this version, we’ll use Excel to do all the calculations. If you wanted the tutorial that worked through

Dr. Huntley’s Bio 3b Lab

Page 6: One-way Analysis of Variance (ANOVA) Note: In this version, we’ll use Excel to do all the calculations. If you wanted the tutorial that worked through

Question: do light conditions affect chlorophyll concentration?The students were trying to determine whether light

conditions had a significant effect on the concentration of chlorophyll in geranium leaves. For their experiment, they had three groups of plants:

Acknowledgement: This image was found on Google images.It originated at http://geranamine.org/

Page 7: One-way Analysis of Variance (ANOVA) Note: In this version, we’ll use Excel to do all the calculations. If you wanted the tutorial that worked through

Group 1: the light group

The first group was exposed to normal light conditions.

Aaah….I love sunshine!

Page 8: One-way Analysis of Variance (ANOVA) Note: In this version, we’ll use Excel to do all the calculations. If you wanted the tutorial that worked through

Group 2: the dark group

The second group was kept in the dark for 72 hours.

Yikes! I’ve always been afraid of the dark!

Page 9: One-way Analysis of Variance (ANOVA) Note: In this version, we’ll use Excel to do all the calculations. If you wanted the tutorial that worked through

Group 3: the 4-hour group

The third group was kept in the dark for 72 hours and then exposed to light for 4 hours.

Page 10: One-way Analysis of Variance (ANOVA) Note: In this version, we’ll use Excel to do all the calculations. If you wanted the tutorial that worked through

Option to read about the experimentThen the students measured the chlorophyll concentration in the leaves. Click on Dr. Huntley if you’d like to read about how they did this.

Page 11: One-way Analysis of Variance (ANOVA) Note: In this version, we’ll use Excel to do all the calculations. If you wanted the tutorial that worked through

The dataThere were 12 lab groups, each of which measured chlorophyll concentration in leaves from one plant from each group. The class then pooled their data; the results are in the table below. All data is given in .

LIGHT DARK DARK + 4 hr. Light56.02 25.97 46.7363.41 44.05 50.6760.35 51.31 45.3364.30 44.95 55.6458.95 38.58 47.3669.01 34.12 43.4269.52 37.94 51.9556.02 45.58 48.8955.26 27.25 45.2056.53 44.44 56.0258.07 49.02 54.1161.05 44.95 52.67

Page 12: One-way Analysis of Variance (ANOVA) Note: In this version, we’ll use Excel to do all the calculations. If you wanted the tutorial that worked through

DirectionsPerform an ANOVA test with α = .05 to determine whether there is a significant difference in the mean concentration of chlorophyll between the 3 groups.

You may assume that chlorophyll concentration is approximately normally distributed.

If you want to work through this problem on your own and just check your work when you’re done, go ahead. Click on the leaf to the right when you’re ready to check your answer.

Page 13: One-way Analysis of Variance (ANOVA) Note: In this version, we’ll use Excel to do all the calculations. If you wanted the tutorial that worked through

Set-upOpen a new Excel workbook and enter in the data.

Your worksheet should look like this.

Page 14: One-way Analysis of Variance (ANOVA) Note: In this version, we’ll use Excel to do all the calculations. If you wanted the tutorial that worked through

Select “Data” from menu

From the top menu, select “Data.”

Page 15: One-way Analysis of Variance (ANOVA) Note: In this version, we’ll use Excel to do all the calculations. If you wanted the tutorial that worked through

Select “Data Analysis” from menu

When this menu opens up, select “Data Analysis” from the far right.

Page 16: One-way Analysis of Variance (ANOVA) Note: In this version, we’ll use Excel to do all the calculations. If you wanted the tutorial that worked through

What to do if “Data Analysis” option isn’t there

If “Data Analysis” doesn’t appear here, yell at your computer in frustration! Then install the Analysis Toolpak (you should have directions for doing so in one of your labs.)

Page 17: One-way Analysis of Variance (ANOVA) Note: In this version, we’ll use Excel to do all the calculations. If you wanted the tutorial that worked through

The dialogue box for “Data Analysis”The dialogue box to the left will open up.

If “Anova: Single Factor” isn’t the first option, move this bar up until you see it.

Page 18: One-way Analysis of Variance (ANOVA) Note: In this version, we’ll use Excel to do all the calculations. If you wanted the tutorial that worked through

Selecting the Anova option in Excel

The dialogue box to the right will open up.

Click on “Anova: Single Factor” to highlight it and then click on “OK.”

Page 19: One-way Analysis of Variance (ANOVA) Note: In this version, we’ll use Excel to do all the calculations. If you wanted the tutorial that worked through

Filling in the input range

The above dialogue box will appear.

In the “Input Range” box, type in the cells that contain the headings (light, dark, and 4-hour) and the data, starting with the cell in the upper left-hand corner, followed by a colon (:), followed by the cell in the lower right-hand corner.

Page 20: One-way Analysis of Variance (ANOVA) Note: In this version, we’ll use Excel to do all the calculations. If you wanted the tutorial that worked through

Finding the correct input rangeIn the “Input Range” box, type in the cells that contain the headings (light, dark, and 4-hour) and the data, starting with the cell in the upper left-hand corner, followed by a colon (:), followed by the cell in the lower right-hand corner.

From the screen shot below, we see that for this example that is A1:C13.

A1:C13

Page 21: One-way Analysis of Variance (ANOVA) Note: In this version, we’ll use Excel to do all the calculations. If you wanted the tutorial that worked through

Alternate way to enter input range

From the screen shot below, we see that for this example that is A1:C13.

A1:C13 Note that you can also enter the input range by using the red arrow and highlighting the appropriate cells; feel free to use this option if you are familiar with it.

Page 22: One-way Analysis of Variance (ANOVA) Note: In this version, we’ll use Excel to do all the calculations. If you wanted the tutorial that worked through

Select Grouped by “Columns” in dialogue box

A1:C13

Make sure you’ve checked the bubble that says the data is sorted by columns.

Page 23: One-way Analysis of Variance (ANOVA) Note: In this version, we’ll use Excel to do all the calculations. If you wanted the tutorial that worked through

A1:C13

Click on this box to indicate that the first row contains the headings (labels) for our columns; the actual data starts in row 2. When you click on the box, a check mark will appear.

Page 24: One-way Analysis of Variance (ANOVA) Note: In this version, we’ll use Excel to do all the calculations. If you wanted the tutorial that worked through

A1:C13

Click on this box to indicate that the first row contains the headings (labels) for our columns; the actual data starts in row 2. When you click on the box, a check mark will appear.

This is a neat feature of Excel; when we type in the headings and check this box, we’ll see these headings in the output generated by Excel. If we didn’t do this, the data would be described as “Column 1, Column 2,” and “Column 3” instead of “Light, Dark,” and “4-hour.”

Page 25: One-way Analysis of Variance (ANOVA) Note: In this version, we’ll use Excel to do all the calculations. If you wanted the tutorial that worked through

Entering alpha value into dialogue box

A1:C13

Be sure the correct value of alpha appears in this box. If it doesn’t, click on the box and type in the correct value---for this problem, .05.

.05

Page 26: One-way Analysis of Variance (ANOVA) Note: In this version, we’ll use Excel to do all the calculations. If you wanted the tutorial that worked through

Selecting “Output Range” from dialogue box

A1:C13

.05

Under “Output options,” select “Output Range” by clicking on the bubble next to it .

Page 27: One-way Analysis of Variance (ANOVA) Note: In this version, we’ll use Excel to do all the calculations. If you wanted the tutorial that worked through

Entering the output range

A1:C13

.05

Pick an empty cell and enter it here. This is where your results will appear. I’ve chosen to enter E3. Again, if you prefer to use the red arrow and highlight the desired cell, that’s fine.

E3

Page 28: One-way Analysis of Variance (ANOVA) Note: In this version, we’ll use Excel to do all the calculations. If you wanted the tutorial that worked through

Click “OK” when dialogue box is completed

A1:C13

.05

E3

Finally, click “OK.”

Page 29: One-way Analysis of Variance (ANOVA) Note: In this version, we’ll use Excel to do all the calculations. If you wanted the tutorial that worked through

You’ll see the output boxes below, positioned to start in the cell you selected . Notice that it’s a little hard to read, since not all the information fits in the space allotted for it.

Page 30: One-way Analysis of Variance (ANOVA) Note: In this version, we’ll use Excel to do all the calculations. If you wanted the tutorial that worked through

Adjusting the output box to make it easier to read

To fix this, click on “Home” at the top of your screen.

Page 31: One-way Analysis of Variance (ANOVA) Note: In this version, we’ll use Excel to do all the calculations. If you wanted the tutorial that worked through

Adjusting the output box to make it easier to read, slide 2

When this menu opens up, click on “Format” in the options above “Cells.”

Page 32: One-way Analysis of Variance (ANOVA) Note: In this version, we’ll use Excel to do all the calculations. If you wanted the tutorial that worked through

Adjusting the output box to make it easier to read, slide 3

Then select “Autofit Column Width” from the drop-down menu that opens up.

Page 33: One-way Analysis of Variance (ANOVA) Note: In this version, we’ll use Excel to do all the calculations. If you wanted the tutorial that worked through

The output box from Excel, adjusted so it’s easier to read

Now we can read everything in the output box.

Page 34: One-way Analysis of Variance (ANOVA) Note: In this version, we’ll use Excel to do all the calculations. If you wanted the tutorial that worked through

Ready to start hypothesis testNow we’re ready to perform our hypothesis test!

We’ll work through the usual 6-step process, and refer to the output from Excel whenever we need a calculated value.

Page 35: One-way Analysis of Variance (ANOVA) Note: In this version, we’ll use Excel to do all the calculations. If you wanted the tutorial that worked through

Step 1: State the hypotheses and identify the claim (if there is one)

The Null hypothesis is always that there is no difference between the means. We can describe this in symbols.

𝐻𝑜 :𝜇𝑙=𝜇𝑑=𝜇4

Remember to use μ, the symbol for population mean. Notice that I’m using a subscript of “l” for the light group, “d” for the dark group, and “4” for the 4-hour group.

Page 36: One-way Analysis of Variance (ANOVA) Note: In this version, we’ll use Excel to do all the calculations. If you wanted the tutorial that worked through

The alternate hypothesis𝐻𝑜 :𝜇𝑙=𝜇𝑑=𝜇4

The Alternate hypothesis is that there is a difference in the means. This includes the possibility

a) that we have 3 different means, or b) that 2 means are the same and only 1 is different from

the others. To allow for both possibilities, we state the Alternate hypothesis in words.

At least one mean is different from the others.

Note that this problem was posed as a question so that there is no claim.

Page 37: One-way Analysis of Variance (ANOVA) Note: In this version, we’ll use Excel to do all the calculations. If you wanted the tutorial that worked through

Step (*)

Draw the F distribution and mark off the area in the right tail.

Slow Down!

There are 3 things we have to check first!

Page 38: One-way Analysis of Variance (ANOVA) Note: In this version, we’ll use Excel to do all the calculations. If you wanted the tutorial that worked through

Checking to see if we can use the F-distribution1. Chlorophyll concentration is

approximately normally distributed. We were told to assume this.

2. We have independent samples. We can trust Dr. Huntley to set up a valid experiment.

3. The population variances are equal. This is a

tough one, since we don’t know any of the population variances.

Page 39: One-way Analysis of Variance (ANOVA) Note: In this version, we’ll use Excel to do all the calculations. If you wanted the tutorial that worked through

Rule of thumb for checking that variances are equal

We’ll rely on the rule of thumb that it’s ok to proceed if the largest sample standard deviation (not the variance!) is no more than twice the smallest.

Excel gives us the sample variances. To calculate the sample standard deviations, we need to take the square roots.

Page 40: One-way Analysis of Variance (ANOVA) Note: In this version, we’ll use Excel to do all the calculations. If you wanted the tutorial that worked through

Rule of thumb for checking that variances are equal, slide 2

We’ll rely on the rule of thumb that it’s ok to proceed if the largest sample standard deviation (not the variance!) is no more than twice the smallest.

LARGEST

smallest

The largest is less than twice the smallest.

Page 41: One-way Analysis of Variance (ANOVA) Note: In this version, we’ll use Excel to do all the calculations. If you wanted the tutorial that worked through

The F-distributionSo we can go ahead and draw the F distribution and mark off the area in the right tail.

.05This test is always right-tailed (like me!) since if the means are different, that will make the F-value BIG.

Page 42: One-way Analysis of Variance (ANOVA) Note: In this version, we’ll use Excel to do all the calculations. If you wanted the tutorial that worked through

Step 2

Mark off the critical value.

.05

The critical value is the boundary of the right tail; it goes here.

Page 43: One-way Analysis of Variance (ANOVA) Note: In this version, we’ll use Excel to do all the calculations. If you wanted the tutorial that worked through

Find the critical value in the Excel output here.

Page 44: One-way Analysis of Variance (ANOVA) Note: In this version, we’ll use Excel to do all the calculations. If you wanted the tutorial that worked through

Then add the critical value to our picture.

.05

3.284…

Page 45: One-way Analysis of Variance (ANOVA) Note: In this version, we’ll use Excel to do all the calculations. If you wanted the tutorial that worked through

Step 3

Mark off the test value, F.

Page 46: One-way Analysis of Variance (ANOVA) Note: In this version, we’ll use Excel to do all the calculations. If you wanted the tutorial that worked through

Finding the test value, F, on Excel’s output

Find the test value in the Excel output here.

Page 47: One-way Analysis of Variance (ANOVA) Note: In this version, we’ll use Excel to do all the calculations. If you wanted the tutorial that worked through

Then add the test value to our picture.

.05

3.284… 33.411…

Since 33.411… > 3.284…, it goes to the right.

Page 48: One-way Analysis of Variance (ANOVA) Note: In this version, we’ll use Excel to do all the calculations. If you wanted the tutorial that worked through

Step 4: Decide whether or not to reject the Null.

.05

3.284… 33.411…

The test value is in the critical region; reject the Null.

Page 49: One-way Analysis of Variance (ANOVA) Note: In this version, we’ll use Excel to do all the calculations. If you wanted the tutorial that worked through

Step 5: Answer the question in plain English

There is enough evidence to support a claim that light conditions affect chlorophyll concentration.

Equivalently, there is enough evidence to reject a claim that light conditions don’t affect chlorophyll concentration.

Page 50: One-way Analysis of Variance (ANOVA) Note: In this version, we’ll use Excel to do all the calculations. If you wanted the tutorial that worked through

Request for a summaryI’m exhausted! Could we just see a quick summary of all that?

Page 51: One-way Analysis of Variance (ANOVA) Note: In this version, we’ll use Excel to do all the calculations. If you wanted the tutorial that worked through

Summary: review of Excel output

First we entered the data into Excel, selected the “Anova: Single Factor” option, and got the above output. Then we used this output to perform the usual 6 steps of hypothesis testing.

Page 52: One-way Analysis of Variance (ANOVA) Note: In this version, we’ll use Excel to do all the calculations. If you wanted the tutorial that worked through

Summary: 6 steps of hypothesis testingEach click will give you one step; step (*) is broken into two clicks.

Step 1 At least one mean is different from the others.

Step(*)

.05

3.284…Step 2 33.411… Step 3

Step 4 Reject the Null.

Step 5 There is enough evidence to support a claim that light conditions affect chlorophyll concentration.

Page 53: One-way Analysis of Variance (ANOVA) Note: In this version, we’ll use Excel to do all the calculations. If you wanted the tutorial that worked through

And there was much rejoicing.

Page 54: One-way Analysis of Variance (ANOVA) Note: In this version, we’ll use Excel to do all the calculations. If you wanted the tutorial that worked through

Press escape to exit the slide show

If you keep clicking through the slides, you’ll go to the explanation of the experiment.

Page 55: One-way Analysis of Variance (ANOVA) Note: In this version, we’ll use Excel to do all the calculations. If you wanted the tutorial that worked through

Steps 1 and 2 of the experiment

Step 1. Cuttwo 5 mm disksfrom a geranium leaf.

Acknowledgement: The image of the geranium leaf was found on Google images. It originated at davesgarden.com

Step 2. Soak disks in 5 ml of 8% acetone solution for 48 hours at

5 ml8 % acetone

solution

Page 56: One-way Analysis of Variance (ANOVA) Note: In this version, we’ll use Excel to do all the calculations. If you wanted the tutorial that worked through

Step 3 of experimentStep 3. Use a spectrophotometer to read the absorbance. From this, calculate the chlorophyll concentration in micrograms of chlorophyll per milliliter of solution .

Acknowledgement: This image was found on google images, which credits it with coming from flushgordon.info

Page 57: One-way Analysis of Variance (ANOVA) Note: In this version, we’ll use Excel to do all the calculations. If you wanted the tutorial that worked through

Step 4 of experimentStep 4. Convert from to . This is the data we’ll test.

For this tutorial, Dr. Huntley has kindly converted the data to the appropriate units for us.

Thanks Dr. Huntley!!

Please don’t mention it.Especially not to my 3b students; I make them do the conversions themselves.

Page 58: One-way Analysis of Variance (ANOVA) Note: In this version, we’ll use Excel to do all the calculations. If you wanted the tutorial that worked through

Return to the main slide show after learning about the experimentClick on the picture below to see the data the students

collected.

Top SecretLab Results