Professional Documents
Culture Documents
typeof(fitLM)
class(fitLM)
names(fitLM)
plot(life$sr , life$pop15+1)
abline(fitLM,col="red")
anova(fitLM)
summary(fitLM)
typeof(fitAll)
class(fitAll)
names(fitAll)
plot(life$sr , life$pop15+1)
abline(fitAll,col="red")
anova(fitAll)
summary(fitAll)
# d. generate histogram ###############
hist(life$dpi)
#############
require(stats);
require(graphics)
###########equation of regressin###############
fm1 <- lm(sr ~ pop15 + pop75 + dpi + ddpi, data = LifeCycleSavings)
#R-squared,Residual-error,p-value
summary(fm1)
#1
1-pbinom(69,71,0.94,lower.tail=TRUE,log.p=FALSE)
mean=71*0.25
variance=71*0.25*0.06
sdev = sqrt(variance)
#2
p_mathandsci=40/100
p_mathandsci
Pm= 60/100
p_m=0.6
prob_of_studymath=p_mathandsci/P_m
prob_of_studymath
#Que
2.***********************************************************************************************************
*******
items <- read.csv("C:/Users/ai-01/Downloads/PlantGrowth.csv")
trt1=items[11:20 , ]
trt1
trt2=items[21:30 , ]
trt2
#graph
ggplot(items, aes(x=items$weight,y=items$group))+
geom_boxplot(fill=c("red","green","blue"))
ggplot(items, aes(x=items$weight,y=items$group))+
geom_boxplot()