Question 20

Sockeye salmon swim sometimes hundreds of miles from the Pacific Ocean, where they grow up, to rivers for spawning. Kokanee are a type of freshwater sockeye that spend their entire lives in lakes before swimming to rivers to mate. In both types of fish, the males are bright red during mating. This red coloration is caused by carotenoid pigments, which the fish cannot synthesize but get from their food. The ocean environment is much richer in carotenoids than the lake environment, which raises the question: how do kokanee males become as red as the sockeye? One hypothesis is that the kokanee are much more efficient than the sockeye at using available carotenoids. This hypothesis was tested by an experiment in which both sockeye and kokanee individuals were raised in the lab with low levels of carotenoids in their diets (Craig and Foote 2001). Their skin color was measured electronically. The data are as follows and are plotted in the accompanying histograms:

Alt text

Alt text

To answer the questions on this excerpt using R, we want to create the data first:

k_tib <- tibble(
  value = c(1.11, 1.34, 1.55, 1.53, 1.50, 1.71, 1.87, 1.86, 1.82, 2.01, 1.95, 2.01, 1.66, 1.49,1.59, 1.69, 1.80, 2.00, 2.30),
  species = "kokanee")

sk_tib <- tibble(
  value = c(0.98, 0.88, 0.97, 0.99, 1.02, 1.03, 0.99, 0.97, 0.98, 1.03, 1.08, 1.15, 0.90, 0.95,0.94, 0.99),
  species = "sockeye")

kokanee <- c(1.11, 1.34, 1.55, 1.53, 1.50, 1.71, 1.87, 1.86, 1.82, 2.01, 1.95, 2.01, 1.66, 1.49,1.59, 1.69, 1.80, 2.00, 2.30)

sockeye <- c(0.98, 0.88, 0.97, 0.99, 1.02, 1.03, 0.99, 0.97, 0.98, 1.03, 1.08, 1.15, 0.90, 0.95,0.94, 0.99)

fish.tibble <- bind_rows(k_tib, sk_tib)

#tibble(kokanee, sockeye)

kokanee:

kokanee
##  [1] 1.11 1.34 1.55 1.53 1.50 1.71 1.87 1.86 1.82 2.01 1.95 2.01 1.66 1.49
## [15] 1.59 1.69 1.80 2.00 2.30

sockeye

sockeye
##  [1] 0.98 0.88 0.97 0.99 1.02 1.03 0.99 0.97 0.98 1.03 1.08 1.15 0.90 0.95
## [15] 0.94 0.99

a) List two methods that would be appropriate to test whether there was a difference in mean skin color between the two groups

  1. The Mann-Whitney-U test is a non-parametric alternative to the two-sample t-test, but it doesn’t allow us to conclude that the two groups have different means or medians; just that the two distributions are different.

  2. Since the sample sizes are approximately equal in the two groups, a two-sample t-test can be used since it is robust to minor violations of the assumption of equal standard deviations between populations.

b) Use a transformation to test whether there is a difference in mean between these two groups. Is there a difference in the mean of kokanee and sockeye skin color?

Null hypothesis : There is no difference in mean skin redness between the Kokanee Sockeye and regular Sockeye.

Alternative hypothesis : There is a difference in mean skin redness between the Kokanee Sockeye and regular Sockeye.

Running the Mann-Whitney U test:

kokanee
##  [1] 1.11 1.34 1.55 1.53 1.50 1.71 1.87 1.86 1.82 2.01 1.95 2.01 1.66 1.49
## [15] 1.59 1.69 1.80 2.00 2.30
sockeye
##  [1] 0.98 0.88 0.97 0.99 1.02 1.03 0.99 0.97 0.98 1.03 1.08 1.15 0.90 0.95
## [15] 0.94 0.99
wilcox.test(kokanee, sockeye, alternative = "two.sided")        # greater
## Warning in wilcox.test.default(kokanee, sockeye, alternative =
## "two.sided"): cannot compute exact p-value with ties
## 
##  Wilcoxon rank sum test with continuity correction
## 
## data:  kokanee and sockeye
## W = 303, p-value = 6.153e-07
## alternative hypothesis: true location shift is not equal to 0

the p-value was very low; we can reject the null hypothesis and support that there is a difference in mean skin redness between the Kokannee sockey and regular sockeye salmon.

In-Class work: Using a log transformation and checking normality.

transformed_kokanee <- log10(kokanee)

transformed_sockeye <- log10(sockeye)

shapiro.test(transformed_kokanee)
## 
##  Shapiro-Wilk normality test
## 
## data:  transformed_kokanee
## W = 0.96187, p-value = 0.6097
shapiro.test(transformed_sockeye)
## 
##  Shapiro-Wilk normality test
## 
## data:  transformed_sockeye
## W = 0.9554, p-value = 0.5797
var.test(transformed_kokanee, transformed_sockeye)
## 
##  F test to compare two variances
## 
## data:  transformed_kokanee and transformed_sockeye
## F = 6.8628, num df = 18, denom df = 15, p-value = 0.0004739
## alternative hypothesis: true ratio of variances is not equal to 1
## 95 percent confidence interval:
##   2.458105 18.301171
## sample estimates:
## ratio of variances 
##           6.862805