STATISTIC 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.
Gender
Low
Male Female Total
10 13 23
Alcohol consumption Moderate High 9 16 25
8 12 20
Total 27 41 68
At α = 0.10, can the researcher conclude that alcohol consumption is related to gender? 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. 2. Level of significant, α = 0.10 3. Calculated the expected values. E (row × column) E1×1
= (total row × total column) ÷ n
= (27 × 23) ÷ 68
E2×1
= 9.13 E3×1
= (27 × 20) ÷ 68
= 9.93 E1×2
= 9.13 E2×2
= (41 × 25) ÷ 68 = 15.07
In table summary:
= (27 × 25) ÷ 68
= (41 × 23) ÷ 68 = 13.87
E1×1
= (41 × 20) ÷ 68 = 12.06
Gender
Alcohol consumption Low Moderate
High
Total
Male Female Total
10 (9.13) 13 (13.87) 23
8 (9.13) 12 (12.06) 20
27 41 68
9 (9.93) 16 (15.07) 25
4. Calculate the Χ2 in table summary
O 10 9 8 13 16 12
E 9.13 9.93 9.13 13.87 15.07 12.06
(O – E) 2 0.76 0.86 0.004 0.76 0.94 0.004
O–E 0.87 - 0.93 0.06 - 0.87 0.97 - 0.06 ∑ = Χ2
(O – E) 2 ÷ E 0.08 0.09 0.0005 0.05 0.06 0.0003 0.2808
5. Find the degree of freedom Degree of freedom, df
= (number of rows – 1) (number of columns – 1) = (3 – 1) (2 – 1) = (2) (1) =2
6. Critical value for level of significant = 0.10 and degree of freedom = 2 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.
df 1 2 3 4 5
0.05 3.841 5.991 7.815 9.488 11.070
0.01 6.635 9.210 11.345 13.277 15.086
0.10 2.706 4.605 6.251 7.779 9.236
0.995 --0.010 0.072 0.207 0.412
0.99 --0.020 0.115 0.297 0.554
So, the critical value for level of significant 0.10 and degree of freedom 2 is 4.605.
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. Medication 10 12 9 15
Exercise 6 8 3 0
Diet 5 9 12 8
13
2
4
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. 2. Calculate mean, standard deviation, and variance. Medication 10 12 9 15 13 x = 11.80 s = 2.39 s2 = 5.70
Exercise 6 8 3 0 2 x = 3.80 s = 3.19 s2 = 10.20
Diet 5 9 12 8 4 x = 7.60 s = 3.21 s2 = 10.30
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
Calculation for grand mean, grand standard deviation, grand variance: xgrand
= (10 + 12 + 9 + 15 + 13 + 6 + 8 + 3 + 0 + 2 + 5 + 9 + 12 + 8 + 4) ÷ 15 = 7.73
s grand = 6-3.802+ 8-3.802+ 3-3.802+ 0-3.802+ 2-3.8025-7.602+ 9-7.602+ 127.602+ 8-7.602+ 4-7.60210-11.802+ 12-11.802+ 9-11.802+ 15-11.802+ 1311.80214
= 4.35 s2 grand = 4.352 = 18.92 3. Calculate the degree of freedom for Model, Residual, and Total. Model degrees of freedom, dfM dfM
=k–1 =3–1 =2
Residual degrees of freedom, dfR dfR
= dfgroup1 + dfgroup2 + dfgroup3 = (n1 – 1) + (n2 -1) + (n3 – 1) = (5 – 1) + (5 – 1) + (5 – 1)
=4+4+4 = 12 Total degrees of freedom, dfT dfT
= (N – 1) = (15 – 1) = 14
4. Find the critical value for F(2, 12) We can find the critical value in the F distribution table. From the F table, find the dfM 2 and dfR 12. The critical value = 3.89 Total Sum of Square, SST SST
= ∑ (xi – xgrand) 2 = s2 grand (N – 1) = 18.92 (15 – 1) = 18.92 (14) = 265
Model Sum of Square, SSM SSM
= ∑ ni(xi - xgrand) 2 = 5(11.80 – 7.73) 2 + 5(3.80 – 7.73) 2 + 5(7.60 – 7.73) 2 = 5(16.56) + 5(15.44) + 5(0.02) = 160
Residual Sum of Square, SSR SSR
= s2group1 (n1 – 1) + s2group2 (n2 – 1) + s2group3 (n3 – 1) = 5.70 (4) + 10.20 (4) + 10.30 (4) = 22.8 + 40.8 + 41.2 = 104.8 = 105
5. Double check SST
= SSM + SSR = 160 + 105
dfT
= dfM + dfR = 2 + 12
= 265
= 14
6. Calculate the Mean Squared Error MSM = SSM ÷ dfM = 160 ÷ 2 = 80 MSR
= SSR ÷ dfR = 105 ÷ 12 = 8.75
7. Calculate the F-Ratio F
= MSM ÷ MSR = 80 ÷ 8.75 = 9.14
8. Summary Table Source Model Residual Total
SS 160 105 265
9. Conclusion F
= 9.14
Critical value for F (2,12) = 3.89
df 2 12 14
MS 80 8.75
F 9.14
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, let go the cursor and the result as shown below.
Now we have the mean set for the contingency table. Second, we need to find the standard deviation for each table.
In order to calculate the standard deviation, first key in the “=” symbol in a cell and also key in the function for standard deviation, that is STDEV followed by “(“
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.
Thirdly, we need to find the Variance for each table. 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.
Then press Enter and Excel will calculate the value.
Apply the same technique or way in order to cut some time in finding the others variance.
Drag the cursor until the Diet cell.
Release the cursor and we will get the other variance values. Now, we have the mean, standard deviation and the variance for all tables. 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 http://www.qualityadvisor.com/sqc/formulas/chi_square_f.php taken on 24 March 2009 http://people.richland.edu/james/lecture/m170/tbl-chi.html taken on 24 March 2009 http://home.comcast.net/~sharov/PopEcol/tables/chisq.html taken on 24 March 2009 http://org.elon.edu/econ/sac/chisquare.htm taken on 24 March 2009 http://facstaff.elon.edu/deloach/tiemann/ch4.htm#CHI taken on 24 March 2009
STATISTIC APPENDICES
Mathematics Department IPGM, Kampus Tuanku Bainun