You are on page 1of 12

Project -1

Cold Storage Case Study

Report by Ankit Shende


Table of Contents

1 Project Objective ............................................................................................................................. 3

2. Problem Statement 1 & Solution ……………………………………………………………………………………………….. 4

3. Problem Statement 2 & Solution ……………………………………………………………………………………………….. 8

4. Appendix A – Source Code .............................................................................................................. 11

Page | 2
Project Objective

The Objective of the project is to solve the given Project problems using the given data sheets and to
come up with inferences along with usage of R, Excel and self brain storming.

Page | 3
Problem Statement 1 & Solution

Problem Statement 1.

Cold Storage started its operations in Jan 2016. They are in the business of storing Pasteurized Fresh

Whole or Skimmed Milk, Sweet Cream, Flavored Milk Drinks. To ensure that there is no change of

texture, body appearance, separation of fats the optimal temperature to be maintained is between 2

deg - 4 deg C.

Cold Storage started its operations in Jan 2016. They are in the business of storing Pasteurized Fresh
Whole or Skimmed Milk, Sweet Cream, Flavoured Milk Drinks. To ensure that there is no change of
texture, body appearance, separation of fats the optimal temperature to be maintained is between 2 - 4
C.

In the first year of business they outsourced the plant maintenance work to a professional company with
stiff penalty clauses. It was agreed that if the it was statistically proven that probability of temperature
going outside the 2 - 4 C during the one-year contract was above 2.5% and less than 5% then the penalty
would be 10% of AMC (annual maintenance case). In case it exceeded 5% then the penalty would be 25%
of the AMC fee. The average temperature data at date level is given in the file
“Cold_Storage_Temp_Data.csv”

1. Find mean cold storage temperature for Summer, Winter and Rainy Season
2. Find overall mean for the full year
3. Find Standard Deviation for the full year
4. Assume Normal distribution, what is the probability of temperature having fallen below 2 C?
5. Assume Normal distribution, what is the probability of temperature having gone above 4 C?
6. What will be the penalty for the AMC Company?

Page | 4
Problem Statement 1 Solution

Setting work Directory and Importing Data to R

s> setwd(
+ "C:/R Program Directory/Assignment 1")
> getwd()
[1] "C:/R Program Directory/Assignment 1"
> library(readr)
> Cold_Storage = read.csv("Cold_Storage_Temp_Data.csv", header = TRUE)

1. Find mean cold storage temperature for Summer, Winter and Rainy Season

Mean cold storage temperature for Summer Season: 3.153

Mean cold storage temperature for Rainy Season: 3.039

Mean cold storage temperature for Winter Season: 2.701


Season: Rainy
Season Month Date Temperature
Rainy :122 Aug :31 Min. : 1.00 Min. :1.700
Summer: 0 Jul :31 1st Qu.: 8.00 1st Qu.:2.500
Winter: 0 Jun :30 Median :16.00 Median :2.900
Sep :30 Mean :15.75 Mean :3.039
Apr : 0 3rd Qu.:23.00 3rd Qu.:3.300
Dec : 0 Max. :31.00 Max. :5.000
(Other): 0
-------------------------------------------------------------------
Season: Summer
Season Month Date Temperature
Rainy : 0 Mar :31 Min. : 1.00 Min. :2.500
Summer:120 May :31 1st Qu.: 8.00 1st Qu.:2.800
Winter: 0 Apr :30 Median :15.50 Median :3.200
Feb :28 Mean :15.53 Mean :3.153
Aug : 0 3rd Qu.:23.00 3rd Qu.:3.400
Dec : 0 Max. :31.00 Max. :4.100
(Other): 0
-------------------------------------------------------------------
Season: Winter
Season Month Date Temperature
Rainy : 0 Dec :31 Min. : 1.00 Min. :1.900
Summer: 0 Jan :31 1st Qu.: 8.00 1st Qu.:2.400
Winter:123 Oct :31 Median :16.00 Median :2.600
Nov :30 Mean :15.88 Mean :2.701
Apr : 0 3rd Qu.:23.50 3rd Qu.:2.900
Aug : 0 Max. :31.00 Max. :3.900
(Other): 0

Page | 5
2. Find overall mean for the full year

Overall Mean temperature for full year : 2.963


Season Month Date Temperature
Rainy :122 Aug : 31 Min. : 1.00 Min. :1.700
Summer:120 Dec : 31 1st Qu.: 8.00 1st Qu.:2.500
Winter:123 Jan : 31 Median :16.00 Median :2.900
Jul : 31 Mean :15.72 Mean :2.963
Mar : 31 3rd Qu.:23.00 3rd Qu.:3.300
May : 31 Max. :31.00 Max. :5.000
(Other):179

3. Find Standard Deviation for the full year

Standard Deviation for full year : 0.508589


> sd(Cold_Storage$Temperature)
[1] 0.508589

4. Assume normal distribution, what is the probability of temperature having fallen below 2
degree Celsius ?

Through Excel :

Mean = 2.963, Standard Deviation = 0.508589, x = 2

Formula =NORM.DIST(2,2.963,0.508589,1)

Ans = 0.029147

Through R :
> l=pnorm(2,mean = 2.963, sd = 0.508589)
> l
[1] 0.02914744

Probability of temperature having fallen below 2 degree celsius : 0.029147*100 = 2.91%.

5. Assume normal distribution, what is the probability of temperature having gone above 4
degree Celcsius?

Through Excel :

Mean = 2.963, Standard Deviation = 0.508589 , x = 4

Formula =1-NORM.DIST(4,2.963,0.508589,1)

Ans = 0.020726

Page | 6
Through R :
> m=1-pnorm(4,mean = 2.963, sd = 0.508589)
> m
[1] 0.02072629

Probability of temperature having gone above 4 degree Celsius: 0.020726929*100 = 2.07%.

7. What will be the penalty for the AMC Company?

Here, the probability of temperature going outside the 2 degrees Celsius - 4 degrees Celsius
during the one-year :

= (Probability of temperature having fallen below 2 deg C + Probability of temperature


having gone above 4 deg C )
= 0.02916 + 0.2067

= 0.049873

It is agreed that if it is statistically proven that probability of temperature going outside the 2
degrees Celsius - 4 degrees celsius during the one-year contract is above 2.5% and less than 5%
then the penalty would be 10% of AMC

0.04983 converts to 4.983 % which is above 2.5 and less than 5%, hence penalty will be 10% for
AMC Company.

Page | 7
Problem Statement 2 & Solution.

Problem Statement 2.
In Mar 2018, Cold Storage started getting complaints from their Clients that they have been getting
complaints from end consumers of the dairy products going sour and often smelling. On getting these
complaints, the supervisor pulls out data of last 35 days’ temperatures. As a safety measure, the
Supervisor decides to be vigilant to maintain the temperature 3.9 C or below.

Assume 3.9 C as upper acceptable value for mean temperature and at alpha = 0.1 do you feel that there
is need for some corrective action in the Cold Storage Plant or is it that the problem is from
procurement side from where Cold Storage is getting the Dairy Products. The data of the last 35 days is
in “Cold_Storage_Mar2018.csv”

Which Hypothesis test shall be performed to check the if corrective action is needed at the cold storage
plant? Justify your answer.

State the Hypothesis, perform hypothesis test and determine p-value

Give your inference

Page | 8
Problem Statement 2 Solution.

1. Which Hypothesis test shall be performed to check the if corrective action is needed at the
cold storage plant? Justify your answer.

The sample size of the data is small in nature, which is 35, In case of usage of z test
performance , the results might be absurd and confusing and for such small sample size. It is ideal
to use the T test hypothesis testing for specific results and small sample size.

Standard deviation and standard error is also not known in this case, which again indicates that T
- test should be performed, it shall help determining if the corrective action is needed at the cold
storage plant.

2. State the Hypothesis, perform hypothesis test and determine p-value.

Mean = 3.974, Mu = 3.9, N = 35

Hypothesis:

Null Hypothesis; H0 : mu <= 3.9


Alternate Hypothesis; H1 : mu > 3.9
> PValue
[1] 0.1979064
> t.test(coldstorage$Temperature, mu = 3.9, conf.level = 0.9)

One Sample t-test

data: coldstorage$Temperature
t = 2.7524, df = 34, p-value = 0.009422
alternative hypothesis: true mean is not equal to 3.9
90 percent confidence interval:
3.928648 4.019923
sample estimates:
mean of x
3.974286

P Value = 0.1979064

Here, the null hypothesis is rejected, and alternative hypothesis is True, mu > 3.9.

Page | 9
3. Give your inference

Accepting the T test result as proven true in the above instance, which is, the vigilant value of 3.9
degree Celsius to be kept at the Cold Storage Plant is crossed and goes higher than the specifications,
in return which is creating adversities like catalyzing of dairy products go sour and smelly; leading to
customer complaints. Strictly, some corrective action in the Cold Storage Plant is needed to get the
process back in stable, safe and desired state.

Page | 10
Appendix A – Source Code

Source Code for Problem 1:

setwd(

"C:/R Program Directory/Assignment 1")

getwd()

library(readr)

Cold_Storage = read.csv("Cold_Storage_Temp_Data.csv", header = TRUE)

attach(Cold_Storage)

summary(Cold_Storage)

by(Cold_Storage, INDICES = Season, FUN = summary )

sd(Cold_Storage$Temperature)

l=pnorm(2,mean = 2.963, sd = 0.508589)

m=1-pnorm(4,mean = 2.963, sd = 0.508589)

Page | 11
Source Code for Problem 2:

setwd(

"C:/R Program Directory/Assignment 1")

getwd()

library(readr)

coldstorage = read.csv("Cold_Storage_Mar2018.csv", header = TRUE)

attach(coldstorage)

summary(coldstorage)

std = sd(coldstorage$Temperature)

xbar = mean(Temperature)

xbar

std

n = 35

mu = 3.9

tstat = (xbar-mu)/(std/(n^0.5))

tstat

PValue = (1-pt(tstat,34))

PValue

t.test(coldstorage$Temperature, mu = 3.9, conf.level = 0.9)

Page | 12

You might also like