Você está na página 1de 5

Stat270 Assignment 1

Jessica Skoog - Student ID: 44977875

Question 1
a) The data provided is that of a test conducted on 39 male subjects in varying age groups,
measuring their heart rate increase after a set time of exercise.

The data shows that the mean increase in heartbeats per minute, as well as the standard
deviation and the number of samples provided per group. The sample set is said to be
independent – the results of each test do not rely on any previous tests, nor are they
affected by the results of any previous test.

The boxplot suggests that the heartbeat increase is similar in those aged 10-19, 20-39 and
60-69, all of which are slightly higher than 40-59.

b) BLANK

c) Completed ANOVA Table:

Df Sum Sq Mean Sq F Value Pr(>F)


age_range 3 62.32 20.77 0.867 0.467
Residual 35 838.6 23.96

d) Hypotheses: 𝐻𝑜 : 𝜇1 = 𝜇2 = 𝜇3 = 𝜇4 ; 𝐻1 : 𝑛𝑜𝑡 𝑎𝑙𝑙 𝑚𝑒𝑎𝑛𝑠 𝑎𝑟𝑒 𝑒𝑞𝑢𝑎𝑙


𝑀𝑆𝑎𝑔𝑒_𝑟𝑎𝑛𝑔𝑒
Test statistic: 𝐹𝑜𝑏𝑠 = 𝑀𝑆𝑅𝑒𝑠𝑖𝑑𝑢𝑎𝑙 = 0.8669
Null Distribution: If 𝐻𝑜 is true, 𝐹𝑜𝑏𝑠 behaves like a 𝐹3,35 distribution
P-Value: 𝑃𝑉𝑎𝑙𝑢𝑒 = 𝑃(𝐹3,35 ≥ 𝐹𝑜𝑏𝑠 ) = 0.46742

Conclusion: As the PValue is not less than 0.05 , there is insufficient evidence to reject the
null hypothesis. That is, there is not sufficient evidence to suggest that any of the heart rate
increase is different in any of the different ages.

4
e) i) The total number of pairwise comparisons for four groups is ( ) = 6
2

ii) The Significance level of each individual comparison (test) using Bonferroni approach
at 5% significance Level is 0.05/4 = 0.0125

iii) The t critical value that should be used for each of those parwise comparisons is
given by:
n=39, alpha = 0.05, k = 6, t=4
tquant = qt(1-alpha/(2*k),n-t)
tquant = 2.796605
Degrees of freedom is given by 39-k = 33 (this should be rounded down to 30 when
using the t-table)
Question 2
a) i) The data provided is that of a test conducted on 70 male subjects between the ages of 20
and 30, measuring their itch severity after being subjected to a specific drug/placebo/no
drug.

The data shows that the mean increase in heartbeats per minute, as well as the standard
deviation and the number of samples provided per group. The sample set is said to be
independent – the results of each test do not rely on any previous tests, nor are they
affected by the results of any previous test.

Numerical Summary:

Mean SD n
N1 y1=13.233256 s1=3.801024 n1=10
N2 y2=14.189376 s2=7.324971 n2=10
N3 y3=8.189376 s3=3.658858 n3=10
N4 y4=10.254042 s4=3.099682 n4=10
N5 y5=9.997691 s5=2.915250 n5=10
N6 y6=12.228637 s6=4.770633 n6=10
N7 y7=11.584296 s7=4.676637 n7=10

a) ii)
a) iii)

a) iv) The data presented belongs to 7 sample groups – a non drug trial, a placebo trial, and 5
different drug trials.

The box plot suggests that drug trials N1, N2 and N4-N7 produced similar results, while N3
appears to have resulted in lower itch severity. Also, the placebo trial has a significantly
higher variance than the other trials.

The Normal QQ Plot displays relative linearity, indicating that the samples are normally
distributed.

b) An Analysis of Variance requires three assumptions to be fulfilled: Independence, Normality,


and equality of variances. The samples are assumed to be independent, as the trial was run
with independent samples, all of which had no impact on other runs of the trial. The Normal
QQ Plot indicates that the data is normally distributed. Finally, the variances of each sample
exhibit a sufficient level of equality.

c) ANOVA Table:

Df Sum Sq Mean Sq F Value Pr(>F)


Treatment 6 254.5 42.41 2.058 0.0708
Residual 63 1298.0 20.60
Hypotheses: 𝐻𝑜 : 𝜇1 = 𝜇2 = 𝜇3 = 𝜇4 = 𝜇5 = 𝜇6 = 𝜇7 ; 𝐻1 : 𝑛𝑜𝑡 𝑎𝑙𝑙 𝑚𝑒𝑎𝑛𝑠 𝑎𝑟𝑒 𝑒𝑞𝑢𝑎𝑙
𝑀𝑆𝑇𝑟𝑒𝑎𝑡𝑚𝑒𝑛𝑡
Test statistic: 𝐹𝑜𝑏𝑠 = = 2.0587
𝑀𝑆𝑅𝑒𝑠𝑖𝑑𝑢𝑎𝑙
Null Distribution: If 𝐻𝑜 is true, 𝐹𝑜𝑏𝑠 behaves like a 𝐹6,63 distribution
P-Value: 𝑃𝑉𝑎𝑙𝑢𝑒 = 𝑃(𝐹6,63 ≥ 𝐹𝑜𝑏𝑠 ) = 0.0708

Conclusion: As the PValue is not less than 0.05 , there is insufficient evidence to reject the
null hypothesis. That is, there is not sufficient evidence to suggest that any of drug trials
resulted in different itch severity.

d) There is one pair for which the means are significantly different at a 5% confidence level:
Trial 2 and Trial 3 – That is, the Placebo trial vs the 1st Drug trial.

N1 vs N2
13.233−14.189
𝑡𝑜𝑏𝑠 = 1 1
=-0.471
4.538√ +
10 10
|𝑡𝑜𝑏𝑠 | = |−0.471| < 2.552

N1 vs N3
13.233−8.189
𝑡𝑜𝑏𝑠 = 1 1
=2.485
4.538√ +
10 10
|𝑡𝑜𝑏𝑠 | = |2.485| < 2.552

N1 vs N4
13.233−10.254
𝑡𝑜𝑏𝑠 = 1 1
1.469
4.538√ +
10 10
|𝑡𝑜𝑏𝑠 | = |1.469| < 2.552

N1 vs N5
13.233−9.998
𝑡𝑜𝑏𝑠 = 1 1
=1.594
4.538√ +
10 10
|𝑡𝑜𝑏𝑠 | = |1.594| < 2.552

N1 vs N6
13.233−12.229
𝑡𝑜𝑏𝑠 = 1 1
=0.495
4.538√ +
10 10
|𝑡𝑜𝑏𝑠 | = |0.495| < 2.552

N1 vs N7
13.233−11.584
𝑡𝑜𝑏𝑠 = 1 1
0.813
4.538√ +
10 10
|𝑡𝑜𝑏𝑠 | = |0.813| < 2.552

N2 vs N3
𝟏𝟒.𝟏𝟖𝟗−𝟖.𝟏𝟖𝟗
𝒕𝒐𝒃𝒔 = =2.956
𝟏 𝟏
𝟒.𝟓𝟑𝟖√ +
𝟏𝟎 𝟏𝟎
|𝒕𝒐𝒃𝒔 | = |𝟐. 𝟗𝟓𝟔| > 𝟐. 𝟓𝟓𝟐
Sufficient Evidence to Reject Null Hypothesis

N2 vs N4
14.189−10.254
𝑡𝑜𝑏𝑠 = 1 1
= 1.939
4.538√ +
10 10
|𝑡𝑜𝑏𝑠 | = |1.939| < 2.552

N2 vs N5
14.189−9.998
𝑡𝑜𝑏𝑠 = 1 1
= 2.065
4.538√ +
10 10
|𝑡𝑜𝑏𝑠 | = |2.065| < 2.552

N2 vs N6
14.189−12.229
𝑡𝑜𝑏𝑠 = 1 1
=0.966
4.538√ +
10 10
|𝑡𝑜𝑏𝑠 | = |0.966| < 2.552

N2 vs N7
14.189−11.584
𝑡𝑜𝑏𝑠 = 1 1
=1.284
4.538√ +
10 10
|𝑡𝑜𝑏𝑠 | = |1.284| > 2.552

N3 vs N4
8.189−10.254
𝑡𝑜𝑏𝑠 = 1 1
= -1.018
4.538√ +
10 10
|𝑡𝑜𝑏𝑠 | = |−1.018| < 2.552

N3 vs N5
8.189−9.998
𝑡𝑜𝑏𝑠 = 1 1
= -0.891
4.538√ +
10 10
|𝑡𝑜𝑏𝑠 | = |−0.891| < 2.552

N3 vs N6
8.189−12.229
𝑡𝑜𝑏𝑠 = 1 1
= -1.991
4.538√ +
10 10
|𝑡𝑜𝑏𝑠 | = |−1.991| < 2.552

N3 vs N7
8.189−11.584
𝑡𝑜𝑏𝑠 = 1 1
= -1.673
4.538√ +
10 10
|𝑡𝑜𝑏𝑠 | = |−1.673| < 2.552

N4 vs N5
10.254−9.998
𝑡𝑜𝑏𝑠 = 1 1
= 0.126
4.538√ +
10 10
|𝑡𝑜𝑏𝑠 | = |0.126| < 2.552

N4 vs N6
10.254−12.229
𝑡𝑜𝑏𝑠 = 1 1
= -0.973
4.538√ +
10 10
|𝑡𝑜𝑏𝑠 | = |−0.973| < 2.552

N4 vs N7
10.254−11.584
𝑡𝑜𝑏𝑠 = 1 1
= -0.655
4.538√ +
10 10
|𝑡𝑜𝑏𝑠 | = |−0.655| < 2.552

N5 vs N6
9.998−12.229
𝑡𝑜𝑏𝑠 = 1 1
= -1.099
4.538√ +
10 10
|𝑡𝑜𝑏𝑠 | = |−1.099| < 2.552

N5 vs N7
9.998−11.584
𝑡𝑜𝑏𝑠 = 1 1
= -0.781
4.538√ +
10 10
|𝑡𝑜𝑏𝑠 | = |−0.781| < 2.552

N6 vs N7
12.229−11.584
𝑡𝑜𝑏𝑠 = 1 1
= 0.318
4.538√ +
10 10
|𝑡𝑜𝑏𝑠 | = |0.318| < 2.552

Você também pode gostar