This report compares catch-per-unit-effort (CPUE) between two fishing
areas (Area A and Area B).
We use summary statistics, visualization, and a two-sample t-test to
evaluate whether mean CPUE differs between the two areas.
library(tidyverse)
cpue_data <- data.frame(
Area = rep(c("Area A", "Area B"), each = 12),
CPUE = c(1.2, 1.4, 1.1, 1.3, 1.5, 1.6, 1.2, 1.3, 1.4, 1.5, 1.3, 1.2,
1.8, 1.7, 1.9, 2.0, 1.6, 1.8, 1.9, 2.1, 1.7, 1.8, 2.0, 1.9)
)
head(cpue_data)
## Area CPUE
## 1 Area A 1.2
## 2 Area A 1.4
## 3 Area A 1.1
## 4 Area A 1.3
## 5 Area A 1.5
## 6 Area A 1.6
summary_stats <- cpue_data %>%
group_by(Area) %>%
summarise(
Mean_CPUE = mean(CPUE),
SD_CPUE = sd(CPUE),
N = n()
)
summary_stats
## # A tibble: 2 × 4
## Area Mean_CPUE SD_CPUE N
## <chr> <dbl> <dbl> <int>
## 1 Area A 1.33 0.150 12
## 2 Area B 1.85 0.145 12
ggplot(cpue_data, aes(x = Area, y = CPUE, fill = Area)) +
geom_boxplot(alpha = 0.7) +
geom_jitter(width = 0.1, color = "black") +
theme_minimal() +
labs(
title = "Comparison of CPUE Between Fishing Areas",
x = "Fishing Area",
y = "CPUE"
)
t_test_result <- t.test(CPUE ~ Area, data = cpue_data)
t_test_result
##
## Welch Two Sample t-test
##
## data: CPUE by Area
## t = -8.5979, df = 21.973, p-value = 1.766e-08
## alternative hypothesis: true difference in means between group Area A and group Area B is not equal to 0
## 95 percent confidence interval:
## -0.6412998 -0.3920336
## sample estimates:
## mean in group Area A mean in group Area B
## 1.333333 1.850000
The two-sample t-test evaluates whether the mean CPUE differs between Area A and Area B.
If the p-value is less than 0.05, we conclude that CPUE is significantly different.
This example demonstrates a reproducible fisheries data analysis workflow using R Markdown, including data handling, visualization, statistical testing, and interpretation.