1. Load the helium dataset using the code below. This dataset contains data from an experiment in which two identical footballs, one air filled with air and one filled with helium, were each kicked 39 times. The distances traveled were measured for each trial.

    helium_data <- read.csv("https://www.openintro.org/data/csv/helium.csv")
  2. Use the t.test function to test the null hypothesis that the mean distance traveled by the helium-filled ball is equal to the mean distance traveled by the air-filled ball. Use a one-sided hypothesis. What do you conclude?

  3. Write code to run a permutation test to test the same hypothesis as above. Your permutation test should follow these steps:

    1. Compute a test statistic using the original unpermuted data.
    2. Permute data by randomly splititng the 78 observations into two groups and compute a test statistic comparing the two groups.
    3. Repeat the above step 1000 times, recording your test statistic each time.
    4. Compare your test statistic from the original unpermuted data with your distribution of test statistics based on the repeatedly permuted data to compute a p-value.
  4. What is your conclusion from the permutation test?