Introduction to Biological Data Analysis


Exercises 6: P-values in R

Prof. Patrick Meyer

BioSys Lab - Université de Liège

  1. Using t.test() compare two sets of observations of 50 measures. The two sets should be normally distributed but the first one is centered in 0, and the second one in 1. Their standard deviations are the same: $\sigma = 2$.
  2. For the previous exercise, how many observations would you need (approximately), in order to reject the null hypothesis one time out of two (find out that value by trial and error).
  3. Using the power.t.test() function identify how many observations would be needed theoretically in order to reach this statistical power of 50%.

  4. Given two sets of 200 measurments, one from a uniform distribution $U(a=0.2,b=1)$, and the other from $U(a=0, b=1)$. Repeat that experiment 100 times but keeping $U(a=0, b=1)$ as the reference distribution (not changing) whereas the 200 measurements of the first uniform have to be randomly drawn each time. How many times is the null hypothesis rejected (with the traditional threshold of 0.05)?

  5. Load the dataset PlantGrowth and compare adequately (justify the choice of test) the biomasses in each group.

  6. Load the dataset CO2 and compare adequately (justify the choice of test) the uptake in CO2 in between plants having been chilled and the non-chilled ones.