# Trouble identifying what data analysis to use

I am currently undergoing a soil research project in which 3 soil samples was taken from 3 different depths each (30cm, 60cm, 90cm) therefore totalling 9 samples overall. With these samples, I am looking if soil pH changes as depth increases and if soil nutrient levels changes as depth increases.

For the pH tests I gained these results: 30cm (1) 6 pH, 30cm (2) 6 pH, 30cm (3) 7 pH, 60cm (1) 6 pH, 60cm (2) 6 pH, 60cm (3) 6 pH, 90cm (1) 6 pH, 90cm (2) 6 pH, 90cm (3) 6 pH,

From this I calculated the averages from all samples at different sites, giving each depth it's own pH average: 30cm = 6.33pH 60cm= 6pH and 90cm 6pH. Which I have put all the averages in a bar chart including error bars with the standard deviation (really there is only one standard deviation for 30cm which is 0.57. I'm including in a separate table underneath the bar chart the standard error for all of them (which again only 30cm samples have and it is 0.33) and I'm including a grubbs calculation to determine if the outlier pH result of 7 for 30cm was an error in the table as well.

I'm wanting to compare the the mean pH values at all the different depths but I'm not sure what method to use and I'm not sure what data analysis I can do with quite a small sample size, I've stated the dispersion is normal via the standard deviation error bars, I've stated the uncertainty of my method of testing (which was by test strips as I can't get into a lab right now) by my standard error calculations and I've I'll be investigating the outlier pH result. Please help I'm really at a loss when it comes to small sample sizes as there's a load of inferential stats methods I can't really use because the small sample size violates them.

There isn't much need for a statistical test. Just looking at the 9 data points is enough to see that there is so little variation between measurements that most statistical tests would fail to reject the null.

But alas, let's do statistics on this anyway.

Below is some code to analyze the data you've given us. I'm using linear regression to analyze the data. I'll use an F-test to determine if there is anything in the depth data that can explain the (little) variation in ph.

depth = sort(rep(c(30, 60, 90), 3))
depth = (depth-60)/30
ph = c(6, 6, 7, 6, 6, 6, 6, 6, 6)

model = lm(ph~depth)

plot(model)

summary(model)
Call:
lm(formula = ph ~ depth)

Residuals:
Min       1Q   Median       3Q      Max
-0.27778 -0.11111 -0.11111  0.05556  0.72222

Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept)   6.1111     0.1071  57.076 1.33e-10 ***
depth        -0.1667     0.1311  -1.271    0.244
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

Residual standard error: 0.3212 on 7 degrees of freedom
Multiple R-squared:  0.1875,    Adjusted R-squared:  0.07143
F-statistic: 1.615 on 1 and 7 DF,  p-value: 0.2443



Note the very last line. We fail to reject the null of the F test, so we conclude that the ph variable does not really help us understand the variation in ph (I'm being a bit fast and loose with the interpretation of the test, but this is a sufficiently good way to think about it for your approach).

We didn't need to do statistics on this. Your data do not vary; 8 of the 9 ph measurements are the same (up to what I assume is round-off error, but the sample size is so small that exact values would likely not change anything). Statistical tests are about asking "could the variation between groups be reasonably explained by sampling variation?". If you have no sampling variation, the question (and hence statistics) are moot.

• Thank you for the reply! I'm mainly just trying to do a little stat analysis as I need to talk about it in a presentation, I accept the experiment is more exploratory than for confirmation and given the limited testing resources (test strips) and limited variation the hypothesis is sketchy to begin with. Thank you though it just shows an attempt of stat analysis was made which is kinda what they want to hear,
– Help
Commented May 10, 2021 at 1:08