-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathGroup1_HW_Lab12.Rmd
More file actions
50 lines (36 loc) · 1.04 KB
/
Copy pathGroup1_HW_Lab12.Rmd
File metadata and controls
50 lines (36 loc) · 1.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
---
title: "Group1_HW_Lab12"
output:
word_document: default
html_notebook: default
editor_options:
chunk_output_type: inline
---
Consider Verizon data. Use the classical t-test to determine
whether the mean difference (Mean(ILEC)- Mean(CLEC) ) is
signicantly greater than zero. Are the assumptions met? Are
the population/true variances equal? Interpret the results.
```{r}
library(resampledata)
data("Verizon")
# head(Verizon)
dat=Verizon
ILEC=dat[dat$Group=="ILEC", ]
ILEC=ILEC$Time
CLEC=dat[dat$Group=="CLEC", ]
CLEC=CLEC$Time
#checking normality
qqnorm(ILEC)
qqline(ILEC)
qqnorm(CLEC)
qqline(CLEC)
t.test(Time~Group, data = Verizon, alt = "two.sided",var.equal = TRUE)
#OR
#TESTING EQUALITY OF VARIANCES
library(testequavar)
equa2vartest(ILEC, CLEC, 0.05, B=5000)
var(ILEC)
var(CLEC)
t.test(ILEC,CLEC, alt = "two.sided",var.equal = TRUE)
```
Since the pvalue is less than $\alpha$ we reject the null hypothesis that the true mean difference in repair times is significantly greater than zero.