Project - Cold Storage Study PDF
Project - Cold Storage Study PDF
Project - Cold Storage Study PDF
Problem 1
1. Project Objective:
The objective of this report is to explore the Cold Storage Case Study in R and generate
insights about the data set. This exploration report will consists of the following:
A Cold Storage was started in 2016 which stores different types of milk products.The Storage
needs to maintain a strict temperature range of 2 - 4 C. If this temperature range is not
maintained by the maintenance firm, the company has to pay a penalty.
The penalty was set at 10% of AMC (annual maintenance cost), if probability of temperature
going outside the 2 - 4 C range was above 2.5% and less than 5%. If it exceeds 5% then the
penalty would be 25% of the AMC fee.
3 Data Analysis – A step by step data exploration consists of the following steps:
Feature Exploration
3.1 Environment Set up and Data Import
3.1.1 ## Set working directory
setwd("C:/Users/satyam.sharma/Desktop/R programming")
### Just to understand the data better we did a summary of the data
We find out Temperature mean is 3.974, median is 3.9
> summary(Problem2)
Season Month Date Temperature
Summer:35 Feb:18 Min. : 1.0 Min. :3.800
Mar:17 1st Qu.: 9.5 1st Qu.:3.900
Median :14.0 Median :3.900
Mean :14.4 Mean :3.974
3rd Qu.:19.5 3rd Qu.:4.100
Max. :28.0 Max. :4.600
3.3: Segregate Data: To solve our problem we can segregate the Seasons and Temperature
data from the main file as “Seasons”
install.packages(ggplot1)
library(ggplot2)
>hist(Temperature,col ="Red")
>boxplot(Seasons$Temperature, horizontal = TRUE, col = "Green", main = "Boxplot of
Temperature")
5. Find mean cold storage temperature for Summer, Winter and Rainy Season
We can find mean of each seasons through by function of dplyr package
Install.package(dplyr)
Library (dplyr)
8. Assume Normal distribution, what is the probability of temperature having fallen below
2C
9. Assume Normal distribution, what is the probability of temperature having gone above
4 C?
Ans: 2.07% probability of temperature gone above 4 C
============================================================================
Problem 2
1. Project Objective:
The objective of this report is to explore the Cold Storage data of a month R and find statistical
evidence whether there is a need for some corrective action in the Cold Storage Plant or not.
Cold Storage is getting complaints about dairy products going sour and bad smell. Supervisor
takes out temperature data of 35 days and decides to maintain the temperature at 3.9 C or
below.
With the given data we have to not find out whether some corrective action required in the Cold
Storage Plant.
3. Data Analysis: A step by step data exploration consists of the following steps:
Feature Exploration
3.1 Environment Set up and Data Import
3.1.1 ## Set working directory
setwd("C:/Users/satyam.sharma/Desktop/R programming")
> class(Problem2)
[1] "data.frame"
> dim(Problem2)
[1] 35 4
>summary(Problem2)
Season Month Date Temperature
Summer:35 Feb:18 Min. : 1.0 Min. :3.800
Mar:17 1st Qu.: 9.5 1st Qu.:3.900
Median :14.0 Median :3.900
Mean :14.4 Mean :3.974
3rd Qu.:19.5 3rd Qu.:4.100
Max. :28.0 Max. :4.600
4. Which Hypothesis test shall be performed to check the if corrective action is needed at
the cold storage plant? Justify your answer.
Since the Sample size is more than 30, we can conduct the Z hypothesis test; and T test to find
out the corrective action with the help of Z value, Level of significance alpha and the P Value..
To find out whether the cold storage temperature breached the 3.9 C we have to formulate null
Hypothese (Ho) and alternative Hypothesis (H1) as follows:
As Ho is less than or equal to 3.9, it would be a one tail right tail test.
Since we don’t know the distribution in normally distributed or not we will apply the central limit
theorem.
Z or tstat= (Xbar-Mu)/(SD/(sqrt(35))
>Z = (Xbar-Mu)/(SD/(sqrt(35)))
>Z
[1] 2.752359
Or Excel function Norm.s.dist by putting the z value. We have to do 1- since its the positive tail
1-NORM.S.DIST(2.75)= 0.002958380972
Now we have to calculate the alpha or the level of significance to see weather the p value is greater or
lower than alpha.
For calculating value for Alpha we have to use NORM.S.INV in excel. In the problem
statement its given that alpha is 0.1 or the 10%. We get an critical value
of 1.281551564
We can also calculate the X critical value by substituting all the values
in the Z stat formula except X bar.
X critical = 3.934
Inference:
Now, after getting all values we can see that PValue is smaller than the critical value or Alpha. It
means the value falls in the critical region of the normal distribution and we reject the null
hypothesis.
Further Z test also confirms the finding. The Z value of 2.75 is also higher than the significance level.
We reject the null hypothesis and accepts the alternative hypothesis that the temperature had
indeed exceeded 3.9 C in the cold storage.
Similarly our calculated X critical value of 3.934 is also higher than Mu and falls under the critical
area.
This all indicated that the temperature had risen more than 3.9 C on some days and the storage
needs correction.