kimwakinelsonblr
kimwakinelsonblr
Untitled
5 posts
Don't wanna be here? Send us removal request.
kimwakinelsonblr · 5 years ago
Text
Assig Testing nment 4 ANOVA TEST and comparing three variety of tomatoes for yield Three variety of tomatoes are being compared for yield. The experiment was carried out by assigning each variety at random to four different plots. One variety of potato in each of the 4 locations. Tomato type (3 levels) and location (4 levels). The plot is as follows Tomato Type P-1 P-2 P-3 YIELD Y-1 18 13 12 Y-2 20 23 21 Y-3 14 12 9 Y-4 11 17 10 Step 1: Define hypothesis H0: μ1 = μ2 = μ3 = μ4 the population means of the tomato types are equal. H1: μ1 ≠ μ2 ≠ μ3≠ μ At least one mean is different. WE can reject the null hypothesis and accept alternative hypothesis Step 2: Calculate means of rows and columns Tomato Type (B) P-1 P-2 P-3 Total Mean YIELD (A) Y-1 18 13 12 43 14.33 Y-2 20 23 21 64 21.33 Y-3 14 12 9 35 11.66 Y-4 11 17 10 38 12.66 Total 63 65 52 180 15 (Group Mean Mean 15.75 16.25 13 Step 3: Frame the ANOVA Summary table Step 4: Calculate the DF (degree of freedom) DF for yield Number of rows –1 = 4 –1 = 3 DF for tomato Number of columns –1 = 3 –1 = 2 DF total Total number of observations in dataset –1 = 12 –1 = 11 DF residual DF total – (DF yield + DF tomato) = 11 –5 = 6 Step 5: Calculate SS (sum of squares) SS yield = Variance (14.33, 21.33, 11.66, 12.66)2 x 12= 171.44 n = 3 (no. of columns) 15 = group mean 3(14.33-15)2+3(21.33-15)2+3(11.66-15)2+3(12.66-15)2 1.34+120.2+33.46+16.43=171.44 SS tomato = Variance (15.75, 16.25, 13)2 x 12= 24.5 n = 4 (no. of rows) 15 = group mean 4(15.75-15)2+4(16.25-15)2+4(13-15)2 2.25+6.25+16=24.5 SS total = Standard deviation2 x 11= 238 All variety of tomatoes (18,20,14,11,13,23,12,17,12,21,9,10) 15 = group mean SStotal = (18-15)2+(20-15)2+(14-15)2+(11-15)2+(13-15)2+(23-15)2+(12-15)2+(17-15)2+(12- 15)2+(21-15)2+(9-15)2+(10-15)2 = 9+25+1+16+4+64+9+4+9+36+36+25 =238 SS residual = SS total – (SS yield + SS tomato) = 238 – (171.44 + 24.5) = 42.39 Step 6: Calculate MS (mean square) The formula of MS is as follows MS = SS ÷ DF Therefore, MS for each row is calculated as follows. MS yield = SS yield ÷ DF yield = 171.44 ÷ 3 = 57.14 MS potato = SS tomato ÷ DF tomato = 24.5 ÷ 2 = 12.25 MS residual = SS residual ÷ DF residual = 42.17 ÷ 6 = 7.03 Step 7: Calculate F (F value) F yield = MS yield ÷ MS residual = 57.14 ÷ 7.03 = 8.12 F tomato = MS tomato ÷ MS residual = 12.55 ÷ 7.03 = 1.74 Step 8: Calculate F-critical values Check the critical F values in F table (p=0.05) with calculated DFs. F-critical = F 0.05, DF effect (F table column), DF residual (F table row) Therefore, F-critical yield = F0.05, 3, 6= 4.76 F-critical tomato = F0.05, 2, 6= 5.14 DF SS MS F F-critical P value Yield 3 171.44 57.14 8.12 4.76 (3,6) 0.04994 Tomato 2 24.5 12.25 1.74 5.14 (2,6) 0.05006 Residual 6 42.17 7.03 7.03 Total 11 238 F yield> F-critical yield (H1) Reject null hypothesis and accept alternative hypothesis. Yield has significant effect on the dependent variable. The result is significant at p < .05 F potato <F-critical tomato (H0) Accept null hypothesis and reject alternative hypothesis. Tomato has no significant effect on the dependent variable. The result is not significant at p < .05 Assig Testing nment 4 ANOVA TEST and comparing three variety of tomatoes for yield Three variety of tomatoes are being compared for yield. The experiment was carried out by assigning each variety at random to four different plots. One variety of potato in each of the 4 locations. Tomato type (3 levels) and location (4 levels). The plot is as follows Tomato Type P-1 P-2 P-3 YIELD Y-1 18 13 12 Y-2 20 23 21 Y-3 14 12 9 Y-4 11 17 10 Step 1: Define hypothesis H0: μ1 = μ2 = μ3 = μ4 the population means of the tomato types are equal. H1: μ1 ≠ μ2 ≠ μ3≠ μ At least one mean is different. WE can reject the null hypothesis and accept alternative hypothesis Step 2: Calculate means of rows and columns Tomato Type
0 notes
kimwakinelsonblr · 5 years ago
Text
Assignment
Assignment 3 on Pearson’s correlation coefficient
TEST FOR SIGNIFICANCE OF PEARSON’S CORRELATION COEFFICIENT (r)
Using the distribution of business and mathematics scores of SS2 students of Nazarene International Secondary School below,
(i) Compute the Pearson’s Product Moment Correlation Coefficient (r),
(ii) Interpret your result, and
Business and mathematics scores of SS2 students of Rusinga Secondary School
business
9
12
13
15
11
11
10
12
13
9
17
mathematics
33
46
61
59
52
39
37
41
57
31
66
business (x)
mathematics (y)
xy
x2
y2
9
33
297
81
1089
12
46
552
144
2116
13
61
793
169
3721
15
59
885
225
3481
11
52
572
121
2704
11
39
429
121
1521
10
37
370
100
1369
12
41
492
144
1681
13
57
741
169
3249
9
31
249
81
961
17
66
1122
289
4356
Σx= 132
Σy= 522
Σxy= 6532
Σx2= 1644
Σy2= 26247
From our table:
Σx = 132
Σy = 522
Σxy = 6532
Σx2 = 1644
Σy2 = 26247
📷n is the sample size, in our case = 11
Substituting, we have r= 2948
R=0.90065
.
Second, the computed 0.96 was transformed to the t-distribution using the formula
📷
t = 0.9 📷
= 0.9 × 6.19
= 5.57
Third, the degrees of freedom (df) was found thus: df = (n – 2) = 11 – 2 = 9
A positive correlation coefficient of 0.96 implies that business and mathematics are positively related. In other words, a student who scores highly in business is likely to score highly in mathematics and vice versa
0 notes
kimwakinelsonblr · 5 years ago
Text
Assignment 2 Chi square
JOB SATISFACTORY LEVEL
A survey of 200 workers was conducted regarding their education (school graduates or less, college graduates, university graduates) and the level of their job satisfaction (low, medium, and high). These are the results:
Low Medium High
School 20 35 25
College 17 33 20
University 11 18 21
We will test at a 2.5% level of significance whether the level of job satisfaction depends on the level of education.
Calculating Chi-square
∑ χ2 i-j= (O – E) 2/E
Where:
O = Observed (the actual count of cases in each cell of the table)
E = Expected value (calculated below)
χ2 = the cell Chi-square value
∑ χ2 = Formula instruction to sum all the cell Chi square values
χ2 i-j = i-j is the correct notation to represent all the cells, from the first cell (i) to the last cell (j); in this case Cell 1 (i) through Cell 9 (j).
The first step is calculating χ2, the sum of each row and sum of each column.
Low Medium High Row Sum
School 20 35 25 80
College 17 33 20 70
University 11 18 21 50
Row Column 48 86 66 200
N=200
Second step is calculating expected values.
E= MR × MC/n
Where:
E = represents the cell expected value,
MR = represents the row marginal for that cell,
MC = represents the column marginal for that cell,
n = represents the total sample size.
Specifically, for each cell, its row marginal is multiplied by its column marginal, and that product is divided by the sample size.
Cell 1 (80 x 48)/200= 19.2 Cell 5 (70 x 86)/200 = 30.1 Cell 9 (50 x 66)/200 = 16.5
Cell 2 (70 x 48)/200 = 16.8 Cell 6 (50 x 86)/200 = 21.5
Cell 3 (50 x 48)/200= 12 Cell 7 (80 x 66)/200 = 26.4
Cell 4 (80 x 86)/200= 34.4 Cell 8 (70 x 66)/200 = 23.1
Once the expected values have been calculated, the cell χ2 values are calculated with the following formula:
E= (O – E)2 /E
C1 χ2= (20-19.2)2/19.2 C4 χ2= (35-34.4)2/34.4 C7 χ2 = (25-26.4)2/26.4
= 0.03 = 0.01 = 0.07
C2 χ2= (17-16.8)2/16.8 C5 χ2 = (33-30.1)2/30.1 C8 χ2 = (20-23.1)2/23.1
= 0.0023 = 0.28 = 0.42
C3 χ2 = (11-12)2/12 C6 χ2 = (18-21.5)2/21.5 C9 χ2 = (21-16.5)2/16.5
= 0.08 = 0.57 = 1.23
Low Medium High Row Sum
School 19.2 (0.03) 34.4 (0.01) 26.4 (0.07) 80
College 16.8 (0.0023) 30.1 (0.28) 23.1 (0.42) 70
University 12 (0.08) 21.5 (0.57) 16.5 (1.23) 50
Row Column 48 86 66 200
Summed to obtain the χ2 statistic for the table
(0.03+0.0023+0.08+0.01+0.28+0.57+0.07+0.42+1.23)
χ2= 2.69
The degrees of freedom for a χ2 table are calculated with the formula:
(Number of rows -1) x (Number of columns -1).
3 x 3 table
(3-1) x (3-1)
df=4
• Given that p = 0.025 and df = 4, we see that the critical value 𝜒2 (4, 0.025) = 11.14 and thus our test statistic 𝜒 2 = 2.694 is in the region of acceptance.
• We can also see from the table that the p-value corresponding to our test statistic is between 0.5 and 0.75, and thus it is bigger than p.
• Therefore, we can state that:
Accept the null hypothesis (Ho) and
Reject the (H1) alternate hypothesis.
(Ho) The level of job satisfaction and the level of education are independent.
(H1) The level of job satisfaction and the level of education are not independent
0 notes
kimwakinelsonblr · 5 years ago
Text
Assignment 2
0 notes
kimwakinelsonblr · 5 years ago
Text
Assignment 1 ANOVA TEST
Testing and comparing three variety of tomatoes in the field
Three variety of tomatoes are being compared for yield. The experiment was carried out by assigning each variety at random to four different plots. One variety of tomato in each of the 4 locations. Tomato type (3 levels) and location (4 levels). The plot is as follows
Tomato Type
P-1 P-2 P-3
YIELD Y-1 18 13 12
Y-2 20 23 21
Y-3 14 12 9
Y-4 11 17 10
Step 1: Define hypothesis
H0: μ1 = μ2 = μ3 = μ4 the population means of the tomato types are equal.
H1: μ1 ≠ μ2 ≠ μ3≠ μ At least one mean is different.
WE can reject the null hypothesis and accept alternative hypothesis
Step 2: Calculate means of rows and columns
Tomato Type (B)
P-1 P-2 P-3 Total Mean
YIELD (A) Y-1 18 13 12 43 14.33
Y-2 20 23 21 64 21.33
Y-3 14 12 9 35 11.66
Y-4 11 17 10 38 12.66
Total 63 65 52 180 15 (Group Mean
Mean 15.75 16.25 13
Step 3: Frame the ANOVA Summary table
Step 4: Calculate the DF (degree of freedom)
DF for yield Number of rows –1 = 4 –1 = 3
DF for tomato Number of columns –1 = 3 –1 = 2
DF total Total number of observations in dataset –1 = 12 –1 = 11
DF residual DF total – (DF yield + DF tomato) = 11 –5 = 6
Step 5: Calculate SS (sum of squares)
SS yield = Variance (14.33, 21.33, 11.66, 12.66)2 x 12= 171.44
n = 3 (no. of columns)
15 = group mean
3(14.33-15)2+3(21.33-15)2+3(11.66-15)2+3(12.66-15)2
1.34+120.2+33.46+16.43=171.44
SS tomato = Variance (15.75, 16.25, 13)2 x 12= 24.5
n = 4 (no. of rows)
15 = group mean
4(15.75-15)2+4(16.25-15)2+4(13-15)2
2.25+6.25+16=24.5
SS total = Standard deviation2 x 11= 238
All variety of tomatoes (18,20,14,11,13,23,12,17,12,21,9,10)
15 = group mean
SStotal = (18-15)2+(20-15)2+(14-15)2+(11-15)2+(13-15)2+(23-15)2+(12-15)2+(17-15)2+(12- 15)2+(21-15)2+(9-15)2+(10-15)2
= 9+25+1+16+4+64+9+4+9+36+36+25
=238
SS residual = SS total – (SS yield + SS tomato) = 238 – (171.44 + 24.5) = 42.39
Step 6: Calculate MS (mean square)
The formula of MS is as follows
MS = SS ÷ DF
Therefore, MS for each row is calculated as follows.
MS yield = SS yield ÷ DF yield = 171.44 ÷ 3 = 57.14
MS tomato = SS tomato ÷ DF tomato = 24.5 ÷ 2 = 12.25
MS residual = SS residual ÷ DF residual = 42.17 ÷ 6 = 7.03
Step 7: Calculate F (F value)
F yield = MS yield ÷ MS residual = 57.14 ÷ 7.03 = 8.12
F potato = MS tomato ÷ MS residual = 12.55 ÷ 7.03 = 1.74
Step 8: Calculate F-critical values
Check the critical F values in F table (p=0.05) with calculated DFs.
F-critical = F 0.05, DF effect (F table column), DF residual (F table row)
Therefore,
F-critical yield = F0.05, 3, 6= 4.76
F-critical tomato = F0.05, 2, 6= 5.14
DF SS MS F F-critical P value
Yield 3 171.44 57.14 8.12 4.76 (3,6) 0.04994
Tomato 2 24.5 12.25 1.74 5.14 (2,6) 0.05006
Residual 6 42.17 7.03 7.03
Total 11 238
F yield> F-critical yield (H1)
Reject null hypothesis and accept alternative hypothesis. Yield has significant effect on the dependent variable. The result is significant at p < .05
F tomato <F-critical tomato
Accept null hypothesis and reject alternative hypothesis. Tomato has no significant effect on the dependent variable. The result is not significant at p < .05
1 note · View note