-
Notifications
You must be signed in to change notification settings - Fork 0
/
.Rhistory
302 lines (302 loc) · 17.8 KB
/
.Rhistory
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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
load("~/Desktop/DataAnalytics/Statistics&R-Module15/01_Demo/.RData")
demo_table[sample(1:nrow(demo_table), 3),]
demo_table[sample(1:nrow(demo_table), 3),]
demo_table[sample(1:nrow(demo_table), 3),]
demo_table[sample(1:nrow(demo_table), 4),]
demo_table[sample(1:nrow(demo_table), 3),]
demo_table2[sample(1:nrow(demo_table2), 3),]
View(demo_table2)
View(demo_table)
View(demo_table2)
demo_table2[sample(10:nrow(demo_table2), 3),]
?mutate()
library(tidyverse)
?mutate()
demo_table <- demo_table %>% mutate(Mileage_per_Year = Total_Miles/(2020 -Years), IsActive = TRUE)
demo_table <- demo_table %>% mutate(Mileage_per_Year = Total_Miles/(2020 -Year), IsActive = TRUE)
View(demo_table)
View(demo_table2)
summarize_demo <- demo_table2 %>% group_by(condition) %>% summarize(Mean_Mileage = mean(odometer), .groups = 'keep')
View(summarize_demo)
summarize_demo <- demo_table2 %>% group_by(condition) %>% summarize(Mean_Mileage = mean(odometer), .groups = 'keep')
summarize_demo <- demo_table2 %>% group_by(condition) %>% summarize(Mean_Mileage = mean(odometer),
.groups = 'keep')
summarize_demo() <- demo_table2 %>% group_by(condition) %>% summarize(Mean_Mileage = mean(odometer), Maximum_Price = max(price), Num_Vehicles = n(), groups = 'keep')
summarize_demo1() <- demo_table2 %>% group_by(condition) %>% summarize(Mean_Mileage = mean(odometer), Maximum_Price = max(price), Num_Vehicles = n(), groups = 'keep')
summarize_demo() <- demo_table2 %>% group_by(condition) %>% summarize(Mean_Mileage = mean(odometer), Maximum_Price = max(price), Num_Vehicles = n(), .groups = 'keep')
summarize_demo() <- demo_table2 %>% group_by(condition) %>% summarize(Mean_Mileage = mean(odometer), Maximum_Price = max(price), Num_Vehicles = n(), .groups = 'keep')
summarize_demo <- demo_table2 %>% group_by(condition) %>% summarize(Mean_Mileage = mean(odometer), Maximum_Price = max(price), Num_Vehicles = n(), .groups = 'keep')
summarize_demo1 <- demo_table2 %>% group_by(condition) %>% summarize(Mean_Mileage = mean(odometer), Maximum_Price = max(price), Num_Vehicles = n(), .groups = 'rowwise')
View(summarize_demo1)
View(summarize_demo1)
View(summarize_demo)
View(summarize_demo1)
View(summarize_demo)
View(summarize_demo1)
View(summarize_demo)
View(summarize_demo1)
View(summarize_demo)
?gather()
demo_table3 <- read.csv('demo2.csv', check.names = F, stringsAsFactors = F)
demo_table3 <- read.csv('demo2.csv', check.names = F, stringsAsFactors = F)
demo_table3 <- read.csv('demo2.csv',check.names = F,stringsAsFactors = F)
demo_table3 <- read.csv('demo2.csv',check.names = F,stringsAsFactors = F)
demo_table3 <- read.csv('demo2.csv',check.names = F,stringsAsFactors = F)
demo_table3 <- read.csv('demo2.csv',check.names = F, stringsAsFactors = F)
demo_table3 <- read.csv("demo2.csv", check.names = F, stringsAsFactors = F)
setwd("~/Desktop/DataAnalytics/Statistics&R-Module15/01_Demo")
demo_table3 <- read.csv("demo2.csv", check.names = F, stringsAsFactors = F)
View(demo_table3)
long_table <- demo_table3 %>% gather(key = 'Metric', value = 'Score', buying_price:popularity)
View(demo_table3)
View(long_table)
?spread()
wide_table <- long_table %>% spread(key = 'Metric', value = 'Score')
View(wide_table)
all_equal(demo_table3, wide_table)
?ggplot()
head(mpg)
plt <- ggplot(mpg, aes(x=class))
plt + geom_bar()
?geom_bar()
?geom_bar()
plt + geom_bar()
plt <- ggplot(mpg_summary, aes(x= manufacturer, y = Vehicle_count))
plt <- ggplot(mpg_summary, aes(x= manufacturer, y = Vehicle_count))
mpg_summary <- mpg %>% group_by(manufacturer) %>% summarize(Vehicle_count= n(), .groups = 'keep')
plt <- ggplot(mpg_summary, aes(x= manufacturer, y = Vehicle_count))
plt + geom_col()
plt + geom_col() + xlab("Manufacturing Company") + ylab("Number of Vehicles in Dataset")
plt + geom_col() + xlab("Manufacturing Company") + ylab("Number of Vehicles in Dataset") +
theme
plt + geom_col() + xlab("Manufacturing Company") + ylab("Number of Vehicles in Dataset") +
theme(axis.text.x = element_text(angle = 45, hjust = 1) )
mpg_summary <- subset(mpg, manufacturer == 'toyota') %>% group_by(cyl) %>% summarize(Mean_Hwy = mean (hyw), .groups = 'keep')
mpg_summary <- subset(mpg, manufacturer == 'toyota') %>% group_by(cyl) %>% summarize(Mean_Hwy = mean (hyw), .groups = 'keep')
mpg_summary <- subset(mpg, manufacturer == 'toyota') %>% group_by(cyl) %>% summarize(Mean_Hwy = mean(hyw), .groups = 'keep')
> mpg_summary <- subset(mpg,manufacturer=="toyota") %>% group_by(cyl) %>% summarize(Mean_Hwy=mean(hwy), .groups = 'keep') #create summary table
mpg_summary <- subset(mpg,manufacturer=="toyota") %>% group_by(cyl) %>% summarize(Mean_Hwy=mean(hwy), .groups = 'keep')
mpg_summary <- subset(mpg, manufacturer=='toyota') %>% group_by(cyl) %>% summarize(Mean_Hwy = mean(hwy), .groups = 'keep')
plt <- ggplot(mpg_summary, aes(x=cyl, y=Mean_Hwy))
plt + geom_line()
View(plt)
View(plt)
plt <- ggplot(mpg_summary, aes(x=cyl, y=Mean_Hwy))
View(plt)
plt + geom_line() + scale_x_discrete(limits =c(4, 6, 8)) + scale_y_continuous(limits = c(15:30))
plt + geom_line() + scale_x_discrete(limits =c(4, 6, 8)) + scale_y_continuous(breaks = c(15:30))
plt + geom_line() + scale_x_discrete(limits=c(4,6,8)) + scale_y_continuous(breaks = c(15:30))
plt <- ggplot(mpg, aes(x=displ, y=cty))
plt + geom_point()
plt <- ggplot(mpg, aes(x=displ, y=cty, color= class))
plt + geom_point() + labs(x='Engine Size (L)', y='City Fuel-Efficiency (MPG)', color='Vehicle Class')
plt <- ggplot(mpg, aes(x=displ, y=cty, color=class, shape=drv))
plt + geom_point() + labs(x="Engine Size (L)", y='City Fuel Efficiency (MPG)', color='Vehile Class', shape='Type of Drive')
plt <- ggplot(mpg, aes(x=displ, y=cty, color=class, shape=drv, size=5))
plt + geom_point() + labs(x="Engine Size (L)", y='City Fuel Efficiency (MPG)', color='Vehile Class', shape='Type of Drive')
plt <- ggplot(mpg, aes(x=displ, y=cty, color=class, shape=drv, size_sum=class)
plt <- ggplot(mpg, aes(x=displ, y=cty, color=class, shape=drv, size_sum=class)
plt <- ggplot(mpg, aes(x=displ, y=cty, color=class, shape=drv, size_sum=class)
;
plt <- ggplot(mpg, aes(x=displ, y=cty, color=class, shape=drv, size_sum=class))
plt + geom_point() + labs(x="Engine Size (L)", y='City Fuel Efficiency (MPG)', color='Vehile Class', shape='Type of Drive')
plt + geom_point() + labs(x="Engine Size (L)", y='City Fuel Efficiency (MPG)', color='Vehile Class', shape='Type of Drive', )
plt <- ggplot(mpg, aes(x=displ, y=cty, color=class, shape=drv, size = class))
plt + geom_point() + labs(x="Engine Size (L)", y='City Fuel Efficiency (MPG)', color='Vehile Class', shape='Type of Drive', )
plt <- ggplot(mpg, aes(y=hwy))
plt + geom_boxplot()
plt <- ggplot(mpg, aes(x=manufacturer, y=hwy))
plt + geom_boxplot() + theme(axis.text.x =element_text(angle=45, hjust = 1))
plt <- ggplot(mpg, aes(x=manufacturer, y=hwy, color=hwy))
plt + geom_boxplot() + theme(axis.text.x =element_text(angle=45, hjust = 1))
plt <- ggplot(mpg, aes(x=manufacturer, y=hwy, color=hwy))
plt + geom_boxplot() + theme(axis.text.x =element_text(angle=45, hjust = 1)) + labs(color = 'Hwy')
plt <- ggplot(mpg, aes(x=manufacturer, y=hwy))
plt + geom_boxplot(aes(color = hwy)) + theme(axis.text.x =element_text(angle=45, hjust = 1))
plt <- ggplot(mpg, aes(x=manufacturer, y=hwy,color = hwy))
plt + geom_boxplot(aes(color = hwy)) + theme(axis.text.x =element_text(angle=45, hjust = 1))
plt + geom_boxplot(aes(colour = hwy)) + theme(axis.text.x =element_text(angle=45, hjust = 1))
plt + geom_boxplot(aes(colour = manufacturer)) + theme(axis.text.x =element_text(angle=45, hjust = 1))
plt <- ggplot(mpg, aes(x=manufacturer, y=hwy,color = manufacturer))
plt + geom_boxplot(aes(colour = manufacturer)) + theme(axis.text.x =element_text(angle=45, hjust = 1))
mpg_summary<- mpg %>% group_by(class, year) %>% summarize(Mean_Hwy = mean(hwy), .groups = 'keep')
plt <- ggplot(mpg_summary, aes(x=class, y=factor(year), fill=Mean_Hwy))
plt + geom_title() + labs(x='Vehicle Class', y='Vehicle Year', fill='Mean Highway (MPG)')
plt + geom_tile() + labs(x='Vehicle Class', y='Vehicle Year', fill='Mean Highway (MPG)')
mpg_summary<- mpg %>% group_by(model, year) %>% summarize(Mean_Hwy = mean(hwy), .groups = 'keep')
plt <- ggplot(mpg_summary, aes(x=model, y=factor(year), fill=Mean_Hwy))
plt + geom_tile() + labs(x='Model', y='Vehicle Year', fill='Mean Highway (MPG)') + theme(axis.text.x = element_text(angle=90, hjust=1, vjust = 0.5) )
plt <- ggplot(mpg, aes(x=manufacturer, y= hwy))
plt + geom_boxplot() + theme(axis.text.x = element_text(angle=45, hjust = 1)) + geom_point()
mpg_summary<- mpg %>% group_by(class) %>% summarize(Mean_Engine = mean(displ), .groups = 'keep')
plt <- ggplot(mpg_summary, aes(x=class, y= Mean_Engine))
plt + geom_boxplot(size=4) + labs(x='Vehicle Class', y='Mean Engine Size')
plt + geom_point(size=4) + labs(x='Vehicle Class', y='Mean Engine Size')
mpg_summary<- mpg %>% group_by(class) %>% summarize(Mean_Engine = mean(displ), SD_Engine = sd(displ), .groups = 'keep')
plt <- ggplot(mpg_summary, aes(x=class, y= Mean_Engine))
plt + geom_point(size=4) + labs(x='Vehicle Class', y='Mean Engine Size') + geom_errorbar(aes(ymin=Mean_Engine-SD_Engine,ymax=Mean_Engine+SD_Engine))
mpg_long <- mpg %>% gather(key="MPG_Type", value = "Rating", c(cty,hwy))
head(mpg_long)
plt <- ggplot(mpg_long, aes(x=manufacturer, y = Rating, color= MPG_Type))
plt + geom_boxplot() + theme(axis.text.x = element_text(angle=45, hjust=1))
?facet_wrap()
plt <- ggplot(mpg_long, aes(x=manufacturer, y = Rating, color= MPG_Type))
plt + geom_boxplot() + facet_wrap(vars(MPG_Type)) + theme(axis.text.x = element_text(angle=45, hjust=1), legend.position = "none") + xlab("Manufacturer")
plt + geom_boxplot() + facet_wrap(~align) + theme(axis.text.x = element_text(angle=45, hjust=1), legend.position = "none") + xlab("Manufacturer")
plt + geom_boxplot() + facet_wrap(vars(MPG_Type)) + theme(axis.text.x = element_text(angle=45, hjust=1), legend.position = "none") + xlab("Manufacturer")
header(mtcars)
head(mtcars)
ggplot(mtcars, aes(x=wt)) + geom_density()
?shapiro.test
?shapiro.test()
shapiro.test(mtcars$wt)
?sample_n()
population_table <- read.csv('used_car_data.csv', check.names = F, stringsAsFactors = F)
plt <- ggplot(population_table, aes(x=log(Miles_Driven)))
plt + geom_density()
View(population_table)
plt <- ggplot(population_table, aes(x=Miles_Driven))
plt + geom_density()
plt <- ggplot(population_table, aes(x=log(Miles_Driven)))
plt + geom_density()
sample_data <- population_table %>% sample_n(50)
View(sample_data)
plt <- ggplot(sample_data, aes(x=log10(Miles_Driven)))
plt + geom_density()
?t.test()
t.test(log10(sampl_table$Miles_Driven), mu=(log10(population_table$Miles_Driven)))
t.test(log10(sampl_data$Miles_Driven), mu=(log10(population_table$Miles_Driven)))
t.test(log10(sample_data$Miles_Driven), mu=(log10(population_table$Miles_Driven)))
t.test(log10(sample_data$Miles_Driven), mu=mean(log10(population_table$Miles_Driven)))
sample_table <- population_table %>% sample_n(50)
sample_table1 <- population_table %>% sample_n(50)
t.test(log10(sample_table$Miles_Driven), log10(sample_table1$Miles_Driven))
?t.test()
mpg_data <- read.csv('mpg_modified.csv', check.names = F, stringsAsFactors = F )
View(mpg_data)
mpg_1999 <- mpg_data %>% filter(year == 1999)
View(mpg_1999)
mpg_2008 <- mpg_data %>% filter(year == 2008)
t.test(mpg_1999$hwy,mpg_2008$hwy,paired =T)
?aoc()
?aov()
mtcars_filt <- mtcars[,c("hp","cyl")]
View(mtcars_filt)
mtcars_filt$cyl <- factor(mtcars_filt$cyl)
aov(hp ~ cyl, data = mtcars_filt)
summary(aov(hp ~ cyl, data = mtcars_filt))
?cor()
head(mtcars)
plt <- ggplot(mtcars, aes(x=hp, y=qsec))
plt + geom_point()
cof(mtcars$hp, mtcars$qsec)
cor(mtcars$hp, mtcars$qsec)
used_cars <- read.csv('used_cars_dara.csv', check.names = F, stringsAsFactors = F)
used_cars <- read.csv('used_cars_daTa.csv', check.names = F, stringsAsFactors = F)
used_cars <- read.csv('used_cars_data.csv', check.names = F, stringsAsFactors = F)
used_cars <- read.csv('used_car_data.csv', check.names = F, stringsAsFactors = F)
head(used_cars)
plt <- ggplot(used_cars, aes(x=Miles_Driven, y=Selling_Price))
plt + geom_point()
cor(used_cars$Miles_Driven, used_cars$Selling_Price)
used_matrix <- as.matrix(used_cars[,c("Selling_Price", "Present_Price", "Miles_Driven")])
cor(used_matrix)
?lm()
lm(qsec ~ hp, mtcars)
summary()
summary(lm(qsec ~ hp, mtcars))
model <- lm(qsec ~ hp, mtcars)
yvals <- model$coefficients['hp']*mtcars$hp + model$coefficients["(Intercept)"]
plt <- ggplot(mtcars, aes(x=hp, y=qsec))
plt + geom_point() + geom_line(aes(y=vals), color = 'red')
plt + geom_point() + geom_line(aes(y=yvals), color = 'red')
lm(qsec ~ mpg + disp + drat + wt + hp, data = mtcars )
summary(lm(qsec ~ mpg + disp + drat + wt + hp, data = mtcars))
cor(lm(qsec ~ mpg + disp + drat + wt + hp, data = mtcars))
View(mpg_1999)
table(mpg$class, mpg&year)
View(mpg_data)
table(mpg$class, mpg$year)
tbl <- table(mpg$class, mpg$year)
chisq.test(tbl)
setwd("~/Desktop/DataAnalytics/Statistics&R-Module15/MechaCar_Statistical_Analysis")
library(dplyr)
Mechcar_car <- read.csv('MechaCar_mpg.csv', check.names = F, stringsAsFactors = F)
View(Mechcar_car)
source("~/Desktop/DataAnalytics/Statistics&R-Module15/MechaCar_Statistical_Analysis/MechaCarChallenge.R")
> library(dplyr)
Mechcar_car <- read.csv('MechaCar_mpg.csv', check.names = F, stringsAsFactors = F)
source("~/Desktop/DataAnalytics/Statistics&R-Module15/MechaCar_Statistical_Analysis/MechaCarChallenge.R")
Mechcar_car <- read.csv('MechaCar_mpg.csv', check.names = F, stringsAsFactors = F)
source("~/Desktop/DataAnalytics/Statistics&R-Module15/MechaCar_Statistical_Analysis/MechaCarChallenge.R")
?lm()
head(mtcars)
source("~/Desktop/DataAnalytics/Statistics&R-Module15/MechaCar_Statistical_Analysis/MechaCarChallenge.R")
lm(vehicle_length ~ vehicle_weight + spoiler_angle + ground_clearance + AWD + mpg, data = Mechcar_car)
linear_analysis1 <- lm(vehicle_length ~ vehicle_weight + spoiler_angle + ground_clearance + AWD + mpg, data = Mechcar_car)
summary(linear_analysis1)
linear_analysis1
linear_analysis1 <- lm(mpg ~ vehicle_length + vehicle_weight + spoiler_angle + ground_clearance + AWD, data = Mechcar_car)
linear_analysis1
summary(linear_analysis1)
source("~/Desktop/DataAnalytics/Statistics&R-Module15/MechaCar_Statistical_Analysis/MechaCarChallenge.R")
source("~/Desktop/DataAnalytics/Statistics&R-Module15/MechaCar_Statistical_Analysis/MechaCarChallenge.R")
Suspension_coils <- read.csv('Suspension_Coil.csv', check.names = F, stringsAsFactors = F)
View(Suspension_coils)
?summarize()
total_summary <- Suspension_coils %>% group_by(Manufacturing_Lot) %>% summarize(Mean = mean(PSI), Median = median(PSI),
Variance = Variance(PSI), SD = sd(PSI))
total_summary <- Suspension_coils %>% group_by(Manufacturing_Lot) %>% summarize(Mean = mean(PSI), Median = median(PSI),
Variance = variance(PSI), SD = sd(PSI))
total_summary <- Suspension_coils %>% group_by(Manufacturing_Lot) %>% summarize(Mean = mean(PSI), Median = median(PSI),
SD = sd(PSI))
View(total_summary)
total_summary <- Suspension_coils %>% group_by(Manufacturing_Lot) %>% summarize(Mean = mean(PSI), Median = median(PSI),
Variance = var(PSI), SD = sd(PSI))
View(total_summary)
lot_summary <- Suspension_coils %>% group_by(Manufacturing_Lot) %>% summarize(Mean = mean(PSI), Median = median(PSI),
Variance = var(PSI), SD = sd(PSI))
View(lot_summary)
total_summary <- Suspension_coils %>% summarize(Mean = mean(PSI), Median = median(PSI),
Variance = var(PSI), SD = sd(PSI))
View(total_summary)
lot_summary <- Suspension_coils %>% group_by(Manufacturing_Lot) %>% summarize(total_summary)
View(lot_summary)
lot_summary <- Suspension_coils %>% group_by(Manufacturing_Lot) %>% summarize(Mean = mean(PSI), Median = median(PSI),
Variance = var(PSI), SD = sd(PSI))
View(lot_summary)
source("~/Desktop/DataAnalytics/Statistics&R-Module15/MechaCar_Statistical_Analysis/MechaCarChallenge.R")
source("~/Desktop/DataAnalytics/Statistics&R-Module15/MechaCar_Statistical_Analysis/MechaCarChallenge.R")
source("~/Desktop/DataAnalytics/Statistics&R-Module15/MechaCar_Statistical_Analysis/MechaCarChallenge.R")
?t.test()
total_summary <- Suspension_coils %>% summarize(Mean = mean(PSI), Median = median(PSI),
Variance = var(PSI), SD = sd(PSI), .groups = 'keep')
View(total_summary)
lot_summary <- Suspension_coils %>% group_by(Manufacturing_Lot) %>% summarize(Mean = mean(PSI), Median = median(PSI),
Variance = var(PSI), SD = sd(PSI), .groups = 'keep')
View(lot_summary)
source("~/Desktop/DataAnalytics/Statistics&R-Module15/MechaCar_Statistical_Analysis/MechaCarChallenge.R")
View(sample_data)
View(population_table)
View(sample_data)
View(Mechcar_car)
View(Suspension_coils)
t.test(Suspension_coils$PSI, mu = 1500)
t.test(subset(Suspension_coils, Manufacturing_Lot == 'Lot1')$PSI, mu = 1500)
t.test(subset(Suspension_coils, Manufacturing_Lot == 'Lot2')$PSI, mu = 1500)
t.test(subset(Suspension_coils, Manufacturing_Lot == 'Lot3')$PSI, mu = 1500)
t.test(subset(Suspension_coils$PSI, Manufacturing_Lot == 'Lot1'), mu = 1500)
t.test(subset(Suspension_coils$PSI, Suspension_coils$Manufacturing_Lot == 'Lot1'), mu = 1500)
t.test(subset(Suspension_coils$PSI, Suspension_coils$Manufacturing_Lot == 'Lot2'), mu = 1500)
t.test(subset(Suspension_coils$PSI, Suspension_coils$Manufacturing_Lot == 'Lot3'), mu = 1500)
source("~/Desktop/DataAnalytics/Statistics&R-Module15/MechaCar_Statistical_Analysis/MechaCarChallenge.R")
source("~/Desktop/DataAnalytics/Statistics&R-Module15/MechaCar_Statistical_Analysis/MechaCarChallenge.R")
source("~/Desktop/DataAnalytics/Statistics&R-Module15/MechaCar_Statistical_Analysis/MechaCarChallenge.R")
source("~/Desktop/DataAnalytics/Statistics&R-Module15/MechaCar_Statistical_Analysis/MechaCarChallenge.R")
source("~/Desktop/DataAnalytics/Statistics&R-Module15/MechaCar_Statistical_Analysis/MechaCarChallenge.R")
source("~/Desktop/DataAnalytics/Statistics&R-Module15/MechaCar_Statistical_Analysis/MechaCarChallenge.R")
lot_summary <- Suspension_coils %>% group_by(Manufacturing_Lot) %>% summarize(Mean = mean(PSI), Median = median(PSI),
Variance = var(PSI), SD = sd(PSI), .groups = 'keep')
View(lot_summary)
t.test(Suspension_coils$PSI, mu = 1500)
source("~/Desktop/DataAnalytics/Statistics&R-Module15/MechaCar_Statistical_Analysis/MechaCarChallenge.R")