moss.cover.analysis.txt JM 10/23/2026 # ESCI 197C Intro to Field Research # Moss distribution project, 10/2/2026 ########################################################################## # This section contains R commands only; see below for R output # This example uses fabricated data. You should use your own field measurements # Example: moss %cover on upward vs. downward sloping surfaces of Bigleaf maple trunks # Use Two sample t-test to compare means. # Often % data are transformed to normality using arcsine transformation. (not done below) # Enter data moss.up <- c(74, 50, 80, 68, 75, 48, 90, 95, 100, 40) moss.up moss.down <- c(60, 50, 40, 35, 45, 50, 75, 30, 65, 60) moss.down # sample means: mean(moss.up) sd(moss.up) mean(moss.down) sd(moss.down) # Compare average moss cover among samples, using t-test function in R: t.test(moss.up, moss.down, alt="two.sided") # Conclude large difference in averages (21%), with high confidence (p<0.02) ########################################################## > # This section contains R commands and R output > # This example uses fabricated data. You should use your own field measurements > # Example: moss %cover on upward vs. downward sloping surfaces of Bigleaf maple trunks > # Use Two sample t-test to compare means. > # Often % data are transformed to normality using arcsine transformation. (not done below) > # This example uses fabricated data. You should use your own field measurements > # Example: moss %cover on upward vs. downward sloping surfaces of Bigleaf maple trunks > # Enter data > moss.up <- c(74, 50, 80, 68, 75, 48, 90, 95, 100, 40) > moss.up [1] 74 50 80 68 75 48 90 95 100 40 > > moss.down <- c(60, 50, 40, 35, 45, 50, 75, 30, 65, 60) > moss.down [1] 60 50 40 35 45 50 75 30 65 60 > # sample means: > mean(moss.up) [1] 72 > mean(moss.down) [1] 51 > > # sample means: > mean(moss.up) [1] 72 > sd(moss.up) [1] 20.58586 > mean(moss.down) [1] 51 > sd(moss.down) [1] 14.1028 > > # Compare average moss cover among samples, using t-test function in R: > t.test(moss.up, moss.down, alt="two.sided") Welch Two Sample t-test data: moss.up and moss.down t = 2.6613, df = 15.923, p-value = 0.01712 alternative hypothesis: true difference in means is not equal to 0 95 percent confidence interval: 4.265409 37.734591 sample estimates: mean of x mean of y 72 51 > # Conclude large difference in averages (21%), with high confidence (p<0.02)