RMB W4
RMB W4
Examples:
2.    Within-subjects
• Same people tested twice (once in each condition)
• Each person gives 2 data points
• Example: A person rates a smiling and a neutral face
Where:
     •        s_1^2 = variance of Group 1 (i.e. standard deviation squared)
     •        s_2^2 = variance of Group 2
     •        n_1 = sample size of Group 1
     •        n_2 = sample size of Group 2
• We pool the variances (not standard errors) because we’re assuming that the
  underlying population variability is the same in both groups. That’s the
  assumption of homogeneity of variance. If this assumption is violated, we
  use Welch’s t-test instead.
• Positive t → Group 1 > Group 2
• Negative t → Group 1 < Group 2
• t ≈ 0 → No real difference between the groups
How it works:
• If the result is not significant: We say variances
  are equal → use Student’s t-test
• If the result is significant (p < 0.05): It means
  variances are different → Student’s t-test is not
  appropriate
How it works: You don’t compare the groups directly. Instead, for each person:
• You subtract one condition from the other → get a difference score.
• You test if the average of those differences is significantly different from zero.
• Two Independent Groups, Equal Variance?→
  Student’s t-test
8    Research Methods B
1. Two sample   hypotheses.
         Research Design
   Comparing two groups
        Two-Sample Hypotheses
Study design                   Study is important for statistics as many tests assume
                               that data observations are independent. That is, each
                               data sample is a separate observation.
                               If some observations are related, for example because
                               one participant did the experiment twice then this
                               changes how we can interpret the results.
                                Both are valid but we need to run a slightly different test
                                for each
                               • What is “study design” and why does it matter?
                               • In statistics, most tests assume that every data point is independent — meaning
                 Independent      each value comes from a different participant who only did the test once. If that’s
                                  not the case, we need to choose a different test.
     Group 1                                                  Not     independent
Participants
Group 2
10     Research Methods B
Between Subjects Design
                          Each person contributes to a single condition   • You start with a big pool of
                                                                            participants.
                                                                          • Randomly split them into two
                                                                            groups.
                                                                          • Each group experiences only one
                                                                            condition.
                                                                                               Condition 1
                                                                          • Example: Study: “Does music
                                                                            improve concentration?”
                                                                          • Group 1: Studies with music
                                                                          • Group 2: Studies in silence
                                                                          You compare their test scores.
                                                                                               Condition
                                                                          • Each person only contributes one2
                                                                            data point.
11   Research Methods B
         Between Subjects Design
                                     Each person contributes to a single condition
                                                        Some solutions…
• Standardize your procedures: Make sure every
  group has the same instructions, time limits,         Rigorous & standardised experimental procedures –
  conditions.                                           make sure things really are the same each time
• Balance participant characteristics: Make sure
  both groups have a fair mix of gender, age,
  experience.                                           Planning & recruitment – What aspects of your
• Random assignment: Let chance decide who goes         participants do you need to balance? How can you
  in each group — it prevents unconscious bias.         ensure both groups are representative and balanced.
Condition 1 Condition 2
• This is where every participant experiences both conditions. You test everyone twice (or more).
• Example: You want to test if red light vs blue light affects reading speed.
                                          •Each person reads a passage under red light and then under blue light.
                                          •You compare their two scores.
14   Research Methods B            • This design reduces noise from individual differences (e.g., if someone is just naturally faster at
                                     reading).
         Within Subjects Design
                                        Everyone contributes to both conditions – repeated measures
                                                                Counterbalancing
Set 1        Condition 1            Condition 2                 Systematically vary the order of conditions for
                                                                different participants.
        16   Research Methods B
Within and Between subjects design
               Between subjects                                     Within subjects
                  Two independent groups of data points               Two dependent groups of data points
                  Each participant is in a single group and           Each participant completes two conditions and contributes
                   contributes a single data point
                                                                        two data points
                                                                       Sometimes called ‘repeated measures’
               Pros
                  Shorter participation per individual             Pros
17   Research Methods
Hypotheses
18    Research Methods B
                                                                       Independent Samples: Comparing two different groups
                                                                       Example:
                                                                       • Football players vs rugby players
Two-sample hypotheses                                                  • Reoffending rates in two different types of prisons
               Dependent Samples
               Students' attention spans are longer on days with
               fewer teaching sessions.
               A new therapy increases calorie intake in people
               with Anorexia Nervosa
19   Research Methods B
Two-sample NULL hypotheses
              Independent Samples
              Football players run 200m in the same time as
              rugby players
              Reoffending rates are the same for prisons that
              focus on rehabilitation rather than punishment
              Dependent Samples
              Students' attention spans are the same on days with
              fewer teaching sessions.
               A new therapy doesn’t change calorie intake in
               people with Anorexia Nervosa
                           For each of those research hypotheses, the null assumes
20   Research Methods B
                           there is no difference and This is what we try to disprove
                           using a t-test.
Hypotheses
                                                                   • Your design affects which statistical test you can
•    We need to think about our statistics from the start of the     use.
     study design phase of a project
                                                                   • If you ignore whether your data is independent or
                                                                     repeated, you might get misleading results.
•    The design of the experiment impacts which statistics we
     can use. Whether or not we have independent data
     samples is a key example.
21      Research Methods B
Quantitative Methods
Independent
samples t-tests
                                                              When to
                                                              use a t-test
                                                              •   Comparisons of two group means, or
Use a t-test when:                                                a single mean to a reference value
                                                              •   Data must be interval or ratio type
• You’re comparing means (either between two groups
   or against a known value)                                  •   Assumptions must be met
• Your data is interval or ratio scale (e.g., time, weight,
   score — not categories)
• Certain assumptions are met
⸻                                                             We must be sure that the data we’re looking at have
t-test Assumptions. You can use a t-test if:                  both an interpretable mean and standard deviation to
                                                              run a t-test.
1.     You have the right type of data (interval or ratio)
2.     Data is normally distributed
3.     Each observation is independent (for between-          Nominal data have neither (mode is most appropriate)
subjects)
4.     Both groups have equal variances
→ This is the homogeneity of variance assumption              Ordinal data may have a mean, but the standard
→ If violated, use Welch’s t-test (which allows different     deviation is hard to interpret (we don’t know the
variances)                                                    ‘distance’ between steps on the scale)
When to
use a t-test
•   Comparisons of two group means, or
    a single mean to a reference value
•   Data must be interval or ratio type
•   Assumptions must be met
Assumptions
•   Appropriate data type
•   Data are normally distributed (Normality)
•   Data observations are independent (Independence)
•   Groups have equal variance* (Equality of Variance)
    25   Research Methods B
Independent Samples T-Test
  “
       An independent samples t-test is difference between
       the two means of two groups of data, all divided by the
       standard error of that difference
                                           This formula gives you a t-value, which tells you how big the difference
                                           is compared to the noise (uncertainty).
                               𝑿𝟏      𝑿𝟐
                 t(df) =                                         Mean of                           Mean of
                                       𝟐
                                𝑺𝒑
                                       𝑵
                                                                 Group 1                           Group 2
  “
        The standard error of the difference is computed
        using the pooled standard deviation of the two groups
  “
  A large positive t-value indicates that:
  • the mean of Group 1 is above than the mean of Group 2
                                                             Mean of           Mean of
                                                             Group 1           Group 2
       29   Research Methods B
                          Student’s t-test assumes Homogeneity of Variance
                          i.e. the distributions of the two groups have the same standard deviation
                          – is that always fair?
30   Research Methods B
                                                                          • Levene’s test is a statistical test that checks
Levene’s Test for                                                           whether two (or more) groups have equal
                                                                            variability (or spread) in their data. This spread is
Homogeneity of Variance
  “
                                                                            called variance.
  “
           Welch’s test uses an UNPOOLED measure of
           standard deviation which is valid when the groups
           have different variance
                                                                      • When should you use Welch’s t-test? Whenever
                                                                        Levene’s test is significant (p < 0.05) and when
                                                                        your group sizes are unequal and standard
          The unpooled standard deviation valid whether the             deviations are different.
          groups have equal variances or not
                                                                      Real Example: If Levene’s test says variances are
     • Welch’s t-test is a modified version of the t-test that        different (p = 0.004), then Welch’s t-test should be
       does not assume equal variance. It’s more flexible and         used:
       safer when your groups are messy or have different
       spreads.                                                       • Young: M = 43.2, SD = 1.63
     • What does it calculate? Just like Student’s t-test, it
                                                                 Mean
                                                                    • Old:of
                                                                           M = 40.2, SD = 2.05Mean of
                                                                    • Welch’s t = 19.1, p < .001 → Significant
       compares the means of two groups, but instead of
       “pooling” the standard deviations, it uses each group’s
                                                                 Group     1 between age groups
                                                                      difference                Group 2
       own standard deviation.
  “
         A paired samples t-test follows the same principle of
         the independent samples test.
      • It’s used when you’re testing the same people twice — before/after a treatment, two different conditions, etc. Because the two sets
        of scores are linked (dependent), not from separate people. So we don’t compare the two means directly — we compare the
        differences between the pairs of scores.
• Example: You test people’s memory before and after they take a supplement:
      Use Paired t-test when: You have a within-subjects design and each person does both conditions
Paired Samples t-test
  “
       This is really simple!
                                                           Mean of paired
                                                                                     0
                                                           differences
                                                                          Worked Example
We’re comparing Grey Matter Volume in young vs old adults
using MRI scans.
                                                                  https://cam-can.mrc-cbu.cam.ac.uk/
Analysis in Jamovi
 We need 2 columns to do our analysis.
 A categorical Grouping Variable
 A continuous Outcome Variable
 In this dataset…
 We are comparing Grey Matter Volume between the
 Old and Young groups specified in ‘AgeGroup’
Jamovi is a stats software where we:
38     Research Methods B
Analysis in Jamovi
We need 2 columns to do our analysis.
A categorical Grouping Variable
A continuous Outcome Variable
In this dataset…
We are comparing Grey Matter Volume between the
Old and Young groups specified in ‘AgeGroup’
39   Research Methods B
       Independent Samples T-Test
        The results are in! the effect is massive
       A t-value of 17 suggests that the difference is
       enormous compared to the precision to which we can
       estimate it from this data. Strong evidence for a real
       effect.
Jamovi gives us:
• t-value = 17.7
• df = 569
• p < .001 → This is very significant, meaning there’s a real
  difference between age groups.
41   Research Methods B
Levene’s Test in detail
42   Research Methods B
            Visualising
            homogeneity of
            variance
Levene’s test
suggested a violation
of homogeneity of
variance but it is
always a good idea to
check the data out
yourself as well.
Descriptive statistics
and plots are a useful
tool for this
   43    Research Methods B
                              Levene’s test said the variances are unequal — but we also want to see this.
            Visualising       In Jamovi:
            homogeneity of    • You check histograms or box plots for each group
                              • In this example, young people’s scores are more tightly packed (SD = 1.63)
            variance
                              • Older people’s scores are more spread out (SD = 2.05)
Levene’s test
suggested a violation
of homogeneity of
variance but it is
always a good idea to
check the data out
yourself as well.
   44    Research Methods B
    Reporting Welch’s Test
    45    Research Methods B
                                                                           Data to be analysed
Based on everything, the proper report is:
         Overview
“An independent samples t-test was used to compare grey matter volume between young and old participants.
Levene’s test indicated unequal variances; F(1, 569) = 8.14, p = 0.004.
Welch’s t-test showed that grey matter volume was higher in the young (M = 43.2, SD = 1.63) than in the old (M = 40.2, SD = 2.05),
                                        Compare one sample to
t(462) = 19.1, p < .001.”                                                                 Compare two samples
                                            reference
This statement clearly explains:
• Why we didn’t use Student’s t-test
• That we checked assumptions
        Assumptions
• The final result is statistically significant
              Shapiro-Wilk test
              Normal Distribution
 Consider non-parametric alternative                  Wilcoxon Rank Test
 if assumption of normality is violated
               Levene’s test
               Homogeneity of variance
         46      Research Methods B
                                                                    Data to be analysed
        Overview
                                         Compare one sample to
                                                                                          Compare two samples
                                         reference
49 Research Methods B