1 Question 1

For safety reasons, a leading manufacturer of SCUBA tanks needed to determine how tank pressure changed with increasing temperature. 27 tanks were filled to approximately 200 bar (atmospheres) at 0\(^o\)C. Tanks were then set at temperatures between 0\(^o\)C and 40\(^o\)C, and the pressure was measured.

The data is in the file Pressure.csv, which contains the variables:

Variable Description
TempC Tank temperature (degrees Celsius)
Pressure Tank pressure (bar)

1.1 Question of interest/goal of the study

For safety reasons, we are interested in quantifying the relationship between the air pressure inside a SCUBA tank and its temperature. In particular, how the air pressure changes due to an increase in temperature.

1.2 Read in and inspect the data:

Air.df = read.csv("Pressure.csv",header=TRUE)
plot(Pressure~TempC, data=Air.df, xlab = "SCUBA Tank Temperature (degrees Celcius)", ylab = "Tank Pressure (bar)")

1.3 Comment on the plots

The plot has a positive linear trend. As the SCUBA Tank Temperature (degree celcius) increase so does Tank Pressure (bar). The plot seems to have a high correlation with little variability.

1.4 Fit an appropriate linear model, including model checks and relevant output.

Air.lm=lm(Pressure~TempC, data=Air.df)
modelcheck(Air.lm)

summary(Air.lm)
## 
## Call:
## lm(formula = Pressure ~ TempC, data = Air.df)
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -1.99037 -0.81926  0.07852  0.63630  2.65185 
## 
## Coefficients:
##              Estimate Std. Error t value Pr(>|t|)    
## (Intercept) 200.27926    0.39097  512.26   <2e-16 ***
## TempC         0.72844    0.01642   44.35   <2e-16 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 1.102 on 25 degrees of freedom
## Multiple R-squared:  0.9875, Adjusted R-squared:  0.9869 
## F-statistic:  1967 on 1 and 25 DF,  p-value: < 2.2e-16
confint(Air.lm)
##                   2.5 %      97.5 %
## (Intercept) 199.4740441 201.0844744
## TempC         0.6946186   0.7622702

1.5 Create a scatter plot with the fitted line from your model superimposed over it.

plot(Pressure~TempC, data=Air.df, xlab = "SCUBA Tank Temperature (degrees Celcius)", ylab = "Tank Pressure (bar)")

# Add some code here

abline(Air.lm, lty = 2, col = 'blue')

trendscatter(Pressure ~ TempC, data=Air.df, xlab = "SCUBA Tank Temperature (degree celcius)", ylab = "Tank Pressure (bar)")

1.6 Method and Assumption Checks

The scatter plot suggested a linear relationship between the tank pressure and temperature, and with reasonably constant scatter, so a simple linear regression model was fitted.

Model assumptions were all satisfied and the effect of temperature was highly significant.

1.6.1 Complete the equation below:

Our model is:

{estimatedPressure = 200.28 + 0.73 x TempC + ε} where \(\epsilon_i \sim iid ~ N(0,\sigma^2)\)

1.6.2 Complete the statement

Our fitted model explains 99% of the variability in the data.

1.7 Executive Summary

A leading manufacturer of SCUBA tanks needed to determine how tank pressure changed with increasing temperature.

Overall this model does a very good job at explaining the trend between SCUBA Tank temperature and Tank Pressure. The trend explains 99% of the data and the straight line relationship applies well. For every 1 degree Celsius increase in SCUBA Tank Temperature, we can expect a increase in Tank pressure of 0.69 to 0.76 bar with 95% confidence.

We could use this model to calculate the expected Tank Pressure depending on the SCUBA Tank Temperature.

Ideally we would like to get more data. We would also like to get data with different pressures to see if our model also applied to Tanks with a lower initial pressure.