Sie sind auf Seite 1von 3

Excel can be used to Calculate a P-Value for a Chi Square Goodness of Fit Test

See next tab to enter data and actually calculate values!

The test is conducted with at least 2 set of values for example:

Present
Absent
Totals

Observed
1995
2003
8
16
12
4
20
20

2=

2=

1.333333

12

12

1 5

12

12

1.333333

Totals
24
16
40

+
+

Expected
1995
2003
12
12
8
8

1 2

+
+

The expected value for any cell =


row total for that cell column total for the cell
the grand total of rows and cells.
For example, for 1995 Present: (24 * 20) / 40 = 12

6.666667

Then, compare calculated value to "critical" (or table) value in a chi-square table
In this example. 6.7 is > than a critical value for of 5% of 3.841 and is also > critical value for an of 10% of 2.706
Therefore, reject the null hypothesis that "nothing is going on" and conclude that there was a change from 1995 to 2003

Excel also has a feature to calculate the probability of a significant Chi-Square value
With Excel "ChiTest" 0.009823 = the probability (or alpha) of the Chi-Square value
For alpha of 5% if the ChiTest value is < 0.05 then reject null hypothesis that "nothing is going on"
For alpha of 10% if the ChiTest value is < 0.1 then reject null hypothesis that "nothing is going on"

Enter Data below to Calculate a P-Value for a Chi Square Goodness of Fit Test
CHANGE the 1's to your values
For example:

Observed

Year 1
Present
Absent
Totals

Expected

Year 2
1
1
2

1
1
2

Totals Year 1 Year 2


2
1
1
2
1
1
4

Values in Blue will be calculat


2=

Then compare calculated value to "critical" (or table) value in a chi-square table
Compare

0 to a critical value for of 5% of 3.841 of 10% of 2.706 or look in Chi-Square Cr

Reject the null hypothesis that "nothing is going on" if the Calculated value is > the Critical Value

With Excel "ChiTest":

1 = the probability (or alpha) of the Chi-Square value

For alpha of 5%, if the ChiTest value is < 0.05 then reject null hypothesis that "nothing is goi
For alpha of 10%, if the ChiTest value is < 0.1 then reject null hypothesis that "nothing is goi

Calculations a P-Value for a 3 by 2 Chi Square Goodness of Fit Test


CHANGE the 1's to your values
Observed

Year 1
Present
Absent
Totals

2=

0
0

Year 2
1
1
2

+
+

Expected

Year 3
1
1
2

0
0

1
1
2

+
+

Totals Year 1 Year 2 Year 2


2
1
1
1
2
1
1
1
4
Values in Blue will b
0
0

Then compare calculated value to "critical" (or table) value in a chi-square table
Compare

0 to a critical value for of 5% of 5.991 of 10% of 4.605 or look in Chi-Square Cr

Reject the null hypothesis that "nothing is going on" if the Calculated value is > the Critical Value

With Excel "ChiTest":

1 = the probability (or alpha) of the Chi-Square value


For alpha of 5%, if the ChiTest value is < 0.05 then reject null hypothesis that "nothing is goi
For alpha of 10%, if the ChiTest value is < 0.1 then reject null hypothesis that "nothing is goi

s of Fit Test

n Blue will be calculated


0

6 or look in Chi-Square Critical Value Table

> the Critical Value

thesis that "nothing is going on"


thesis that "nothing is going on"

Values in Blue will be calculated

5 or look in Chi-Square Critical Value Table

> the Critical Value

thesis that "nothing is going on"


thesis that "nothing is going on"

Das könnte Ihnen auch gefallen