Presentation Assignment
Presentation Assignment
Presentation Assignment
Zuber
4/27/2022
INTRODUCTION
The primary goal of this study is to identify factors that impact the quantity and unit
pricing of tomatoes. To find the factors that influence the quantity and unit price of the
tomatoes, we must perform an analysis of variance, Pearson’s correlation, and exploratory
data analysis. The following are the research questions:
i. Does tomato sub-unit have any impact on the tomato quantity?
ii. Is there a relationship between tomato sub-unit and unit price of the tomato?
Correlation
The Pearson’s correlation measures the direction and strenght of the linear relationship
among the numerical data.
Correlation heatmap
Corr = cor(df[,c(2,7,9)])
corrplot(Corr,method = "number")
According to the
correlation findings, there is no substantial association between the numerical data. The
predictor variable has a slight negative association with the target variables.The
correlation results indicate that linear regression cannot fit the data.
ANOVA
In this part, we will use ANOVA to determine whether or not there is a significant
relationship between the variables of interest, as well as which variables have a significant
influence on our target variables.
1) Hypothesis testing on research question
H0: There is no significant relationship between tomato quantity and tomato variety.
H1: There is a significant relationship between tomato quantity and tomato variety.
Result:
attach(df)
summary(aov(log(Quantity)~Variety))
Because the p-value of 0.000171 is smaller than the significance level of 0.05, there is a
significant relationship between tomato quantity and tomato sub-unit, implying that sub-
units have a major impact on tomato quantity at a 95 percent level of significance.
TukeyHSD Post hoc
TukeyHSD(aov(log(Quantity)~Sub_Unit))
According to the Tukey post-hoc test, the following sub-units have a significant influence
on tomato quantity: Laura - Penn Stater’s Cafe, Pollock’s Cafe, Redifer’s Cafe, and Findlay’s
Cafe
3) Hypothesis testing on research question
H0: There is no significant relationship between tomato unit price and tomato variety.
H1: There is a significant relationship between tomato unit price and tomato variety.
Result:
summary(aov(log(Unit_Price)~Variety))
Because the p-value of 1.17e-14 is less than the significance level of 0.05, there is a
significant relationship between tomato unit price and tomato variety at a 95 percent level
of significance, showing that tomato varieties have a substantial influence on the price.
TukeyHSD Post hoc
TukeyHSD(aov(log(Unit_Price)~Variety))
According to the Tukey post-hoc test, the following varieties have a significant influence on
unit price of the tomatoes: Slicers-Cherry, Slicers-Grape, Roma-Heirloom, and Slicers-
Heirloom.
4) Hypothesis testing on research question
H0: There is no significant relationship between tomato unit price and tomato sub-unit.
H1: There is a significant relationship between tomato unit price and tomato sub-unit.
Result:
summary(aov(log(Unit_Price)~Sub_Unit))
There is no significant relationship between tomato unit price and tomato sub-unit because
p-value of 0.383 is greater than the significance level of 0.05. We conclude that the sub-
units of the tomatoes do not influence the price of the tomatoes at a 95% level of
confidence.
Conclusion
To summarise all that has been stated, the varieties that impact tomato prices include
Slicers-Cherry, Slicers-Grape, Roma-Heirloom, and Slicers-Heirloom. As a result, while
growing tomatoes, we should examine the variety because it has a considerable impact on
the price. The tomato’s sub-units have a significant impact on its quantity. The following
sub-units have a substantial influence on the quantity of the tomato: Laura - Penn Stater’s
Cafe, Pollock’s Cafe, Redifer’s Cafe, and Findlay’s Cafe. However, the sub-units have no
impact on the price of the tomatoes, and the variety of the tomato has no affect on the
quantity of the tomato.