Вы находитесь на странице: 1из 43

This Excel file will allow you to do the following

Chi-square test
t-test
Paired t-test
Regression
Simpson's Diversity Index

Click on tabs on the bottom to move to th

(if you don't see the tabs, make sure the window for this worksheet is maximized)

o do the following tests:


Categorical Data: Use this test to compare totals (e.g., number of saguaros on northversus south-facing slope). This test can handle any number of categories (not just two).
Continuous Data: Use this test to compare
north- versus south-facing slopes).

averages (e.g., average saguaro height on

Use this test to compare averages when the two numbers come in pairs
(e.g., if you wanted to compare number of holes in the north versus south sides of cacti, each
cactus will have a number of holes for its north side and a number of holes for its south side, which
make up one pair of observations. You could use this test to compare all of these pairs of numbers,
to see if there were typically more holes on one side or the other.
Use this test to look for a relationship between two numeric variables (such as saguaro
height and number of holes in the saguaro).
Use this test to compare species diversity between locations.

m to move to the test you want.

or this worksheet is maximized)

CHI SQUARE TEST


WHEN TO USE: Use this test to compare totals or counts between different categories (such as numbers of cacti per 100m
Steps to using Excel to do chi-square test:
First decide how many categories you have (e.g., north vs south would be 2 categories; tree, shrubs, succulents would be 3).
Use the table that has the same number of categories as you have (change categories to yours if you want).
Type your data in the gray boxes; make sure you press enter after entering all data
The p-value gives the chance that the numbers are evenly randomly distributed.
Note: you cannot use chi square test for comparing percentages.
Note: you should not use chi square test for sample sizes less than 30

2 categories
Your Data >>>

Category 1
120

Category 2
150

3 categories
Your Data >>>

Category 1

Category 2

4 categories
Your Data >>>

Category 1
40

Category 2
50

Category 3
60

Category 4
104

5 categories
Your Data >>>

Category 1

Category 2

Category 3

Category 4

Category 5

8 categories
Your Data >>>

Category 1

Category 2

Category 3

Category 4

Category 5

P value

0.068 Is the p value less than


If no, then the totals are no
If yes, then the totals are s

Category 3
P value

#DIV/0!

P value

Category 6

Example 1: if you counted 120 saguaros on the N slope and 150 saguaros on the S slope,
then p = 0.068 so there is no significant difference in # of saguaros on the two slopes.

Example 2: if you counted 40 holes on the N side, 50 on E side, 60 on W side, and 104 on S side of saguaros,
then p < 0.01 so there is a significant difference in # of saguaros on the two slopes.
The chi square test compares the observed values to the values expected by the null hypothesis.

umbers of cacti per 100m 2 in a wash versus on a hill slope).

bs, succulents would be 3).

the p value less than 0.05?


no, then the totals are not significantly different (cannot reject null hypothesis)
yes, then the totals are significantly different (accept an alternative hypothesis)

Is the p value less than 0.05?


If no, then the totals are not significantly different (cannot reject null hypothesis)
If yes, then the totals are significantly different (accept an alternative hypothesis)

p<0.01

P value

Category 7

4 on S side of saguaros,

Is the p value less than 0.05?


If no, then the totals are not significantly different (cannot reject null hypothesis)
If yes, then the totals are significantly different (accept an alternative hypothesis)

#DIV/0! Is the p value less than 0.05?


If no, then the totals are not significantly different (cannot reject null hypothesis)
If yes, then the totals are significantly different (accept an alternative hypothesis)
Category 8
P value

#DIV/0! Is the p value less than 0.05?


If no, then the totals are not significantly different
If yes, then the totals are significantly different (ac

hypothesis)
hypothesis)

ot reject null hypothesis)


an alternative hypothesis)

han 0.05?
re not significantly different (cannot reject null hypothesis)
are significantly different (accept an alternative hypothesis)

T-TEST

WHEN TO USE: Use this test when you want to compare values of any numeric variable between two groups (such as tree he

Your Data >>>


Your Data >>>
Your Data >>>
Etc.

Group 1
3.5
0.2
0.5
1.5
3.1

Group 2
1
3.2
3.5
4.2
0.8

w h a t a r e y o u m e a s u r in g (u n its )

Steps to using Excel to do t-test:


Click on Group 1 and type in new name for group; do same for Group 2
Replace existing data with your data under each column name
Click into the vertical-axis label of the graph, and change the label, remembering to give the units, too

average Group 1
average Group 2

1.760
2.540

standard error Group 1


standard error Group 2

0.668
0.690

P value

0.440

3.000
2.500
2.000
1.500
1.000
0.500
0.000

1.500
1.000
0.500
0.000

n two groups (such as tree heights in a wash versus on a hill slope).

give the units, too

These values show the variability for each group, and are used to make the "error bars" on the graph below

Is the p value less than 0.05?


If no, then the averages are not significantly different (cannot reject null hypothesis)
If yes, then the averages are significantly different (accept an alternative hypothesis)

3.000

2.500

2.000

1.500

1.000

0.500

0.000

Group 1

Group 2

1.500

1.000

0.500

0.000

Group 1

Group 2

rror bars" on the graph below

PAIRED T-TEST
WHEN TO USE: Use this test when you want to compare numeric variables that come in pairs.

Your Data for pair 1 >>>


Your Data for pair 2 >>>
Your Data for pair 3 >>>
Etc.

Variable 1
3.5
0.2
0.5
1.5
3.1

Variable 2
1
3.2
3.5
4.2
0.8

w h a t a r e y o u m e a s u r in g (u n its )

Steps to using Excel to do paired t-test:


Click on Variable 1 and type in a name for your variable; do same for Variable 2.
(These names just need to distinguish between the two variables. For instance, you could
use "North" and "South" if you were comparing numbers of holes in north versus south sides of cacti.)
Replace existing data with your data under each column name. Make sure you put both of the numbers from e
Click into the vertical-axis label of the graph, and change the label, remembering to give the units if appropriat

average Variable 1
average Variable 2
standard error Variable 1
standard error Variable 2
P value

3.000
2.500
2.000
1.500
1.000
0.500
0.000

2.000
1.500
1.000
0.500
0.000

sides of cacti.)
h of the numbers from each pair of observations in the same row.
e the units if appropriate

1.760
2.540
0.668
0.690

These values show the variability for each variable, and are used to make the "error bars" on the gra

0.581

Is the p value less than 0.05?


If no, then the averages are not significantly different (cannot reject null hypothesis)
If yes, then the averages are significantly different (accept an alternative hypothesis)

3.000
2.500
2.000
1.500
1.000
0.500
0.000

Variable 1

Variable 2

2.000
1.500
1.000
0.500
0.000

Variable 1

Variable 2

"error bars" on the graph below

REGRESSION
WHEN TO USE: Use this test when you want to look for a relationship between two numeric variables.
Steps to using Excel to do regression:
Click on Explanatory variable and type in your explanatory variable; do same for Response variable
Replace existing data with your data under each column name
Click into the axis labels of the graph and change the labels, remembering to give the units, too
Calculations:

Your Data >


Your Data >
Your Data >
Etc.

Explanatory
variable
0.4
1
2.3
4.1
4.7

Response
variable
22
28
42
55
61

xy

x2
8.8
28
96.6
225.5
286.7

y2
0.16
1
5.29
16.81
22.09

484
784
1764
3025
3721

predicted
y
22.89362
28.2383
39.81844
55.85248
61.19716

onse variable

squared
residuals (x - avg x)^2
0.798551
4.41
0.056786
2.25
4.759205
0.04
0.726726
2.56
0.038873
4.84

n
5

x
12.5

( x)2
156.25

Y o u r r e s p o n s e v a r ia b le (u n its )

residuals
-0.893617
-0.238298
2.18156
-0.852482
-0.197163

Slope =
y-intercept =
r=
r2 =
regression standard error (s) =
standard error of the slope =
t=
P value

y
208

(xy)
645.6

( y)2
43264
8.907801
19.3305
0.997161
0.99433
1.458326
0.388369
22.93642
p<0.01

70
60
50
40
30
20
10
0

0.5

1.5

2.5

Your explanatory va

50
40
30
20
10
0

0.5

1.5

2.5

Your explanatory va

.5

(x2)
45.35

2.5

(y2)
9778

3.5

avg(x)
2.5

4.5

planatory variable (units)

.5

2.5

3.5

4.5

planatory variable (units)

SIMPSON'S DIVERSITY INDEX


Steps to using Excel to do Simpson's diversity index:
Type in the number of individuals for each species in the gray boxes
The number in yellow is the Simpson's Diversity Index (D).
Diversity is a measure of the number of species (richness) and
how evenly spread out the individuals are among the species (evenness)

Simpson's Diversity
Index [actually 1-D]

N=
Richness =
number
number
number
number
number
number
number
number
number
number
number
number
number
number
number
number
number
number
number
number
number
number
number
number
number
number
number
number
number
number
number
number
number

of
of
of
of
of
of
of
of
of
of
of
of
of
of
of
of
of
of
of
of
of
of
of
of
of
of
of
of
of
of
of
of
of

species
species
species
species
species
species
species
species
species
species
species
species
species
species
species
species
species
species
species
species
species
species
species
species
species
species
species
species
species
species
species
species
species

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33

Area 1

Area 2

64.8

58.1

14
4

73
5

This is calculated for you and is total number of individu


This is calculated for you and is total number of species

1
2
3

8
12
45
2

You type in these


numbers in the gray
boxes which are
the number of
individuals of
each species (no zeroes)

8
6

Percent chance that two individuals pulled random


the community will not be from the same species.
The higher the number, the more diverse the com

number
number
number
number
number
number
number

of
of
of
of
of
of
of

species
species
species
species
species
species
species

34
35
36
37
38
39
40

ividuals pulled randomly from


om the same species.
more diverse the community.

total number of individuals sampled.


total number of species sampled.

THIS PAGE DOES CALCULATIONS FOR THE CHI-SQUARE

IF TOTAL IS GREATER THAN 3.84 (df=1)


THEN THERE IS SIGNIFICANT DIFFERENCE
Categories

Obs

Exp

(O-E)2

(O-E)2/E

120

135

225

1.67

150

135

225

1.67

total

270

270

TOTAL

3.33

Page

Вам также может понравиться