Professional Documents
Culture Documents
R Code
R Code
women_weight <- c(38.9, 61.2, 73.3, 21.8, 63.4, 64.6, 48.4, 48.8, 48.5)
men_weight <- c(67.8, 60, 63.4, 76, 89.4, 73.3, 67.3, 61.3, 62.4)
*****Output******
-29.748019 -4.029759
sample estimates:
mean of x mean of y
52.10000 68.98889
wilcox.test(women_weight, men_weight)
*******Simple Regression********
x = c(18,23,25,35,65,54,34,56,72,19,23,42,18,39,37)
y = c(202,186,187,180,156,169,174,172,153,199,193,174,198,183,178)
summary(simple_lm)
Call:
lm(formula = x ~ y)
Residuals:
Coefficients:
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
************Multiple Regression****************
a = c(1,2,3,4,5,6,7,8,9,10)
b= c(52, 23,12,34,23,12,45,46,23,23)
c= c(100,223,233,125,246,574,244,234,111,824)
summary(multiple_reg)
Call:
lm(formula = c ~ a + b)
Residuals:
Coefficients: