STATISTICS AND ANALYSES
4.1
How to make an analysis plan
It is important to plan your analysis during the design of the experiment. This means that you already have to think in detail about the statistical tests for your hypotheses and the approximate computations when you design the experiment. You want to do this before running the experiment, because if you realize that some variables are missing after you ran the study, it’s just too late. Analysis plans are easy. You can simply follow these four steps:
1. Select the hypothesis.
For example:
H1: Listening to classical music increases performance in math taks more than rock music because it distracts people less.
2. Write down the test.
For example:
Test for H1: T-test between the % of correct answers of the rock-music-group and the % of correct answers of classic-music-group.
3. Write down the variables in your experiment that relate to this hypothesis.
If you don’t know how these variables will be called in the end, write them down with an approximate name. The most important thing is that you write down what data your experiment will give you.
For example:
Variable in our experiment:
v_123 = experimental groups (1 = classic, 2 = rock)
v_009 = maths test answer 1 v_010 = maths test answer 2 v_011 = maths test answer 3 v_012 = maths test answer 4
In this example it would be clever if you renamed the variables v_123 as experimental_condition and v_009 - v_012 as maths_1 through maths_4.
Now you can see that there are four maths test answers but the t-test in step 2 needs the % of correct answers. Therefore, you need to first calculate the mean. In this case you can write down another step.
4. Transform the data.
For example:
Data transformations:
1. Compute which maths test answer was correct (v_009 - v_012)
2. Compute for each person in the sample the mean number of correct answers
You can also already write down the requirements for the t-test (look into your statistics book if you don’t remember how).
For example:
For t-test: compute test of variance homogeneity of correct answers
Important: See what the difference between step 3 and step 4 above is? Step 4 mentions the variables v_009 to v_012 while step 3 only mentions the ‘correct answers’ which are not in your raw data.
Repeat these four steps with all your hypotheses.
Tip: if you are a bit familiar with R you can write the statistical commands for the test of your hypothesis directly in R. For example:
# H1: Listening to classical music increases performance in math taks more than rock music because it distracts people less
# Mean number of correct maths test items
mean_correct_per_person <- rowSums(data[, c(“v_009”, “v_010”, “v_011”, “v_012”)] / 4)
heard_classic <- data$v_123 # 1 = classic, 2 = rock
# Homogeneity of variances?
bartlett.test(x = mean_correct_per_persom, y = heard_classic)
# Differences in groups?
mean_correct_classic <- mean_correct_per_person[heard_classic == 1]
mean_correct_rock <- mean_correct_per_person[heard_classic == 2]
t.test(x = mean_correct_classic, y = mean_correct_rock )
Note: a line beginning with a hashtag (#) indicates a comment in R. This means that it is not carried out as code.
If you are not familiar with R yet, do not worry. We will introduce R in the following chapters.
Lizenz
University of Basel