Introduction

In this project, I will be examining data on the effects of ultrasound on the desorption of oil from sand. The basis of this study comes from the question of wether the use of ultrasound waves could help oil be desorped from sand. 2 durations of ultrasound exposure (5 mins and 10 mins) and 2 levels of oil volume (5mL and 10 mL) were tested. A second question this study attempted to answer was wether the exposure to salt water, fresh water, or distilled water impacted the desorption. A portion of the data is shown below.

## Installing package into '/cloud/lib/x86_64-pc-linux-gnu-library/4.4'
## (as 'lib' is unspecified)
## Skipping install of 'Stat2Data' from a github remote, the SHA1 (3fe987c7) has not changed since last install.
##   Use `force = TRUE` to force installation
##   Salt Ultra Oil Diff
## 1    0     5   5  0.5
## 2    0     5   5  0.5
## 3    0     5   5  0.5
## 4    0     5   5 -0.5
## 5    0     5   5  0.0
## 6    0    10   5 -0.5

Section 1: Amount of Oil and Amount of Time VS. Amount of Oil Removed

Section 1.1: Dotplot of Amount of Oil VS. Amount of Oil Removed

Based on this dotplot, it appears that more oil was removed when the amount of oil was greater (10mL).I believe a two-way ANOVA will show some significance.

Section 1.2: Dotplot of Duration of Ultrasound VS. Oil Removed

Based on this dotplot, it appears that more oil was removed when the duration of ultrasound exposure was shorter (5 mins). I believe a two-way ANOVA will show some significance.

Section 2: Interaction Plot

This interaction plot gives an idea of wether an interaction term is necessary for this analysis. Because the lines are perpendicular, an interaction term is necessary.

Section 3: Model Checking

Section 3.1: Residuals VS. Fitted Plot

This residual VS. fitted plot checks for linearity and constant variance. Based on this plot, there does not seem to be a linear relationship or constant variance.

Section 3.2: Q-Q Residual Plot

This Q-Q residual plot is used to assess the normality of residuals. Based on this plot, it appears most of the data falls along a stright line, however, there are several points that do not and are outliers. This raises an issues in the assumption of normality in the residuals.

Section 3.3: Scale-Location Plot

The scale-location plot checks for constant variance of residuals. This plot should ideally have points evenly distributed around a horizontal line. This plot shows a violation of the assumption of constant variance in the residuals.

Section 3.4: Cook’s Distance Plot

The Cook’s distance plot is used to identify influential data points. It measures the impact of each observation on the overall fit of the model. The a large Cook’s distance indicates that removing a specific point will significantly change the regression coefficients. In this plot, observations 4, 14, and 31 are the most influential.

Section 3.5: Model Checking Conclusion

After viewing all of the model checking plots, it does not appear that the conditions for a two-way ANOVA are met. Each of the model checking plots displayed some irregularities in the residuals of this data.

Section 4: Two-Way ANOVA Model

##             Df Sum Sq Mean Sq F value  Pr(>F)   
## Ultra        1  0.056   0.056   0.108 0.74417   
## Oil          1  4.556   4.556   8.760 0.00542 **
## Ultra:Oil    1  1.406   1.406   2.704 0.10883   
## Residuals   36 18.725   0.520                   
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

This ANOVA model shows which independent variables (Oil and Ultra) have a statistically significant effect on the dependent variable (Diff). Based on this model, with a significant level of 0.05, we are able to draw the following conclusions:

Section 5: 95% Confidence Interval

##   Oil Ultra Diff  Lower_CI  Upper_CI
## 1   5     5 0.50 0.2483234 0.7516766
## 2  10     5 1.55 0.9537602 2.1462398
## 3   5    10 0.80 0.4396540 1.1603460
## 4  10    10 1.10 0.8894323 1.3105677

This table displays the 95% confidence intervals for each combination of ultrasound duration and amounts of oil. The resulting confidence intervals are: