-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathInClassAssignment1.R
More file actions
59 lines (45 loc) · 1.46 KB
/
Copy pathInClassAssignment1.R
File metadata and controls
59 lines (45 loc) · 1.46 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
51
52
53
54
55
56
57
58
59
Eric Sledge - In Class Assignment 1
res <- cor.test(my_data$drat, my_data$qsec, method = "pearson")
> res
Pearson's product-moment correlation
data: my_data$drat and my_data$qsec
t = 0.50164, df = 30, p-value = 0.6196
alternative hypothesis: true correlation is not equal to 0
95 percent confidence interval:
-0.265947 0.426340
sample estimates:
cor
0.09120476
> res <- cor.test(my_data$hp, my_data$gear, method = "pearson")
> res
Pearson's product-moment correlation
data: my_data$hp and my_data$gear
t = -0.69402, df = 30, p-value = 0.493
alternative hypothesis: true correlation is not equal to 0
95 percent confidence interval:
-0.4544774 0.2332119
sample estimates:
cor
-0.1257043
> res <- cor.test(my_data$gear, my_data$carb, method = "pearson")
> res
Pearson's product-moment correlation
data: my_data$gear and my_data$carb
t = 1.5609, df = 30, p-value = 0.129
alternative hypothesis: true correlation is not equal to 0
95 percent confidence interval:
-0.08250603 0.56844218
sample estimates:
cor
0.2740728
> res <- cor.test(my_data$mpg, my_data$disp, method = "pearson")
> res
Pearson's product-moment correlation
data: my_data$mpg and my_data$disp
t = -8.7472, df = 30, p-value = 9.38e-10
alternative hypothesis: true correlation is not equal to 0
95 percent confidence interval:
-0.9233594 -0.7081376
sample estimates:
cor
-0.8475514