0% found this document useful (0 votes)
12 views

Assignment 3

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views

Assignment 3

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 20

Assignment 3

Al Madani Mohammed
(300290797)

ADM2304

16 November 2024

ADM 2781 A – Habiletés de communications d'affaires – Plan de cours – Page 1 of 20


Question 1 :

a) The experimental design is a one way\ one factor ANOVA


b)

According to the boxplots, the assumptions of Anova are met since:

-The assumption of normality is assessed by comparing the positions of the mean and
the median in each group. In the boxplot, the mean and median for all four drug
groups are fairly close, indicating that the distributions are reasonably symmetric.
Therefore, the normality assumption appears to be satisfied.

-The assumption of equal variance is assessed by eyeballing the distances between the
lower and upper whiskers for each group. These distances appear reasonably equal
across the four drug groups, suggesting that the assumption of equal variance is also
met.
c)

Column statistics:

Column n Mean Std. Dev. Std. Error

Drug 1 6 8.3333333 2.5033311 1.0219806

Drug 2 6 8 1.8973666 0.77459667

Drug 3 6 12 2.607681 1.0645813

Drug 4 6 11 1.8973666 0.77459667

ANOVA table

Source DF SS MS F-Stat P-value

Columns 3 70 23.333333 4.6052632 0.0132

Error 20 101.33333 5.0666667

Total 23 171.33333

We create 2 non-overlapping situations:

Null hypothesis H0: There is no difference in the average weight loss among the four
medications (μ1=μ2=μ3=μ4)

Alternative hypothesis HA: At least two medications have different average weight loss

- Test statistic: According to the statcrunch Anova Table:

F-ratio= 4.6

-Decision rule:

*Critical value approach: The F critical value at df= 3, 20 and level of significance α =
0.05:

The critical value of F = 3,10

Since F-ratio=4.6 > Fcv=3.10, we reject the null hypothesis implying that there is a
significant difference in between average weight loss among the four medications
*P-value approach:

From the ANOVA table, the p-value = 0.0132. If p≤α, we reject H0.

Since p=0.0132<0.05, we reject the null hypothesis.

-Conclusion: We reject the null hypothesis (H0H_0H0) that the average weight loss is
the same for all four medications. This means there is sufficient evidence to conclude
that at least two medications differ significantly in their average weight loss at the 5%
significance level.
d)

SSE= Σ ( ¿−1 ) Si∗2= (6-1)x2.50*2+(6-1)x1.897*2+(6-1)x2.60*2+(6-1)x1.897*2= 101.14


(n=6 for the 4 different drugs)

MSE= SSE\ N-K = 101.14\ 24-4= 5.075=5.06 (N=24 and K=4)

The manually calculated MSE=5.06 perfectly with the result provided in the statcrunch
anova table, where the MSE is also 5.06. This confirms that the manual calculations for
the pooled variance are accurate and consistent with the statcrunch output, validating
the correctness of the ANOVA results.
e) We determine the number of pairs of medications to be compared:

J= ( k2) = k! \ 2! (k-2)!
=( 42) = 4!\ 2! (4-2) = 6
We calculate the standard error of ¯yi − y¯j :
S¯yi − y¯j= √ MSEx (1¿ +1¿) =√ 5.06 x (1¿+ 1¿)
-

= 1.2987=1.3

-We calculate our α ∗ with excel

Excel formula =TINV(probability, deg_freedom) =TINV(.05/6, 20)

= 2,271119

-We calculate our Confidence interval:

- μ1=μ2: (¯y1 − y¯2)+-t α ∗ (SE¯y1 − y¯2)= (8.333-8)+- 2.27*1.3= (-2.621, 3.281)

*The confidence intervalle captures 0, so we conclude that there’s not a significant


difference between drug 1 and drug 2.

- μ1=μ3: (¯y1 − y¯3)+-t α ∗ (SE¯y1 − y¯3)= (8.333-12)+- 2.27*1.3=(-6.618, -0,716)

*The confidence intervalle doesn’t capture 0, so we conclude that there’s a significant


difference between drug 1 and drug 3.

- μ1=μ4: (¯y1 − y¯4)+-t α ∗ (SE¯y1 − y¯4)= (8.333-11)+- 2.27*1.3=(-5,618, 0,284)

*The confidence intervalle capture 0, so we conclude that there’s not a significant


difference between drug 1 and drug 4.

- μ2=μ3: (¯y2 − y¯3)+-t α ∗ (SE¯y2 − y¯3)= (8-12)+- 2.27*1.3=(-6,27 , -1.049)

The confidence intervalle doesn’t capture 0, so we conclude that there’s a significant


difference between drug 2 and drug 3.

- μ2=μ4: (¯y2 − y¯4)+-t α ∗ (SE¯y2 − y¯4)= (8-11)+- 2.27*1.3=(-5,951, -0,049)


The confidence intervalle doesn’t capture 0, so we conclude that there’s a significant
difference between drug 2 and drug 4.

- μ3=μ4: (¯y3 − y¯4)+-t α ∗ (SE¯y3 − y¯4)= (12-11)+- 2.27*1.3=(-1,951+3,951)

*The confidence intervalle capture 0, so we conclude that there’s not a significant


difference between drug 3 and drug 4.

We conclude that there’s a significant difference in average weight loss between drug 3
and all the other drugs (drug 1, drug 2 and drug 4), but not between the other pairs.

f)

-The hypothesis:

Null Hypothesis H0: The populations distributions for the weight loss of the four
medications are identical.

Alternative Hypothesis HA: At least one population distribution differs in location


from the others.

-Calculation of ranks:

Drug
1 Rank Drug 2 Rank Drug 3 Rank Drug 4 Rank
5 1.5 8 7 10 13 13 21.5
12 19.5 7 4 11 17 13 21.5
9 9.5 10 13 9 9.5 11 17
7 4 5 1.5 14 23 8 7
10 13 10 13 16 24 10 13
7 4 8 7 12 19.5 11 17
T1 51.5 T2 45.5 T3 106 T4 97

Combined sample (sorted) Rank (initial) Rank (Final)


5 1 1.5
5 2 1.5
7 3 4
7 4 4
7 5 4
8 6 7
8 7 7
8 8 7
9 9 9.5
9 10 9.5
10 11 13
10 12 13
10 13 13
10 14 13
10 15 13
11 16 17
11 17 17
11 18 17
12 19 19.5
12 20 19.5
13 21 21.5
13 22 21.5
14 23 23
16 24 24

Test statistic

H=12\ N(N+1) i=1 ∑ Ti∗2¿ −3(N+1)


Where: N= 24 and k= 4

n1=n2=n3=n4=6

T1=51.5, T2=45.5, T3=106.0, T4=97

H= (12\(24x25) (51,5*2\6 + 45.5*2 \6+ 106*2\6+ 97*2\6) – 3x25

H=9.71

-Critical value: From the chi-square distribution table with k−1=4-1=3 degrees of
freedom and α=0.05:

Χ*2 (0.05,3)=7.815

-Decision: Since H=9.71>7.815, we reject the null hypothesis.

Conclusion: We reject the null hypothesis, which implies that there is a significant
difference in the distributions of weight loss among the four medications.
g)

Kruskal-Wallis results:

Data stored in separate columns.


Results adjusted for ties :
DF Chi-Square P-value

3 9.710321 0.0212

Summary statistics :

Column n Median Ave. Rank


Drug 1 6 8 8.5833333
Drug 2 6 8 7.5833333
Drug 3 6 11.5 17.666667
Drug 4 6 11 16.166667

-P-value approach: From the STATCRUNCH output, the Kruskal-Wallis test statistic is
provided, and the corresponding p-value is p=0.212

Since p=0,0212>0.05

we fail to reject the null hypothesis, which implies there is insufficient evidence to
conclude that the distributions of weight loss differ among the four medications.
Question 2 :

A)
Experimental Design: Factorial Design

Factors: 2 (Supplier and Shift)

Levels: 3 for each factor (Supplier: A, B, C; Shift: Day, Night, Swing)

Treatments: 9 (3 suppliers × 3 shifts)

Replications: 5 per treatment


B)

Hypotheses:
 Null hypothesis (H0) : No interaction exists between Supplier and Shift
 Alternative hypothesis (HA) : Interaction exists between Supplier and Shift.

Test Statistic:
The F-statistic for interaction is F=1.9623 (from the table).

Critical Value:
At α=0.05, with dfnumerator=4 and dfdenominator=36,
The critical value is F0.05,4,36=2.63 (from F-distribution table).
P-value:
The p-value is 0.1212 (from the table).

Decision:
Since F=1.9623<2.63 and P=0.1212>0.05, we fail to reject H0.

Conclusion:
Since we fail to reject the null hypothesis, There is insufficient evidence to
conclude that there is an interaction between Supplier and Shift.

C)

 Hypotheses:
o H0: The average quality is the same among all three suppliers.
o HA : At least one supplier's average quality is different.

 Test Statistic:
From the table, F=0.05898

 Critical Value:
At α=0.05, with dfnumerator=2, and dfdenominator=36, the critical value is F0.05,2,36=3.26

 Decision:
Since F=0.05898<3.26, we fail to reject H0.

 Conclusion:
Since we fail to reject the null hypothesis, There is no significant difference in
average quality among the three suppliers.
D)

 Hypotheses:
H0: The average quality is the same among all three shifts.
HA: At least one shift's average quality is different.

 Test Statistic:
From the table, F=4.6598

 Critical Value:
At α=0.05, with dfnumerator=2 and dfdenominator=36, the critical value is F0.05,2,36=3.26.

Decision:
Since F=4.6598>3.26, we reject H0.

 Conclusion:
Since we reject the null hypothesis, there is a significant difference in average
quality among the three shifts.
E)

1. Normality :

The normality assumption can be assessed by checking if the residuals mostly fall
within ±3 standard deviations. In the plot, the residuals are fairly distributed within this
range, with no extreme points lying far outside. This indicates there are no
significant outliers that would violate the normality assumption. Therefore, it
appears the data meet the requirement for normality.

2. Equal Variance :
The assumption of equal variance (homoscedasticity) requires that the residuals have a
consistent spread across all levels of fitted values. In the plot, the residuals show a
fairly uniform spread without noticeable patterns or trends, such as a funnel shape or
clustering. This consistency suggests that the variance of errors is equal across the
fitted values, meeting the assumption.

3. Conclusion:
Both assumptions of normality and equal variance appear to be warranted based on the
residuals plot.

f)

Step 1 : Calculate the number of pairwise comparisons

The number of pairwise comparisons for n = 2 treatments is: J = 1

Step 2 : let’s calculate the standard error

SE = √(MSE*(1/5 + 1/5)
SE = 2.54

Our α* = α/2J = 0.05 / 2*1= 0.025

And df = 2*(r-1) = 2 * 4 = 8

So our critical value t α* = 2.7515

Step 3 : The confidence interval :

( i ) Yi – Yj = 84 – 78.6 = 5.4

( 5.4 – 2.7515*2.54 ; 5.4 + 2.7515*2.54)


The confidence interval is (-1.34 ; 12.38)

( ii) Yi – Yj = 85.4 – 79.8 = 5.6

( 5.6 – 2.7515*2.54 ; 5.6 + 2.7515*2.54)


The confidence interval is (-1.38 ; 12.58)

 Since these 2 confidence intervals captures 0, the differences are not


significant
g)
The interaction plots show that the confidence intervals for the different factor levels
overlap are very close to each other ( B Night and B Swing – A Night and C Night ) .
This suggests that there is no significant difference in the effects of the factors at
different

levels. In other words, the interaction between the two factors is not statistically
significant, as the confidence intervals for each factor do not differ meaningfully across
the levels of the other factor. This finding is consistent with the conclusion drawn
from the analysis.
Déclaration d’intégrité académique
Divulgation et liste de contrôle pour un travail individuel

Veuillez lire la divulgation ci-dessous après avoir effectué votre travail. Une fois que
vous aurez vérifié ces points, veuillez remettre cette déclaration signée avec votre
travail.

1. Je reconnais avoir lu et compris ma responsabilité dans le maintien de l’intégrité


académique telle que définie par les politiques et règlements de l’Université d’Ottawa. De plus,
je comprends que toute violation à l’intégrité académique pourrait entrainer des
actions disciplinaires comme indiqué dans les règlements.

2. S’il y a lieu, j’ai cité (ou référencé en bas de bas) tous les mots, idées ou toute
propriété intellectuelle empruntés d’autres sources dans le cadre de ce travail.

3. J’ai inclus une bibliographie appropriée, comprenant l’identification de toutes les


sources utilisées dans le cadre du présent travail.

4. C’est la première fois que je soumets ce travail ou cet essai (en tout ou en partie)
pour une évaluation académique.

5. Je n’ai pas utilisé d’assistance ou d’aide non autorisées, y compris, mais sans s’y
limiter, l’utilisation de solutions en sous-traitance et l’utilisation contraire à l’éthique
de services en ligne comme les outils d’intelligence artificielle et les sites Web de
partage de matériel de cours.
Cote de cours :

Numéro du
travail/Titre : ADM 2304 - Assignment 3
Utilisation d’outils Oui (Requis par le cours/professeur) o Oui
de détection de (par moi-même) o
plagiat Non (Ne s’applique pas pour ce type de travail)
(i.e. Ouriginal) : o Non o
Date de
soumission : November 16
Nom :
Al Madani Mohammed

Signature :

You might also like