Probability & Statistical Data Analysis

Project 2

Project Video

Project Report

R Script for Project 2

#Sample taken
x = Iris$SepalLengthCm[10:60];

#Hypothesis testing
t.test(x, alternative = 'two.sided',mu=5.843);

#Correlation test
cor.test(data$SepalLengthCm,data$SepalWidthCm)
cor.test(data$PetalLengthCm,data$PetalWidthCm)

#ANOVA
dataResult <- aov(SepalLengthCm ~ PetalWidthCm, data = Iris)
summary(dataResult)

#Regression test Var. Petal Width & Petal Length
model<-lm(Iris$PetalWidthCm ~ Iris$PetalLengthCm);
summary(model);

#Plot the data
ggplot(iris, aes(x = iris$Petal.Length, y = iris$Petal.Width)) + geom_point() +stat_smooth() +ggtitle("ScatterPlot")+labs(x="Petal Length",y="Petal Width");

#Regression test Var. Sepal Width & Sepal Length
model<-lm(Iris$SepalWidthCm ~ Iris$SepalLengthCm);
summary(model);

#Plot the data
ggplot(iris, aes(x = iris$Sepal.Length, y = iris$Sepal.Width)) + geom_point() +stat_smooth() +ggtitle("ScatterPlot")+labs(x="Sepal Length",y="Sepal Width");

Reflection

          After I worked on and completed this 2nd project with my group,

I became more aware of Hypothesis testing, correlation tests, regression

tests and also ANOVA, because they are all included in this project, and

also this task makes me more prepared to face the final exam PSDA

which will be held on July 13, 2021.