The file singer.txt contains the heights of 235 opera singers. Load the file int
ID: 3348298 • Letter: T
Question
The file singer.txt contains the heights of 235 opera singers. Load the file into R using read.table(). We will consider four groups of singers: the 66 sopranos, 62 altos, 42 tenors, and 65 basses. (We will ignore any difference between, for example, “Soprano 1” and “Soprano 2”.) The data is close enough to normal and homoskedastic to perform an analysis of variance.
"height" "voice.part"
64 "Soprano 1"
62 "Soprano 1"
66 "Soprano 1"
65 "Soprano 1"
60 "Soprano 1"
61 "Soprano 1"
65 "Soprano 1"
66 "Soprano 1"
65 "Soprano 1"
63 "Soprano 1"
67 "Soprano 1"
65 "Soprano 1"
62 "Soprano 1"
65 "Soprano 1"
68 "Soprano 1"
65 "Soprano 1"
63 "Soprano 1"
65 "Soprano 1"
62 "Soprano 1"
65 "Soprano 1"
66 "Soprano 1"
62 "Soprano 1"
65 "Soprano 1"
63 "Soprano 1"
65 "Soprano 1"
66 "Soprano 1"
65 "Soprano 1"
62 "Soprano 1"
65 "Soprano 1"
66 "Soprano 1"
65 "Soprano 1"
61 "Soprano 1"
65 "Soprano 1"
66 "Soprano 1"
65 "Soprano 1"
62 "Soprano 1"
63 "Soprano 2"
67 "Soprano 2"
60 "Soprano 2"
67 "Soprano 2"
66 "Soprano 2"
62 "Soprano 2"
65 "Soprano 2"
62 "Soprano 2"
61 "Soprano 2"
62 "Soprano 2"
66 "Soprano 2"
60 "Soprano 2"
65 "Soprano 2"
65 "Soprano 2"
61 "Soprano 2"
64 "Soprano 2"
68 "Soprano 2"
64 "Soprano 2"
63 "Soprano 2"
62 "Soprano 2"
64 "Soprano 2"
62 "Soprano 2"
64 "Soprano 2"
65 "Soprano 2"
60 "Soprano 2"
65 "Soprano 2"
70 "Soprano 2"
63 "Soprano 2"
67 "Soprano 2"
66 "Soprano 2"
65 "Alto 1"
62 "Alto 1"
68 "Alto 1"
67 "Alto 1"
67 "Alto 1"
63 "Alto 1"
67 "Alto 1"
66 "Alto 1"
63 "Alto 1"
72 "Alto 1"
62 "Alto 1"
61 "Alto 1"
66 "Alto 1"
64 "Alto 1"
60 "Alto 1"
61 "Alto 1"
66 "Alto 1"
66 "Alto 1"
66 "Alto 1"
62 "Alto 1"
70 "Alto 1"
65 "Alto 1"
64 "Alto 1"
63 "Alto 1"
65 "Alto 1"
69 "Alto 1"
61 "Alto 1"
66 "Alto 1"
65 "Alto 1"
61 "Alto 1"
63 "Alto 1"
64 "Alto 1"
67 "Alto 1"
66 "Alto 1"
68 "Alto 1"
70 "Alto 2"
65 "Alto 2"
65 "Alto 2"
65 "Alto 2"
64 "Alto 2"
66 "Alto 2"
64 "Alto 2"
70 "Alto 2"
63 "Alto 2"
70 "Alto 2"
64 "Alto 2"
63 "Alto 2"
67 "Alto 2"
65 "Alto 2"
63 "Alto 2"
66 "Alto 2"
66 "Alto 2"
64 "Alto 2"
64 "Alto 2"
70 "Alto 2"
70 "Alto 2"
66 "Alto 2"
66 "Alto 2"
66 "Alto 2"
69 "Alto 2"
67 "Alto 2"
65 "Alto 2"
69 "Tenor 1"
72 "Tenor 1"
71 "Tenor 1"
66 "Tenor 1"
76 "Tenor 1"
74 "Tenor 1"
71 "Tenor 1"
66 "Tenor 1"
68 "Tenor 1"
67 "Tenor 1"
70 "Tenor 1"
65 "Tenor 1"
72 "Tenor 1"
70 "Tenor 1"
68 "Tenor 1"
64 "Tenor 1"
73 "Tenor 1"
66 "Tenor 1"
68 "Tenor 1"
67 "Tenor 1"
64 "Tenor 1"
68 "Tenor 2"
73 "Tenor 2"
69 "Tenor 2"
71 "Tenor 2"
69 "Tenor 2"
76 "Tenor 2"
71 "Tenor 2"
69 "Tenor 2"
71 "Tenor 2"
66 "Tenor 2"
69 "Tenor 2"
71 "Tenor 2"
71 "Tenor 2"
71 "Tenor 2"
69 "Tenor 2"
70 "Tenor 2"
69 "Tenor 2"
68 "Tenor 2"
70 "Tenor 2"
68 "Tenor 2"
69 "Tenor 2"
72 "Bass 1"
70 "Bass 1"
72 "Bass 1"
69 "Bass 1"
73 "Bass 1"
71 "Bass 1"
72 "Bass 1"
68 "Bass 1"
68 "Bass 1"
71 "Bass 1"
66 "Bass 1"
68 "Bass 1"
71 "Bass 1"
73 "Bass 1"
73 "Bass 1"
70 "Bass 1"
68 "Bass 1"
70 "Bass 1"
75 "Bass 1"
68 "Bass 1"
71 "Bass 1"
70 "Bass 1"
74 "Bass 1"
70 "Bass 1"
75 "Bass 1"
75 "Bass 1"
69 "Bass 1"
72 "Bass 1"
71 "Bass 1"
70 "Bass 1"
71 "Bass 1"
68 "Bass 1"
70 "Bass 1"
75 "Bass 1"
72 "Bass 1"
66 "Bass 1"
72 "Bass 1"
70 "Bass 1"
69 "Bass 1"
72 "Bass 2"
75 "Bass 2"
67 "Bass 2"
75 "Bass 2"
74 "Bass 2"
72 "Bass 2"
72 "Bass 2"
74 "Bass 2"
72 "Bass 2"
72 "Bass 2"
74 "Bass 2"
70 "Bass 2"
66 "Bass 2"
68 "Bass 2"
75 "Bass 2"
68 "Bass 2"
70 "Bass 2"
72 "Bass 2"
67 "Bass 2"
70 "Bass 2"
70 "Bass 2"
69 "Bass 2"
72 "Bass 2"
71 "Bass 2"
74 "Bass 2"
75 "Bass 2"
1. Suppose we wish to test the hypothesis that sopranos, altos, tenors, and basses all have the same average height. Construct an ANOVA table to test this hypothesis. Carefully write down the hypotheses and give a conclusion.
2. Two more interesting null hypotheses to test are:
(a) Sopranos and altos have the same average height
(b) Tenors and basses have the same average height
Test each of these null hypotheses at level 0.025, giving P-values and conclusions.
*Please show R code for all calculations as well
Explanation / Answer
ASolution1:
H0:All the 4 group means height are equal.
H1:Atleast one of the group means height are different.
Alpha=0.05
Rcode:
dim(singertxt)
names(singertxt)
table(singertxt$voice.part)
model1 <- aov(height~voice.part,data=singertxt)
summary(model1)
Output:
dim(singertxt)
[1] 235 2
> names(singertxt)
[1] "height" "voice.part"
> table(singertxt$voice.part)
Alto Bass Soprano Tenor
62 65 66 42
> model1 <- aov(height~voice.part,data=singertxt)
> summary(model1)
Df Sum Sq Mean Sq F value Pr(>F)
voice.part 3 1962 654.1 103.4 <2e-16 ***
Residuals 231 1461 6.3
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Intrepretaion of ouput:
F=103.4
P=<2e-16 ***
p<0.05
Reject Null hypothesis
Accept alternative Hypothesis.
There is sufficient statistical evidence at 5% level of significance to conclude that average heights
of four groups of singers are different.
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.