Annova and Chi-Square
Annova and Chi-Square
Annova and Chi-Square
QUESTION 1
Mathematics Department
IPGM, Kampus Tuanku Bainun
A researcher wishes to determine whether there is a relationship between the gender
of an individual and the amount of alcohol consumed. A sample of 68 people is
selected, and the following data in Table 1 are obtained.
Alcohol consumption
Gender Low Moderate High Total
Male 10 9 8 27
Female 13 16 12 41
Total 23 25 20 68
1. Hypothesis testing
Ho: There is no relationship between the gender of an individual and the amount of
alcohol consumed.
HI: There is a relationship between the gender of an individual and the amount of
alcohol consumed.
O E O–E (O – E) 2 (O – E) 2 ÷ E
10 9.13 0.87 0.76 0.08
9 9.93 - 0.93 0.86 0.09
8 9.13 0.06 0.004 0.0005
13 13.87 - 0.87 0.76 0.05
16 15.07 0.97 0.94 0.06
12 12.06 - 0.06 0.004 0.0003
∑ = Χ2 0.2808
We can find the critical value in the chi-square distribution table. From the chi-square
table, find the row of level of significant 0.10 and the column of degree of freedom 2.
7. Conclusion
0.2808 < 4.605. Do not reject Ho at level of significant 0.10. There is no relationship
between the gender of an individual and the amount of alcohol consumed.
STATISTIC
QUESTION 2
Mathematics Department
IPGM, Kampus Tuanku Bainun
A researcher wishes to try three different techniques to lower the blood pressure of
individuals diagnosed with high blood pressure. The subjects are randomly assigned
to three groups; the first group takes medication, the second group exercises, and
the third group follows a special diet. After four weeks, the reduction in each person’s
blood pressure is recorded. The data are shown in Table 1 below.
A) At α = 0.05, carry out a one-way ANNOVA test by hand to test the claim if there is
no difference among the means.
1. Hypothesis testing
Ho: µ1 = µ2 = µ3
HI: There is at least one mean differ from others.
The calculation:
Medication
x = (10 + 12 + 9 + 15 + 13) ÷ 5
= 11.80
s = (x-x)2n-1
= 10-11.802+ 12-11.802+ 9-11.802+ 15-11.802+ 13-11.8024
= 2.39
s2 = 2.392 = 5.70
Exercises
x = (6 + 8 + 3 + 0 + 2) ÷ 5
= 3.80
s = (x-x)2n-1
= 6-3.802+ 8-3.802+ 3-3.802+ 0-3.802+ 2-3.8024
= 3.19
s2 = 3.192 = 10.20
Diet
x = (5 + 9 + 12 + 8 + 4) ÷ 5
= 7.60
s = (x-x)2n-1
= 5-7.602+ 9-7.602+ 12-7.602+ 8-7.602+ 4-7.6024
= 3.21
s2 = 2.392 = 10.30
xgrand = (10 + 12 + 9 + 15 + 13 + 6 + 8 + 3 + 0 + 2 + 5 + 9 + 12 + 8 + 4) ÷ 15
= 7.73
s2 grand = 4.352
= 18.92
We can find the critical value in the F distribution table. From the F table, find the dfM
2 and dfR 12.
F = MSM ÷ MSR
= 80 ÷ 8.75
= 9.14
8. Summary Table
Source SS df MS F
Model 160 2 80 9.14
Residual 105 12 8.75
Total 265 14
9. Conclusion
F = 9.14
Critical value for F (2,12) = 3.89
9.14 > 3.89. HO rejected. There is enough evidence to reject the claim that there is no
difference among the means.
B) Repeat the ANNOVA test from (A) using Microsoft Excel.
First, insert the data given in the cell as shown above. The question asked to carry
out a one-way ANNOVA test by Microsoft Excel to test the claim if there is no
difference among the means.
In order to carry out the one-way ANNOVA, first we must find the mean for every
class (Medication, Exercises, and Diet).
The way to find the mean for every class is shown as below.
In order to calculate the mean, first key in the “=” symbol and also key in the function
for mean, that is AVERAGE followed by “(“
Then, select the data for the table that we want to find the mean, which is the
Medication. Then, key in the “)” symbol and the result is shown as below.
Then, press Enter and the mean value for the Medication table is calculated as
shown below.
To cut time in finding the other 2 tables, put your cursor at the right bottom of the
mean cell as shown below.
Then, drag along until the Diet table as shown below.
Then select the data which we want to find the standard deviation. Then key in the “)”
symbol at the end of the function as shown below.
Then, press enter and Excel will calculate the function for you.
We want to cut some time in finding all the standard deviation. So, we need to repeat
the same way that we use in finding the mean.
Drag the standard deviation value’s cell until the Diet cell.
Then, let go the cursor and the result shown below.
In order to calculate the variance, first key in the “=” symbol in a cell and also key in
the function for variance, that is VAR followed by “(“ as shown below.
Then, select the data that we want to calculate the variance as shown below.
The next step is to find the grand mean, grand standard deviation, and the grand
variance. To find the three of it, we still using the same function (AVERAGE for mean,
STDEV for standard deviation and VAR for variance). But this time, we need to
change the data range.
For the AVERAGE function, after typing the function, select the whole data from C5 to
E9 as shown.
Then, press Enter and the result as shown. For grand standard deviation, using the
same data range, we change the function to STDEV as shown.
Then, press Enter and the result as shown above. For grand variance, using the
same data range, we change the function to VAR as shown.
Then, press Enter and the result as shown.
To find the one-way ANNOVA, we will use Data Analysis that can be found in Data.
Click the Data Analysis and a pop-up menu will come out.
Choose the Anova: Single Factor because we are carrying out the one-way ANOVA.
Then, a pop-up menu will appear as shown.
In the Input Range, select the data range from C5 to E9. Then set the Alpha to 0.05
as the question ask.
In the Output Options, if you want the output in the same worksheet, click the output
range and click which cell you one to state the output. But I want to put in on a new
worksheet. So, click the New Worksheet Ply, and name it. I name it with ANNOVA.
The output range is as shown below.
9.14 > 3.89. HO rejected. There is enough evidence to reject the claim that there is no
difference among the means.
Bibliography
Mathematics Department
IPGM, Kampus Tuanku Bainun