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
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.
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.
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.
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.
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.
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.
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.
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.
## 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:
The duration of ultrasound does not have a statistically significant effect on the amount of oil desorped from the sand, with a p-value of 0.74417.
The amount of oil in the sample did have a statistically significant effect on the amount of oil desorped from the sand, with a p-value of 0.00542. This means that we can reject the null hypothesis that the amount of oil added to the sand has no effect on the amount desorped.
The interaction term (ultrasound duration and amount of oil) did not have a statistically significant effect on the amount of oil desorped from the sand, with a p-value of 0.10883.
The mean squares residual of 0.520 indicates an average unexplained variation in the data.
## 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:
5mL oil, 5mins ultrasound: We can be 95% confident that the amount of oil desorped from the sand is between 0.2483234 and 0.7516766 mL.
5mL oil, 10mins ultrasound: We can be 95% confident that the amount of oil desorped from the sand is between 0.4396540 and 1.1603460 mL.
10mL oil, 5mins ultrasound: We can be 95% confident that the amount of oil desorped from the sand is between 0.9537602 and 2.1462398 mL.
10mL oil, 10mins ultrasound: We can be 95% confident that the amount of oil desorped from the sand is between 0.8894323 and 1.3105677 mL.